Lecture 10 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from.

Slides:



Advertisements
Similar presentations
13 –Routing Protocols Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
Advertisements

Routing - I Important concepts: link state based routing, distance vector based routing.
Distance-Vector Routing COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Data Communication and Networks Lecture 7 Networks: Part 2 Routing Algorithms October 27, 2005.
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.
Lecture 7 Overview. Two Key Network-Layer Functions forwarding: move packets from router’s input to appropriate router output routing: determine route.
4: Network Layer4a-1 14: Intro to Routing Algorithms Last Modified: 7/12/ :17:44 AM.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.5 Routing algorithms m Link state m Distance.
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)
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 18.
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.
Introduction 1 Lecture 21 Network Layer (Routing Activity) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science &
Network Layer4-1 Chapter 4 Network Layer Part 3: Routing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March.
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.
13 – Routing Algorithms Network Layer.
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.
Routing 1 Network Layer Network Layer goals:  understand principles behind network layer services:  routing (path selection)  how a router works  instantiation.
Introduction 1 Lecture 19 Network Layer (Routing Algorithms) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 20 Omar Meqdadi Department of Computer Science and Software Engineering University.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley Chapter4_3.
CS 4284 Systems Capstone Godmar Back Networking. CS 4284 Spring 2013 Summary Basics of Network Layer –Routing (path selection) vs Forwarding (switching)
Network Layer introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4.
4: Network Layer4a-1 Distance Vector Routing Algorithm iterative: r continues until no nodes exchange info. r self-terminating: no “signal” to stop asynchronous:
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.
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
Project 2 r DUE Wed: 02/24 Network Layer4-1. Project 2 r DUE Wed: 02/24 r DUE Mon: 02/29 Network Layer4-2.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
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.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
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.
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.
CS 5565 Network Architecture and Protocols
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
Chapter 7 Dynamic Routing
CMPT 880: Internet Architectures and Protocols
Network Layer Introduction Datagram networks IP: Internet Protocol
Routing: Distance Vector Algorithm
Chapter 5 Network Layer.
Chapter 4: outline 4.1 introduction
Distance Vector Routing: overview
Network layer functions
2017 session 1 TELE3118: Network Technologies Week 7: Network Layer Control Plane: Intra-Domain Routing Some slides have been adapted from: Computer Networking:
NAT traversal problem client want to connect to server with address
Chapter 4 – The Network Layer & Routing
Road Map I. Introduction II. IP Protocols III. Transport Layer
CSCD 330 Network Programming
Chapter 4-4 routing and IP routing
Routers Routing algorithms
Chapter 6 Dynamic Programming
Advanced Computer Networks
CS4470 Computer Networking Protocols
CS 455/555 Intro to Networks and Communications
Chapter 4: Network Layer
CMPE 252A : Computer Networks
Chapter 4: Network Layer
Network Layer (contd.) Routing
Chapter 4: Network Layer
CSCD 330 Network Programming
Network Layer: Link-state and Distance-Vector Routing Protocols
Chapter 4: Network Layer
CSCD 330 Network Programming
EE 122: Intra-domain routing: Link State
Presentation transcript:

Lecture 10 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from those made available by the authors of our text. Introduction

Lecture 10: outline 4.5 routing algorithms 4.1 introduction link state distance vector hierarchical routing 4.1 introduction 4.2 virtual circuit and datagram networks Network Layer

A Link-State Routing Algorithm Dijkstra’s algorithm net topology, link costs known to all nodes accomplished via “link state broadcast” all nodes have same info computes least cost paths from one node (‘source”) to all other nodes gives forwarding table for that node iterative: after k iterations, know least cost path to k dest.’s notation: c(x,y): link cost from node x to y; = ∞ if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitively known Network Layer

Dijsktra’s Algorithm 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N' Network Layer

Dijkstra’s algorithm: example D(v) p(v) D(w) p(w) D(x) p(x) D(y) p(y) D(z) p(z) Step N' u ∞ 7,u 3,u 5,u 1 uw ∞ 11,w 6,w 5,u 2 uwx 14,x 11,w 6,w 3 uwxv 14,x 10,v 4 uwxvy 12,y 5 uwxvyz w 3 4 v x u 5 7 y 8 z 2 9 notes: construct shortest path tree by tracing predecessor nodes ties can exist (can be broken arbitrarily) Network Layer

Dijkstra’s algorithm: another example Step 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u D(w),p(w) 5,u 4,x 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ 4,y u y x w v z 2 1 3 5 Network Layer

Dijkstra’s algorithm: example (2) resulting shortest-path tree from u: u y x w v z resulting forwarding table in u: v x y w z (u,v) (u,x) destination link Network Layer

Dijkstra’s algorithm, discussion algorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n(n+1)/2 comparisons: O(n2) more efficient implementations possible: O(nlogn) oscillations possible: e.g., support link cost equals amount of carried traffic: A A D C B given these costs, find new routing…. resulting in new costs A D C B given these costs, find new routing…. resulting in new costs A D C B given these costs, find new routing…. resulting in new costs 1 1+e 2+e 1+e 1 2+e 1+e 1 2+e 1+e 1 D B e C 1 1 e initially Network Layer

Lecture 10: outline 4.5 routing algorithms 4.1 introduction link state distance vector hierarchical routing 4.1 introduction 4.2 virtual circuit and datagram networks Network Layer

Distance vector algorithm Bellman-Ford equation (dynamic programming) let dx(y) := cost of least-cost path from x to y then dx(y) = min {c(x,v) + dv(y) } v cost from neighbor v to destination y cost to neighbor v min taken over all neighbors v of x Network Layer

Bellman-Ford example node achieving minimum is next y x w v z 2 1 3 5 clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3 B-F equation says: du(z) = min { c(u,v) + dv(z), c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 node achieving minimum is next hop in shortest path, used in forwarding table Network Layer

Distance vector algorithm Dx(y) = estimate of least cost from x to y x maintains distance vector Dx = [Dx(y): y є N ] node x: knows cost to each neighbor v: c(x,v) maintains its neighbors’ distance vectors. For each neighbor v, x maintains Dv = [Dv(y): y є N ] Network Layer

Distance vector algorithm key idea: from time-to-time, each node sends its own distance vector estimate to neighbors when x receives new DV estimate from neighbor, it updates its own DV using B-F equation: Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N under minor, natural conditions, the estimate Dx(y) converge to the actual least cost dx(y) Network Layer

Distance vector algorithm each node: iterative, asynchronous: each local iteration caused by: local link cost change DV update message from neighbor distributed: each node notifies neighbors only when its DV changes neighbors then notify their neighbors if necessary wait for (change in local link cost or msg from neighbor) recompute estimates if DV to any dest has changed, notify neighbors Network Layer

Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2 Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 3 node x table cost to cost to x y z x y z x 0 2 7 x 2 3 y from ∞ ∞ ∞ from y 2 0 1 z z ∞ ∞ ∞ 7 1 0 node y table cost to x z 1 2 7 y x y z x ∞ ∞ ∞ 2 0 1 y from z ∞ ∞ ∞ node z table cost to x y z x ∞ ∞ ∞ from y ∞ ∞ ∞ z 7 1 time Network Layer

Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2 Dx(z) = min{c(x,y)+Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 3 node x table cost to cost to cost to x y z x y z x y z x 0 2 7 x 2 3 x 0 2 3 y y from ∞ ∞ ∞ from 2 0 1 y 2 0 1 from z z ∞ ∞ ∞ 7 1 0 z 3 1 0 node y table cost to cost to x z 1 2 7 y cost to x y z x y z x y z x ∞ 2 0 1 ∞ ∞ x 0 2 7 x 0 2 3 y y from from 2 0 1 y 2 0 1 from z z ∞ ∞ ∞ 7 1 0 z 3 1 0 node z table cost to cost to cost to x y z x y z x y z x 0 2 7 x 0 2 3 x ∞ ∞ ∞ from y y 2 0 1 from y 2 0 1 from ∞ ∞ ∞ z z z 3 1 0 3 1 0 7 1 time time Network Layer

Distance vector: link cost changes node detects local link cost change updates routing info, recalculates distance vector if DV changes, notify neighbors x z 1 4 50 y t0 : y detects link-cost change, updates its DV, informs its neighbors. “good news travels fast” t1 : z receives update from y, updates its table, computes new least cost to x , sends its neighbors its DV. t2 : y receives z’s update, updates its distance table. y’s least costs do not change, so y does not send a message to z. Network Layer

Distance vector: link cost changes node detects local link cost change bad news travels slow - “count to infinity” problem! 44 iterations before algorithm stabilizes: see text x z 1 4 50 y 60 poisoned reverse: If Z routes through Y to get to X : Z tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z) will this completely solve count to infinity problem? Network Layer

Initial Step A table C table A B C D E A B C D E 3 5 2 4 A 0 5 2 3 A B cost to C table cost to A B C D E A B C D E A C B E D 3 5 2 4 A 0 5 2 3 ∞ A ∞ ∞ ∞ ∞ ∞ B from ∞ ∞ ∞ ∞ ∞ B ∞ ∞ ∞ ∞ ∞ from C ∞ ∞ ∞ ∞ ∞ C 2 4 0 4 ∞ D ∞ ∞ ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ B table cost to D table E table A B C D E cost to cost to A B C D E A B C D E A ∞ ∞ ∞ ∞ ∞ A ∞ ∞ ∞ ∞ A ∞ ∞ ∞ ∞ ∞ ∞ B 5 0 4 3 from ∞ B ∞ ∞ ∞ ∞ ∞ B from from ∞ ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ D 3 0 ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ E E 3 4 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ Initial Step Network Layer

Step 2A – Messages from other nodes table cost to C table cost to A B C D E A B C D E A C B E D 3 5 2 4 A 0 5 2 3 ∞ A ∞ ∞ ∞ ∞ ∞ B from 5 0 4 3 ∞ B from ∞ ∞ ∞ ∞ ∞ C 2 4 0 4 ∞ C 2 4 0 4 ∞ D 3 0 ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ Note: not a nearest neighbor B table cost to D table E table A B C D E cost to cost to A B C D E A B C D E A ∞ ∞ ∞ ∞ ∞ A ∞ ∞ ∞ ∞ A ∞ ∞ ∞ ∞ ∞ ∞ B 5 0 4 3 from ∞ B ∞ ∞ ∞ ∞ B ∞ ∞ from ∞ from ∞ ∞ ∞ C ∞ ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ D 3 0 ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ E ∞ ∞ E ∞ ∞ ∞ ∞ 3 4 0 ∞ Step 2A – Messages from other nodes Network Layer

Step 2A – Updating Table A cost to A B C D E A C B E D 3 5 2 4 A 0 5 2 3 ∞ B from 5 0 4 3 ∞ C 2 4 0 4 ∞ D 3 0 ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ A table cost to A B C D E A 0 5 2 3 6 B from ∞ ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ Step 2A – Updating Table A Network Layer

Step 2D – Messages from other nodes table cost to C table cost to A B C D E A B C D E A C B E D 3 5 2 4 A 0 5 2 3 ∞ A ∞ ∞ ∞ ∞ ∞ B from 5 0 4 3 ∞ B ∞ ∞ ∞ ∞ ∞ from C 2 4 0 4 ∞ C 2 4 0 4 ∞ D 3 0 ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ Note: not a nearest neighbor B table cost to D table E table A B C D E cost to cost to A B C D E A B C D E A ∞ ∞ ∞ ∞ ∞ A 0 5 2 3 ∞ A ∞ ∞ ∞ ∞ ∞ B 5 0 4 3 from ∞ B ∞ ∞ ∞ ∞ B from ∞ from ∞ ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ D 3 0 ∞ ∞ ∞ D ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ E ∞ 3 4 0 ∞ Step 2D – Messages from other nodes Network Layer

Step 2D – Updating Table D C B E D 3 5 2 4 D table cost to D table A B C D E cost to A B C D E A 0 5 2 3 ∞ A ∞ ∞ ∞ ∞ ∞ B from ∞ ∞ ∞ ∞ ∞ B ∞ ∞ ∞ ∞ from ∞ C ∞ ∞ ∞ ∞ ∞ C ∞ ∞ ∞ ∞ ∞ D 3 0 ∞ ∞ ∞ D 3 8 5 0 ∞ E ∞ ∞ ∞ ∞ ∞ E ∞ ∞ ∞ ∞ ∞ Step 2D – Updating Table D Network Layer

Comparison of LS and DV algorithms message complexity LS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors only convergence time varies speed of convergence LS: O(n2) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: DV node can advertise incorrect path cost each node’s table used by others error propagate thru network Network Layer

Manager of Network Operations Lecture 10: outline Frank Sweetser Manager of Network Operations   Network Layer

The End is Near!