@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.

Slides:



Advertisements
Similar presentations
What is “Routing”? Routing algorithm that part of the network layer responsible for deciding on which output line to transmit an incoming packet Adaptive.
Advertisements

13 –Routing Protocols Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
Lecture 8 Overview. Graph abstraction u y x wv z Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v),
Routing - I Important concepts: link state based routing, distance vector based routing.
Data Communication and Networks Lectures 8 and 9 Networks: Part 2 Routing Algorithms and Routing Protocols October 26, November 2, 2006.
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.
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.
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,
Routing Algorithms and Routing in the Internet
CPSC441: Routing1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 hours.
Network Layer4-1 Chapter 4: Network Layer, partb The slides are adaptations of the slides available by the main textbook authors, Kurose&Ross.
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)
1 Announcement #1 r Did you all receive homework #1 and #2? r Homework #3 will be available online during the day r Midterm.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 18.
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
1 CSCD 330 Network Programming Spring 2014 Lecture 16 Network Layer Routing Protocols Reading: Chapter 4 Some slides provided courtesy of J.F Kurose and.
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.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 The slides are adaptation.
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.
Computer Networks CSE 434 Fall 2009 Sandeep K. S. Gupta Arizona State University Research Experience.
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)
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
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.
CSE 421 Computer Networks. Chapter 4 Network Layer Thanks to you All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer.
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
Network Layer Introduction Datagram networks IP: Internet Protocol
Distance Vector Routing: overview
2017 session 1 TELE3118: Network Technologies Week 7: Network Layer Control Plane: Intra-Domain Routing Some slides have been adapted from: Computer Networking:
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.
Chapter 4-4 routing and IP routing
ECE453 – Introduction to Computer Networks
CS4470 Computer Networking Protocols
Chapter 4: Network Layer
Network Layer (contd.) Routing
Chapter 4: Network Layer
Network Layer: Link-state and Distance-Vector Routing Protocols
Chapter 4: Network Layer
CSCD 330 Network Programming
Chapter 4 Network Layer A note on the use of these ppt slides:
Presentation transcript:

@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 original slides that accompany the book “Computer Networking, A Top-Down Approach” All material copyright J.F Kurose and K.W. Ross, All Rights Reserved CS 283Computer Networks Spring 2011 Instructor: Yuan Xue

@Yuan Xue Chapter 4: Network Layer Outline Overview and Service Model 4. 1 Introduction 4.2 Virtual circuit and datagram networks Principle 4.5 Routing algorithms  Link state  Distance Vector Practice (in the context of Internet) 4.4 IP: Internet Protocol  IP packet format/Fragmentation  IP address/DHCP/NAT Routing and Forwarding in Internet  Packet Forwarding  4.6 Routing protocols in Internet Hierarchical Routing Intra-AS Routing: RIP/OSPF Inter-AS Routing: BGP Implementation 4.3 What’s inside a router Broadcast and multicast routing

@Yuan Xue Network layer application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical Deal with internetworking (multi-hop network)

@Yuan Xue Network Layer Service Models Datagram (connectionless) and VC (connection) Principle Addressing  How to define ID? Aspect to consider? (Routing. Management, Scalability)  How to get an address for a device (router, host) Routing  Given a network (graph), which path(s) to use?  Can I get a path in a distributed way? Forwarding  If I know the path, how to deliver the packets along this path (in a distributed way?) Deal with heterogeneous local area networks  Fragmentation/reassembly

@Yuan Xue Network Layer Deal with internetworking (multi-hop network) Service Models Principle Routing Practice (in the context of Internet) Deal with heterogeneous local area networks  Fragmentation/IP packet format Addressing  IP address/NAT/DHCP Routing and forwarding in Internet  RIP/OSPF/BGP Router Design More than just unicast Multicast and Broadcast (both principle/practice)

@Yuan Xue Routing Algorithm Network Model Simple graph model Graph with traffic/capacity information Routing Objective Simple graph model  Minimum cost (each link is associated with a cost)  Shortest path (cost = number of hop) In simple graph model, the link cost is independent of the traffic routed on the link With capacity/traffic (beyond simple cost metric)  Maximum throughput  Minimum congestion  Minimum delay Our focus is on the simple graph model (minimum cost routing)  traffic-related objective (Minimum delay, maximum throughput) can be sometimes incorporated into a link cost, but special care has to be made. (more details later)

@Yuan Xue u y x wv z Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) } Graph Model Remark: Graph abstraction is useful in other network contexts Example: P2P, where N is set of peers and E is set of TCP connections

@Yuan Xue Graph Model: costs u y x wv z c(x,x’) = cost of link (x,x’) - e.g., c(w,z) = 5 cost could always be 1, or inversely related to bandwidth, or inversely related to congestion Cost of path (x 1, x 2, x 3,…, x p ) = c(x 1,x 2 ) + c(x 2,x 3 ) + … + c(x p-1,x p ) Question: What’s the least-cost path between u and z ? Routing algorithm: algorithm that finds least-cost path

@Yuan Xue Routing Algorithm Centralized  Link-state: Dijkstra Distributed  Distance-vector: Bellman-Ford Linear/nonlinear optimization algorithms (advance topic, not covered in this class)  Deal with traffic-related objective Maximum throughput Minimum congestion Minimum delay

@Yuan Xue Routing Protocol What information needs to be distributed? Distance vector (RIP) vs. Link state (OSPF) Who does the job? Source vs. Hop-by-hop routing  Differ in how path information is provided during packet forwarding Source routing (used in small networks such as ad hoc wireless networks)  Each packet carries in its header the complete, ordered list of the addresses of the nodes through which the packet will be routed  Intermediate nodes do not need to maintain up-to-date routing table  Packet header can be large, introducing overhead in packet forwarding Hop-by-hop routing (used in Internet)  Information required for packet forwarding is stored in the forwarding tables at intermediate nodes  Overhead in maintaining the routing/forwarding table

@Yuan Xue Chapter 4: Network Layer Outline Overview and Service Model 4. 1 Introduction 4.2 Virtual circuit and datagram networks Principle 4.5 Routing algorithms  Link state  Distance Vector Practice (in the context of Internet) 4.4 IP: Internet Protocol  IP packet format/Fragmentation  IP address/DHCP/NAT Routing and Forwarding in Internet  Packet Forwarding  4.6 Routing protocols in Internet Hierarchical Routing Intra-AS Routing: RIP/OSPF Inter-AS Routing: BGP Implementation 4.3 What’s inside a router Broadcast and multicast routing

@Yuan Xue A Link-State Routing Algorithm Dijkstra’s algorithm Information known: Each node knows global network topology + link costs all nodes have same global network information accomplished via “link state broadcast” Route computation: Each node computes the route independently computes least cost paths from one node (‘source”) to all other nodes Iterative algorithm Derives the forwarding table for that node

@Yuan Xue 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 If D(v) changed, p(v) = w 14 /* new cost to v is either old cost to v or known 15 shortest path cost to w plus cost from w to v */ 16 until all nodes in N' u y x wv z 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 Step 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

@Yuan Xue Dijkstra’s algorithm u y x wv z Resulting shortest-path tree from u: v x y w z (u,v) (u,x) destination link Resulting forwarding table in u: Step 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

@Yuan Xue 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(n 2 ) Efficient implementation possible in finding the minimum cost candidate (line 9) Oscillations possible with congestion sensitive routing e.g., link cost = amount of carried traffic Example below: D  A; C  A; B  A Solution Make link cost independent from traffic asynchronous route computation A D C B 1 1+e e 0 e A D C B 2+e e 1 A D C B 0 2+e 1+e A D C B 2+e 0 e 0 1+e 1 initially … recompute routing … recompute

@Yuan Xue Chapter 4: Network Layer Outline Overview and Service Model 4. 1 Introduction 4.2 Virtual circuit and datagram networks Principle 4.5 Routing algorithms  Link state  Distance Vector Practice (in the context of Internet) 4.4 IP: Internet Protocol  IP packet format/Fragmentation  IP address/DHCP/NAT Routing and Forwarding in Internet  Packet Forwarding  4.6 Routing protocols in Internet Hierarchical Routing Intra-AS Routing: RIP/OSPF Inter-AS Routing: BGP Implementation 4.3 What’s inside a router Broadcast and multicast routing

@Yuan Xue 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) = min {c(x,v) + d v (y) } where min is taken over all neighbors v of x v

@Yuan Xue Bellman-Ford example u y x wv z Clearly, d v (z) = 5, d x (z) = 3, d w (z) = 3 d u (z) = min { c(u,v) + d v (z), c(u,x) + d x (z), c(u,w) + d w (z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 Node that achieves minimum is next hop in shortest path  Forward table B-F equation says:

@Yuan Xue Distance Vector Algorithm Distance Vector D x (y) = estimate of least cost from x to y x maintains distance vector D x = [D x (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 D v = [D v (y): y є N ] Derives its own distance vectors and records the neighbor which achieves minimum as next hop in the forwarding table

@Yuan Xue Distance vector algorithm Basic 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: D x (y) ← min v {c(x,v) + D v (y)} for each node y ∊ N  under minor, natural conditions, the estimate D x (y) converge to the actual least cost d x (y)

@Yuan Xue Distance Vector Algorithm 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 Each node:

@Yuan Xue x y z x y z ∞∞∞ ∞∞∞ from cost to from x y z x y z 0 from cost to x y z x y z ∞∞ ∞∞∞ cost to x y z x y z ∞∞∞ 710 cost to ∞ ∞ ∞ ∞ time x z y node x table node y table node z table D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0, 7+1} = 2 D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{2+1, 7+0} = 3 32

@Yuan Xue x y z x y z ∞∞∞ ∞∞∞ from cost to from x y z x y z from cost to x y z x y z from cost to x y z x y z ∞∞ ∞∞∞ cost to x y z x y z from cost to x y z x y z from cost to x y z x y z from cost to x y z x y z from cost to x y z x y z ∞∞∞ 710 cost to ∞ ∞ ∞ time x z y node x table node y table node z table D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0, 7+1} = 2 D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{2+1, 7+0} = 3

@Yuan Xue Distance Vector: link cost changes Link cost changes:  node detects local link cost change  updates routing info, recalculates distance vector  if DV changes, notify neighbors “good news travels fast” x z y 1 t 0 : y detects link-cost change, updates its DV, informs its neighbors. t 1 : z receives update from y, updates its table, computes new least cost to x, sends its neighbors its DV. t 2 : 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.

@Yuan Xue Distance Vector: link cost changes Link cost changes:  good news travels fast  bad news travels slow - See the example  “count to infinity” problem 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) x z y Dy(x) = 6 (via z) Routing loop! 2. Dz(x) = 7 (via y) 3. Dv(x) = 8 (via z) …..need 44 (once z realizes xz with cost 50 is the way to go) iterations to stabilize What if the cost >> 50?  count to infinity!

@Yuan Xue Comparison of LS and DV algorithms LS: Need global network topology/state Centralize algorithm: each node computes only its own table independently Two steps: topology/state information distribution  route computation. DV: Need only local (neighbor) information (distance vector, neighbor link cost) Distributed/collaborative algorithm: each node’s calculation depends on other nodes' calculation Integrated message exchange and route computation

@Yuan Xue 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(n 2 ) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may have oscillations 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