Network Layer.

Slides:



Advertisements
Similar presentations
1 Routing Protocols I. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
Advertisements

What is “Routing”? Routing algorithm that part of the network layer responsible for deciding on which output line to transmit an incoming packet Adaptive.
Data Communication and Networks Lecture 11 Internet Routing Algorithms and Protocols December 5, 2002 Joseph Conron Computer Science Department New York.
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.
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%
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)
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.
Link-state routing  each node knows network topology and cost of each link  quasi-centralized: each router periodically broadcasts costs of attached.
IP routing. Simple Routing Table svr 4% netstat –r n Routing tables DestinationGatewayFlagsRefcntUseInterface UGH00emd UH10lo0.
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.
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.
Network Layer4-1 Distance Vector: link cost changes Link cost changes: r node detects local link cost change r updates distance table (line 15) r if cost.
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.
4: Network Layer4a-1 Distance Vector Routing Algorithm iterative: r continues until no nodes exchange info. r self-terminating: no “signal” to stop asynchronous:
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
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 Layer4-1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol.
Network Layer.
CS 5565 Network Architecture and Protocols
CSE390 – Advanced Computer Networks
Network Layer.
Network Layer Introduction Datagram networks IP: Internet Protocol
Intra-Domain Routing Jacob Strauss September 14, 2006.
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 4700 / CS 5700 Network Fundamentals
CS 3700 Networks and Distributed Systems
CS 640: Introduction to Computer Networks
ECE453 – Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
COMP/ELEC 429 Introduction to Computer Networks
Chapter 4: Network Layer
Computer Networking Lecture 10: Intra-Domain Routing
Communication Networks
ECSE-4730: Computer Communication Networks (CCN)
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Chapter 4: Network Layer
Chapter 4: Network Layer
EE 122: Intra-domain routing: Link State
Presentation transcript:

Network Layer

Network layer 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 where A and B can be world-apart

Main Network Layer Design Issues Routing: Where to send the packets received?

Routing Routing – Determining the path from the source to the destination. At a router, it means which output port should a packet to be sent to Desirable properties of the routing algorithms: correctness: of course simplicity: for efficiency robustness: must be able to sustain the changes in the networks (cannot just rely on reboot) stability: when run long enough, should converge to equilibrium fairness: every one gets to send optimality: as efficient as possible, of course Sometimes, these properties may conflict

Flooding Flooding send all the incoming packet to all outgoing links except the one the packet arrived on Reliable, fast, large overhead, not scalable user: military, distributed database(update everything), highly reliable packets.

Flooding Problems? A packet will be sent for infinite number of times Hop count. Don’t forward the same packet for more than H times. How to set H? Ask why when H=MAX DISTANCE, the packet must be delivered. – Consider the path between the sender and receiver.

Shortest Path Algorithm 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 not in the set with shortest distance 5) include d in the set for other nodes not in set 7) if distance(s, m) > distance(s, d) + dist(d, m) then distance(s, m) = distance(s, d) + dist (d, m)

Dijkstra’s algorithm: example Step 1 2 3 4 5 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 C B F 2 1 3 5

Shortest Path Node added to the set has found its minimum distance path (visiting ONLY the nodes currently in the set, of course) to the source. Suppose this is not true. At a step, we add node W to the set but there is another path sZW with distance shorter than d(W). Supose Z is the first node in the path currently not in the set; such as Z must exist (why?). d(Z) must be less than d(W) (why?) and we would have added Z to the set at this step rather than W. So if we added W, we are using the shortest path. Note that any subpath on an optimal path is still optimal.

Link State Algorithm Each router independently computes optimal paths Must make sure that Each router sees the same cost for each link (using the same network topology) Uses the same algorithm (shortest path algorithm for OSPF) to compute the best path

Distance Vector Algorithm The LS algorithm works for relatively small networks, because it is necessarily a centralized algorithm. For larger networks, too expensive to store and disseminate the network topology, use DV algorithms.

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 C B cost to destination via A 1 14 5 B 7 8 C 6 4 14 8 9 11 5 2 cost to destination via destination A E D C B 7 8 1 2 Lets look at an example. Here A, B, C, D, and E are routers and the links are labeled with their costs. And this is a distance table at router E. You can see that there is one row per each destination an one column per each neighbor. The distance from E to A via B is 14 because E-B is 8, while the best path from B to A is B-C-D-E-A and is 6. The distance from E to A via D is 5 because E-D is 2, while the best path from D to A is D-E-A and is 3. If you look at the third row, it says that you can reach C via A with cost 6, via B with cost 9 and via D with 4. So the shortest distance to C is 4 via D. If E were to advertise its distance vector it will send <A,1>,<B,5>,<C,4>,<D,2>.

Routing Table of E A B C D 1 7 6 4 14 8 9 11 5 2 cost to destination via destination Outgoing link to use, cost A B C D A,1 D,5 D,4 D,2 destination Distance table Routing table

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 Each node: 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

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

Example X Z 1 2 7 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 1 4 50 Y “good news travels fast” algorithm terminates

Problems with DV Routing Link cost changes: good news travels fast bad news travels slow “count to infinity” problem! X Z 1 4 50 Y 60 algorithm continues on! Suppose that link cost is increased from 4 to 60. Once again router Y senses the change, updates the distance table. It sees that it can reach X via Z with distance 6. Since the shortest distance changed, it notifies the neighbor Z. The router Z in turn updates its table and informs Y. This goes on and on. Do you know when it terminates? What will be the entries in distance table when it converges? It finally reaches steady state with distance from Y to X via Z as 51 and Z to X via Y as 52. This is the problem with distance vector routing. Good news travels fast but bad news travels slow. This results in what is known as count to infinity problem.

Path Vector Algorithm C B D The neighbor also tells about the path it is using. Line FG goes down. Node F wants to find path to D. B: BCD E: EFGCD I: IFGCD F can quickly decide to ignore the paths from I and E. A G F H E J I