Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.

Slides:



Advertisements
Similar presentations
Data Communication and Networks Lecture 11 Internet Routing Algorithms and Protocols December 5, 2002 Joseph Conron Computer Science Department New York.
Advertisements

Routing - I Important concepts: link state based routing, distance vector based routing.
Network Layer-11 CSE401N: Computer Networks Lecture-9 Network Layer & Routing.
1 Dijkstra’s Shortest Path Algorithm Gordon College.
Introduction to Networking Bin Lin TA March 3 rd, 2005 Recital 6.
Routing & IP Routing Protocols
Distance-Vector Routing COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing with.
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Link State and Distance Vector Routing Computer Science Division Department of Electrical.
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
Announcement r Project 2 extended to 2/20 midnight r Project 3 available this weekend r Homework 3 available today, will put it online.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer (Routing) Shivkumar.
1 EE 122: Shortest Path Routing Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
4: Network Layer4a-1 14: Intro to Routing Algorithms Last Modified: 7/12/ :17:44 AM.
Announcement r Project 2 Extension ? m Previous grade allocation: Projects 40% –Web client/server7% –TCP stack21% –IP routing12% Midterm 20% Final 20%
Announcement r Project 2 due next week! r Homework 3 available soon, will put it online r Recitation tomorrow on Minet and project 2.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
4: Network Layer 4a-1 14: Intro to Routing Algorithms Last Modified: 8/8/ :41:16 PM.
Computer Networking Intra-Domain Routing, Part I RIP (Routing Information Protocol)
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
1 Week 6 Routing Concepts. 2 Network Layer Functions transport packet from sending to receiving hosts network layer protocols in every host, router path.
Intra-Domain Routing D.Anderson, CMU Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)
Review: routing algorithms. –Choose the appropriate paths. –Routing algorithms Flooding Shortest path routing (example). –Dijkstra algorithm. –Bellman-Ford.
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
4: Network Layer4a-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing.
IP routing. Simple Routing Table svr 4% netstat –r n Routing tables DestinationGatewayFlagsRefcntUseInterface UGH00emd UH10lo0.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
1 WAN Technologies and Routing. 2 Motivation Connect multiple computers Span large geographic distance Cross public right-of-way –Streets –Buildings –Railroads.
Network Layer4-1 Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then d x (y)
The Network Layer & Routing
1 Week 5 Lecture 2 IP Layer. 2 Network layer functions transport packet from sending to receiving hosts transport packet from sending to receiving hosts.
Overview of Internet Routing (I) Fall 2004 CS644 Advanced Topics in Networking Sue B. Moon Division of Computer Science Dept. of EECS KAIST.
Routing 1 Network Layer Network Layer goals:  understand principles behind network layer services:  routing (path selection)  how a router works  instantiation.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
1 CSE524: Lecture 12 Network layer Functions. 2 Where we’re at… Internet architecture and history Internet protocols in practice Application layer Transport.
Switching, Forwarding and Routing. Network layer functions r transport packet from sending to receiving hosts r network layer protocols in every host,
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
4: Network Layer4a-1 Distance Vector Routing Algorithm iterative: r continues until no nodes exchange info. r self-terminating: no “signal” to stop asynchronous:
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
Application Layer 2-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 10: Intra-domain routing Slides used with.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
Network Layer.
CS 5565 Network Architecture and Protocols
Routing: Link State Algorithm
Network Layer.
Routing: Distance Vector Algorithm
Distance Vector Routing: overview
Network layer functions
Chapter 4 – The Network Layer & Routing
Road Map I. Introduction II. IP Protocols III. Transport Layer
Lecture 10 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from.
CS 3700 Networks and Distributed Systems
ECE453 – Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
COMP/ELEC 429 Introduction to Computer Networks
Chapter 4: Network Layer
Communication Networks
ECSE-4730: Computer Communication Networks (CCN)
Routing: Link State Algorithm
EE 122: Intra-domain routing: Distance Vector
Chapter 4: Network Layer
Network Layer.
Chapter 4: Network Layer
EE 122: Intra-domain routing: Link State
Presentation transcript:

Network Layer (2)

Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations Network layer: move packets from source A to destination B

Datagram Packet carries the complete destination information The job of a router is to – Find the output link to send the packet – Forward the packet to that output link Routing table for a node Destination Next Hop B C D B E C F C B E F D C A H

Forwarding A fast switch is used to forward the packet to the destination H B C H B C

Virtual Circuit Destination information is large and the table is large – Consider 32 bit IP address. A full table will have 1G entries. If an IP packet is 1250 byte long and the link speed is 10Gbps, how much time do you have for this lookup? (1. You don’t have to implement the full table. 2. You can also use pipeline.)

Virtual Circuit Circuit means a path between the source and the destination. Real circuit switching has a physical path set up between the source and the destination, like telephone network – When you dial, a request is sent to the network, network finds if there are free links on the path and reserve that link for you. Virtual circuit is different – used in packet switching networks. – No real path set up, because it is packet switching (although link bandwidth can be reserved). – But still has the connection phase. The purpose is to let the routers know how to route the packets of this virtual circuit.

Virtual Circuits When setting up the virtual circuit, a VC identifier is picked. The router knows where to forward a packet with a certain VC identifier. Each packet will carry the VC identifier, which is much shorter than the full destination address, so allows more efficient table lookup. Resources can also be reserved. QoS. A practical problem in a distributed environment – different stations may pick the same VC identifier. Labels can be swapped without causing confusion. B E F D C A H1 H2 A’s Table In Out H1, 1 C, 1 H2, 1 C, 2 H3 C’s Table In Out A, 1 E, 1 A, 2 D, 1

Shortest Path find the shortest path from the source to all other nodes. Dijkstra algorithm: finding the shortest paths from the source s to all other nodes in the network. 1) Initial set = empty, 2) maintain the distance from s to all other nodes (distance(s, s) = 0, distance(s, t) = infinite) 3) repeat until all nodes are included in the set 4) find a node d currently no in the set with shortest distance 5) include d in the set 6) update the distance from s to all other nodes using 7) if distance(s, m) > distance(s, d) + dist(d, m) then 8) distance(s, m) = distance(s, d) + dist (d, m)

Dijkstra’s algorithm: example Step start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E A E D CB F

Shortest Path Why this gives the shortest path? Node added to the set has found its minimum distance to the source. Suppose this is not true. At a step, we add node W to the set. If there is another path s---Z---W with distance shorter than d(W), where Z is the first node in the path currently not in the set. d(Z) must be less than d(W) (why?) and we would have added Z to the set at this step rather than W.

Link State Algorithm Each router independently computes optimal paths – From itself to every destination – Routes are guaranteed to be loop free if Each router sees the same cost for each link Uses the same algorithm (shortest path algorithm for OSPF) to compute the best path

Topology Dissemination Each router creates a set of link state packets – Describing its links to neighbors – LSP contains Router id, neighbor’s id, and cost to its neighbor Copies of LSPs are distributed to all routers – Using controlled flooding Each router maintains a topology database – Database containing all LSPs

Distance Vector Routing Algorithm Distance Table data structure each node has its own row for each possible destination column for each directly-attached neighbor to node example: in node X, for dest. Y via neighbor Z: D (Y,Z) X distance from X to Y, via Z as next hop c(X,Z) + min {D (Y,w)} Z w = =

Distance Table of E A E D CB ABCDABCD A1764A1764 B D5542D5542 cost to destination via destination

ABCD ABCD A1764A1764 B D5542D5542 cost to destination via destination ABCD ABCD A,1 D,5 D,4 D,2 Outgoing link to use, cost destination Distance table Routing table Routing Table of E

Distance Vector Algorithm Iterative, asynchronous: each iteration caused by: local link cost change message from neighbor: its least cost path change from neighbor Distributed: each node notifies neighbors only when its least cost path to any destination changes – neighbors then notify their neighbors if necessary wait for (change in local link cost or msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Each node:

Example X Z Y D (Y,Z) X c(X,Z) + min {D (Y,w)} w = = 7+1 = 8 Z D (Z,Y) X c(X,Y) + min {D (Z,w)} w = = 2+1 = 3 Y

Example X Z Y

Convergence of the algorithm router detects local link cost change updates distance table if cost change in least cost path, notify neighbors X Z Y 1 algorithm terminates “good news travels fast”

21 Problems with DV Routing Link cost changes: good news travels fast bad news travels slow “count to infinity” problem! X Z Y 60 algorithm continues on!

Zhenhai DuanComputer Science, FSU22 Count-to-Infinity Problem XYZ 11 2

23 Link State vs Distance Vector Tells everyone about neighbors Controlled flooding to exchange link state Dijkstra’s algorithm Each router computes its own table May have oscillations Open Shortest Path First (OSPF) Tells neighbors about everyone Exchanges distance vectors with neighbors Bellman-Ford algorithm Each router’s table is used by others May have routing loops Routing Information Protocol (RIP)