COMP 3331/9331: Computer Networks and Applications

Similar documents
DATA COMMUNICATOIN NETWORKING

CS 43: Computer Networks. 23: Routing Algorithms November 14, 2018

What is Routing? EE 122: Shortest Path Routing. Example. Internet Routing. Ion Stoica TAs: Junda Liu, DK Moon, David Zats

Chapter 4: Network Layer, partb

EE 122: Intra-domain routing

CSC 4900 Computer Networks: Routing Algorithms

Chapter 4 Network Layer. Network Layer 4-1

Chapter 4 Network Layer

Chapter 4: Network Layer

Internet rou)ng. V. Arun CS491G: Computer Networking Lab University of MassachuseFs Amherst

Chapter 5 Network Layer: The Control Plane

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

CSC 401 Data and Computer Communications Networks

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

CMPE 80N: Introduction to Networking and the Internet. Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 20

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 13

Initialization: Loop until all nodes in N

Chapter 4: Network Layer

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

CSCD 330 Network Programming Spring 2018

Interplay Between Routing, Forwarding

CSCD 330 Network Programming Spring 2017

ECE 158A: Lecture 5. Fall 2015

Routing Algorithm Classification. A Link-State Routing Algorithm

Chapter 4 Network Layer

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 14

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Chapter 4: Network Layer

Network service model. Network service model. Network Layer (part 1) Virtual circuits. By the end of this lecture, you should be able to.

Interplay between routing, forwarding

Network layer: Overview. Network layer functions Routing IP Forwarding

COMP/ELEC 429/556 Introduction to Computer Networks

Network Layer: Routing

IP Forwarding Computer Networking. Routes from Node A. Graph Model. Lecture 10: Intra-Domain Routing

Lecture 9. Network Layer (cont d) Network Layer 1-1

CSCE 463/612 Networks and Distributed Processing Spring 2018

IP Forwarding Computer Networking. Graph Model. Routes from Node A. Lecture 11: Intra-Domain Routing

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

Lecture 4. The Network Layer (cont d)

Routing. Outline. Algorithms Scalability

Review: Routing in Packet Networks Shortest Path Algorithms: Dijkstra s & Bellman-Ford. Routing: Issues

5.1 introduction 5.5 The SDN control 5.2 routing protocols plane. Control Message 5.3 intra-as routing in Protocol the Internet

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Routing. 9: Intro to Routing Algorithms. Routing. Roadmap. Routing Algorithm classification: Static or Dynamic?

EC441 Fall 2018 Introduction to Computer Networking Chapter 5: Network Layer Control Plane

Let s focus on clarifying questions. More Routing. Logic Refresher. Warning. Short Summary of Course. 10 Years from Now.

Course on Computer Communication and Networks. Lecture 7 Network Layer, Chapter 4 (6/e) - Part B (7/e Ch5)

Inter-AS routing and BGP. Network Layer 4-1

CSC 8560 Computer Networks: Control Plane

TCP/IP Networking. Part 3: Forwarding and Routing

Announcement. Project 2 extended to 2/20 midnight Project 3 available this weekend Homework 3 available today, will put it online

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 14, 2013

Network layer: Overview. Network layer functions Routing IP Forwarding

Dynamic Routing. The Protocols

Chapter IV: Network Layer

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

Computer Networks. Instructor: Niklas Carlsson

CSCE 463/612 Networks and Distributed Processing Spring 2017

Third Generation Routers

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

WAN Technology and Routing

CS 43: Computer Networks. 24: Internet Routing November 19, 2018

CSC 4900 Computer Networks: Routing Protocols

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

Graph abstraction: costs. Graph abstraction 10/26/2018. Interplay between routing and forwarding

More on Network Routing and Internet Protocol

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

COMP 631: NETWORKED & DISTRIBUTED SYSTEMS 9/6/16 COMP 631: NETWORKED & DISTRIBUTED SYSTEMS. Internet Routing. Jasleen Kaur.

Discussion 8: Link State Routing. CSE 123: Computer Networks Marti Motoyama & Chris Kanich

Routers & Routing : Computer Networking. Binary Search on Ranges. Speeding up Prefix Match - Alternatives

Chapter 4: outline. Network Layer 4-1

Network Layer. CMPS 4750/6750: Computer Networks

Chapter 4: Network Layer. TDTS06 Computer networks. Subnets. Subnets. Subnets. IP Addressing: introduction

Agenda. distance-vector (what you invented last Friday) hierarchical routing routing in the Internet. v DNS assignment Q&A v Routing Algorithms

Routing Algorithms : Fundamentals of Computer Networks Bill Nace

Network Layer: Control Plane 5-2

Computer Networking Introduction

Intra-AS Routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

CEN445 Network Protocols and Algorithms. Chapter 2. Routing Algorithms. Dr. Ridha Ouni

Computer Networking. Intra-Domain Routing. RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

Data Communications & Networks. Session 7 Main Theme Networks: Part II Circuit Switching, Packet Switching, The Network Layer

Inter-AS routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

Routing. Jens A Andersson Communication Systems

The Internet network layer

Announcements. CS 5565 Network Architecture and Protocols. Count-To-Infinity. Poisoned Reverse. Distance Vector: Link Cost Changes.

Chapter 4: Network Layer

Distance-Vector Routing: Distributed B-F (cont.)

06/02/ Local & Metropolitan Area Networks. Overview. Routing algorithm ACOE322. Lecture 6 Routing

Routing Unicast routing protocols

ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE! 1. Link state flooding topology information finding the shortest paths (Dijkstra)

Master Course Computer Networks IN2097

Chapter 4: Network Layer: Part II

Chapter 5 Network Layer: The Control Plane

Module 3 Network Layer CS755! 3-1!

Distance Vector: Link Cost Changes. Interdomain Routing. Distance Vector: Count to Infinity Problem. Distance Vector: Poisoned Reverse

Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

COMP211 Chapter 5 Network Layer: The Control Plane

Transcription:

OMP /9: omputer Networks and pplications Week 9 Network Layer: Routing Reading Guide: hapter 4: Sections 4.5 Network Layer

nnouncements v Labs Lab 4 ongestion ontrol Lab 5 Simple Router (start up for ssignment, not marked) Lab 6 Security v Mininet Help Session Monday and Tuesday, : :, Level 5 onsultation Room, SE uilding (K7) Network Layer

Network Layer: outline 4. introduction 4. virtual circuit and datagram networks 4. what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing IMP IPv6 4.5 routing algorithms link state ance vector hierarchical routing 4.6 routing in the Internet RIP OSPF GP 4.7 broadcast and multicast routing Network Layer

Interplay between routing, forwarding routing algorithm local forwarding table dest address output link address-range address-range address-range address-range 4 routing algorithm deteres end-end-path through network forwarding table deteres local forwarding at this router IP destination address in arriving packet s header Network Layer 4

ontext utonomous and System Terology (S) or omain Region of a network under a single arative entity order Routers End hosts lients, Users End points Route or Path Interior Routers Network Layer 5

Internet Routing v Internet Routing works at two levels v Each S runs an intra-domain routing protocol that establishes routes within its domain (S -- region of network under a single arative entity) Link State, e.g., Open Shortest Path First (OSPF) istance Vector, e.g., Routing Information Protocol (RIP) v Ses participate in an inter-domain routing protocol that establishes routes between domains Path Vector, e.g., order Gateway Protocol (GP) Network Layer 6

Graph abstraction 5 graph: G = (N,E) u v x w y 5 z 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) } aside: graph abstraction is useful in other network contexts, e.g., PP, where N is set of peers and E is set of TP connections Network Layer 7

ddressing (abstraction) v ssume each host has a unique I (address) v No particular structure to those Is v Earlier in course we talked about real IP addressing Network Layer 8

Graph abstraction: costs u 5 v x w y 5 z c(x,x ) = cost of link (x,x ) e.g., c(w,z) = 5 cost of path (x, x, x,, x p ) = c(x,x ) + c(x,x ) + + c(x p-,x p ) key question: what is the least-cost path between u and z? routing algorithm: algorithm that finds that least cost path Network Layer 9

Quiz: How should link costs be detered? : They should all be equal. : They should be a function of link capacity. : They should take current traffic characteristics into account (congestion, delay, etc.). : They should be manually detered by network arators. E: They should be detered in some other way. Network Layer

Link ost v Typically simple: all links are equal v Least-cost paths => shortest paths (hop count) v Network operators add policy exceptions Lower operational costs Peering agreements Security concerns Network Layer

Quiz: How much information should a router know about the network? : the next hop and cost of forwarding to its neighbour(s) Less state. : the next hop and cost of forwarding to any destination : the status and cost of every link in the network. etter decisions. : some other amount of information Network Layer

Routing Table v t a imum, the routing table at U needs to know the next hop for each possible destination Network Layer u y x w v z 5 5 est Next Hop V V X X W X Y X Z X

Routing Table est Next Hop ost (Path) 5 V V X X W X 4 Y X Z X 4 u v x w y 5 z v t a imum, the routing table at U needs to know the next hop for each possible destination v Probably want more info (e.g. path cost, may be path itself) v This is a key difference between routing & forwarding Network Layer 4

Routing algorithm classes Link State (Global) Routers maintain cost of each link in the network onnectivity/cost changes flooded to all routers onverges quickly (less inconsistency, looping, etc.) Limited network sizes istance Vector (ecentralised) Routers maintain next hop & cost of each destination. onnectivity/cost changes iteratively propagate form neighbour to neighbour Requires multiple rounds to converge Scales to large networks Network Layer 5

Network Layer: outline 4. introduction 4. virtual circuit and datagram networks 4. what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing IMP IPv6 4.5 routing algorithms link state ance vector hierarchical routing 4.6 routing in the Internet RIP OSPF GP 4.7 broadcast and multicast routing Network Layer 6

Link State Routing v Each node maintains its local link state (LS) i.e., a list of its directly attached links and their costs Host (N,N) (N,N4) (N,N5) Host Host N N N N5 Host N4 Host E N6 N7 Network Layer 7

Link State Routing v Each node maintains its local link state (LS) v Each node floods its local link state on receiving a new LS message, a router forwards the message to all its neighbors other than the one it received the message from Host Host Host (N,N) (N, N4) (N, N5) N N4 (N,N) (N, N4) (N, N5) (N,N) (N, N4) (N, N5) (N,N) (N, N4) (N, N5) (N,N) (N, N4) (N, N5) N N5 (N,N) (N, N4) (N, N5) (N,N) (N, N4) (N, N5) N (N,N) (N, N4) (N, N5) Host Host E (N,N) (N, N4) (N, N5) N6 (N,N) (N, N4) (N, N5) N7 Network Layer 8

Flooding LSs v Routers transmit Link State dvertisement (LS) on links neighbouring router forwards out on all links except incog Keep a copy locally; don t forward previously-seen LSs v hallenges Packet loss Out of order arrival v Solutions cknowledgements and retransmissions Sequence numbers Time-to-live for each packet Network Layer 9

Link State Routing v Each node maintains its local link state (LS) v Each node floods its local link state v Hence, each node learns the entire network topology an use ijkstra s to compute the shortest paths between nodes Host Host Host E E N N N E N5 E Host N4 E Host E E N6 E N7 Network Layer

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

ijsktra s lgorithm Initialization: N' = {u} for all nodes v 4 if v adjacent to u 5 then (v) = c(u,v) 6 else (v) = 7 8 Loop 9 find w not in N' such that (w) is a imum add w to N' update (v) for all v adjacent to w and not in N' : (v) = ( (v), (w) + c(w,v) ) /* new cost to v is either old cost to v or known 4 shortest path cost to w plus cost from w to v */ 5 until all nodes in N' Network Layer

Example: ijkstra s lgorithm Step 4 5 Set N (),p(), (),p() 5, (),p(), (E),p(E) (F),p(F) 5 E 5 F Initialization: N = {}; for all nodes v 4 if v adjacent to 5 then (v) = c(,v); 6 else (v) = ; Network Layer

Example: ijkstra s lgorithm Step 4 5 Set N 5 (),p(), E 5 (),p() 5, F (),p(), (E),p(E) (F),p(F) 8 Loop 9 find w not in N s.t. (w) is a imum; add w to N ; update (v) for all v adjacent to w and not in N : If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; 4 until all nodes in N ; Network Layer

Example: ijkstra s lgorithm Step 4 5 Set N 5 (),p(), E 5 (),p() 5, F (),p(), (E),p(E) (F),p(F) 8 Loop 9 find w not in N s.t. (w) is a imum; add w to N ; update (v) for all v adjacent to w and not in N : If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; 4 until all nodes in N ; Network Layer 5

Example: ijkstra s lgorithm Step 4 5 Set N 5 (),p(), E 5 (),p() 5, 4, F (),p(), (E),p(E), (F),p(F) 8 Loop 9 find w not in N s.t. (w) is a imum; add w to N ; update (v) for all v adjacent to w and not in N : If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; 4 until all nodes in N ; Network Layer 6

Example: ijkstra s lgorithm Step 4 5 Set N E 5 (),p(), E 5 F (),p() 5, 4,,E (),p(), (E),p(E), (F),p(F) 4,E 8 Loop 9 find w not in N s.t. (w) is a imum; add w to N ; update (v) for all v adjacent to w and not in N : If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; 4 until all nodes in N ; Network Layer 7

Example: ijkstra s lgorithm Step 4 5 Set N E E 5 (),p(), E 5 F (),p() 5, 4,,E (),p(), (E),p(E), (F),p(F) 4,E 8 Loop 9 find w not in N s.t. (w) is a imum; add w to N ; update (v) for all v adjacent to w and not in N : If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; 4 until all nodes in N ; Network Layer 8

Example: ijkstra s lgorithm Step 4 5 Set N E E E 5 (),p(), E 5 F (),p() 5, 4,,E (),p(), (E),p(E), (F),p(F) 4,E 8 Loop 9 find w not in N s.t. (w) is a imum; add w to N ; update (v) for all v adjacent to w and not in N : If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; 4 until all nodes in N ; Network Layer 9

Example: ijkstra s lgorithm Step 4 5 Set N E E E EF 5 (),p(), E 5 F (),p() 5, 4,,E (),p(), (E),p(E), (F),p(F) 4,E 8 Loop 9 find w not in N s.t. (w) is a imum; add w to N ; update (v) for all v adjacent to w and not in N : If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; 4 until all nodes in N ; Network Layer

Example: ijkstra s lgorithm Step 4 5 Set N E E E EF (),p(), (),p() 5, 4,,E (),p(), (E),p(E), (F),p(F) 4,E 5 E 5 F To detere path (say), work backward from p(v) Network Layer

The Forwarding Table Running ijkstra at node gives the shortest path from to all destinations We then construct the forwarding table resulting shortest-path tree from : estination Link (,) (,) F (,) E E (,) F (,) Network Layer

ijkstra s algorithm: example (v) p(v) (w) p(w) (x) p(x) (y) p(y) (z) p(z) Step N' u 7,u,u 5,u uw 6,w 5,u,w uwx 6,w,w 4,x uwxv,v 4,x 4 uwxvy,y 5 uwxvyz notes: v v construct shortest path tree by tracing predecessor nodes ties can exist (can be broken arbitrarily) u 5 x w v 4 8 7 7 4 9 y z Network Layer

Practice Problem http://gaia.cs.umass.edu/kurose_ross/interactive/dij.php Network Layer 4

Issue #: Scalability v How many messages needed to flood link state messages? O(N x E), where N is #nodes; E is #edges in graph v Processing complexity for ijkstra s algorithm? O(N ), because we check all nodes w not in S at each iteration and we have O(N) iterations more efficient implementations: O(N log(n) +E) using -heap v How many entries in the LS topology database? O(E) v How many entries in the forwarding table? O(N) Network Layer 5

Issue#: Transient isruptions v Inconsistent link-state database Some routers know about failure before others The shortest paths are no longer consistent an cause transient forwarding loops F F E Loop! E and think that this is the path to E thinks that this is the path to Network Layer 6

Oscillations oscillations possible: v e.g., support link cost equals amount of carried traffic: +e e +e +e +e +e +e +e e initially given these costs, find new routing. resulting in new costs given these costs, find new routing. resulting in new costs given these costs, find new routing. resulting in new costs Network Layer 7

Network Layer: outline 4. introduction 4. virtual circuit and datagram networks 4. what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing IMP IPv6 4.5 routing algorithms link state ance vector hierarchical routing 4.6 routing in the Internet RIP OSPF GP 4.7 broadcast and multicast routing Network Layer 8

How istance-vector (V) works estinations From node to to to Neighbour (next-hop) (, ): shortest ance from to Each router maintains its shortest ance to every destination each of its neighbours Network Layer 9

How istance-vector (V) works MIN { (,), (, ) } s ance From node vector (V) to to to to to to Each router computes its shortest ance to every destination any of its neighbors Network Layer 4

How istance-vector (V) works From node to?? to?? to?? s V to? to? to? How does initialize its () table and V? Network Layer 4

How istance-vector (V) works Link costs How does initialize its () table and V? Network Layer 4

How istance-vector (V) works From node s V to c(,) to c(,) to c(,) to c(,) to to Each router initializes its () table based on its immediate neighbors and link costs Network Layer 4

How istance-vector (V) works From node to c(,) to c(,) to s V to c(,) 5 to c(,) 6 to Each router sends its V to its immediate neighbors Network Layer 44

How istance-vector (V) works s V to 5 From node to 5 s V to 5 to 6 to 5 to to to to Routers process received Vs Network Layer 45

How istance-vector (V) works s V to 5 From node to 5 s V to 5 to 6 to 5 to to to to 7 7 new = c(,) + (, ) ) Routers process received Vs nd repeat Network Layer 46

istance Vector Routing v Each router knows the links to its neighbors v Each router has provisional shortest path to every other router -- its ance vector (V) v Routers exchange this V with their neighbors v Routers look over the set of options offered by their neighbors and select the best one v Iterative process converges to set of shortest paths Network Layer 47

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

istance Vector v v v c(i,j): link cost from node i to j Z (,V): shortest. from to V Z (,V): shortest. from to V t node Initialization: for all destinations V do if V is neighbor of 4 V (, V) = (,V) = c(,v); 5 else 6 V (, V) = (,V) = ; 7 send (, *) to all neighbors loop: 8 wait (until sees a link cost change to neighbor V /* case */ 9 or until receives (V,*) from neighbor V) /* case */ if (c(,v) changes by ±d) /* case */ for all destinations Y do V (,Y) = V (,Y) ± d else /* case : */ 4 for all destinations Y do 5 V (,Y) = c(,v) + (V, Y); 6 update (,*) 5 if (there is a change in (, *)) 6 send (, *) to all neighbors 7 forever Network Layer 49

istance Vector v v v c(i,j): link cost from node i to j Z (,V): shortest. from to V Z (,V): shortest. from to V t node Initialization: for all destinations V do if V is neighbor of 4 V (, V) = (,V) = c(,v); 5 else 6 V (, V) = (,V) = ; 7 send (, *) to all neighbors loop: 8 wait (until sees a link cost change to neighbor V /* case */ 9 or until receives (V,*) from neighbor V) /* case */ if (c(,v) changes by ±d) /* case */ for all destinations Y do V (,Y) = V (,Y) ± d else /* case : */ 4 for all destinations Y do 5 V (,Y) = c(,v) + (V, Y); 6 update (,*) 5 if (there is a change in (, *)) 6 send (, *) to all neighbors 7 forever Network Layer 5

Example: Initialization from Node to to - - - to from Node to to to to from Node to - - to to 7 to to to to 7 7 to 7 to - - from Node to 7 to to - - - to 7

Example: sends update to from Node to to - - - to from Node to to to to from Node to - - to to 7 to 7 7 to - - from Node to 7 to to - - - to 7

Example: sends update to from Node to - - to to 7 to 7 7 7

Example: sends update to from Node to - - to 8 to 7 to 8 7 7 7

Example: sends update to from Node to - - to 8 7 to 7 7 to 8 8

Example: now sends update to from Node to to - - - to from Node to to to to from Node to - - to 8 to 7 to 8 7 8 7 to - - from Node to 7 to to - - - to 7

Example: now sends update to from Node to to - - - to from Node to to to to from Node to - - to 8 to 7 to 8 7 8 7 to - - from Node to 7 to to - - - to 7

Example: now sends update to from Node to to - - - to to from Node to - - to 8 to 7 to 5 8 7 8 7 from Node from Node to to to to - - Make sure you know why this is 5, not 4! to 7 to to - - - to 7

Example: now sends update to from Node to to - - - to from Node to to to to from Node to - - to 8 to 7 to 5 8 5 7 to - - from Node to 7 to to - - - to 7

ll nodes knows the best two-hop paths. Make sure you understand why Make some sure entries you believe are still this Example: fter st Full Exchange from Node to 8 to - - - to 9 4 to from Node to - - to 8 to 7 to 5 8 5 7 from Node from Node to 5 8 to to 4 to - - to 7 to 9 4 to - - - to 4 5

Example: Now sends update to from Node to 8 to - - - to 9 4 from Node to 5 8 to to 4 5 to from Node to - - to 8 to 7 to 5 8 5 7 to - - from Node to 7 to 9 4 to - - - to 4

Example: Now sends update to This will come back to bite us from Node to 8 to - - - to 5 4 from Node to 5 8 to to 4 5 to 7 from Node to - - to 8 to 7 to 5 8 5 7 to - - from Node to 7 to 9 4 to - - - to 4

Example: heck: ll End nodes of knows nd Full the Exchange best three-hop paths. from Node to 4 8 to - - - to 5 4 from Node to 5 4 to to 4 4 to 7 from Node to - - to 8 to 7 to 4 8 4 7 heck to - - from Node to 7 6 to 9 to - - - to

No change in Vs à onvergence! Example: End of nd Full Exchange from Node to 4 7 to - - - to 5 4 from Node to 5 4 to to 4 4 to 6 from Node to - - to 8 to 7 to 4 8 4 7 to - - from Node to 7 5 to 9 to - - - to

Intuition v Initial state: best one-hop paths v One simultaneous round: best two-hop paths v Two simultaneous rounds: best three-hop paths v v Kth simultaneous round: best (k+) hop paths v Must eventually converge as soon as it reaches longest best path v..but how does it respond to changes in cost? The key here is that the starting point is not the initialization, but some other set of entries. onvergence could be different! Network Layer 65

V: Link ost hanges 4 5 Stable state - changed sends its V to, sends its V to, sends its V to, Node to 4 5 5 5 5 5 Node 4 6 6 9 6 5 5 Note: none 5 of s 5 deduct from ances paths use link (,) (,*) and (,*) 6 6 5 5 Node 5 5 5 5 5 5 5 5 54 54 5 5 5 Link cost changes here good news travels fast Network Layer 66

V: Link ost hanges 6 4 5 Stable state - changed Node to 4 5 6 5 5 5 6 5 Node 4 6 6 6 9 65 add 56 to ances (,*) and (,*) Node 5 5 54 5 5 54 Link cost changes here Network Layer 67

V: Link ost hanges This is the ounting to Infinity Problem Stable state - changed sends its V to, sends its V to, 6 4 5 sends its V to, Node 4 5 6 5 to 5 5 6 5 6 5 6 5 6 5 6 5 6 5 6 5 Node 4 6 9 6 6 65 6 6 6 6 6 8 Node 5 5 5 5 5 5 5 7 5 7 54 54 Link cost changes here bad news travels slowly (not yet converged) Network Layer 68

The Poisoned Reverse Rule v Heuristic to avoid count-to-infinity v If routes to get to : tells its ( s) ance to is infinite (so won t route to ) Network Layer 69

V: Poisoned Reverse If routes through to get to : tells its ( s) ance to is infinite 6 4 5 Stable state - changed Node 4 5 6 5 to 5 5 6 5 Node Node 4 6 9 5 5 54 6 6 65 5 5 54 Link cost changes here Network Layer 7

V: Poisoned Reverse If routes through to get to : tells its ( s) ance to is infinite 6 4 5 Stable state - changed sends its V to, sends its V to, Node 4 5 6 5 to 5 5 6 5 6 5 6 5 6 5 6 5 Node 4 6 9 6 6 65 6 6 6 6 Node 5 5 54 5 5 54 5 5 5 7 Link cost changes here Network Layer 7

V: Poisoned Reverse If routes through to get to : tells its ( s) ance to is infinite 6 4 5 Stable state - changed sends its V to, sends its V to, Node 4 5 6 5 to 5 5 6 5 6 5 6 5 6 5 6 5 Node 4 6 9 6 6 65 6 6 6 6 Node 5 5 54 5 5 54 5 5 5 6 Link cost changes here Network Layer 7

V: Poisoned Reverse If routes through to get to : tells its ( s) ance to is infinite 6 4 5 Stable state - changed sends its V to, sends its V to, sends its V to, Node 4 5 6 5 to 5 5 6 5 6 5 6 5 6 5 6 5 6 5 6 5 Node 4 6 9 6 6 65 6 6 6 6 6 5 Node 5 5 54 5 5 54 5 5 5 6 5 6 Link cost changes here onverges after receives another update from 7

Will Poison-Reverse ompletely Solve the ount-to-infinity Problem? 4 4 6 5 Numbers in blue denote the best cost to destination advertised along the link Network Layer 74

omparison of LS and V algorithms message complexity v v LS: with n nodes, E links, O(nE) msgs sent V: exchange between neighbors only convergence time varies speed of convergence v v LS: O(n ) algorithm requires O(nE) msgs may have oscillations V: 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 V: V node can advertise incorrect path cost each node s table used by others error propagate thru network Network Layer 75

Real Protocols Link State Open Shortest Path First (OSPF) Intermediate system to intermediate system (IS- IS) istance Vector Routing Information Protocol (RIP) Interior Gateway Routing Protocol (IGRP-isco) order Gateway Protocol (GP) Network Layer 76

Quiz: Routing v In this link-state routing network running ijkstra s algorithm, the set N (the set of nodes to which the least cost is definitively known) is initially {u}. fter two iterations, which nodes belong to N?. u 4. ux v w. uw u 5 4. uvx E. uwx x y 5 8 z Network Layer 77

Quiz: Routing v In link state routing, the time for routing to reconverge after a link-cost change does NOT significantly depend on which one of the following?. Number of nodes. iameter of the network. Whether the link cost increased or decreased. Whether routing is load-dependent or not Network Layer 78

Network Layer: outline 4. introduction 4. virtual circuit and datagram networks 4. what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing IMP IPv6 4.5 routing algorithms link state ance vector hierarchical routing 4.6 routing in the Internet RIP OSPF GP 4.7 broadcast and multicast routing Network Layer 79

Hierarchical routing our routing study thus far - idealization v all routers identical v network flat not true in practice scale: with 6 million destinations: v can t store all dest s in routing tables! v routing table exchange would swamp links! arative autonomy v internet = network of networks v each network ad may want to control routing in its own network Network Layer 8

Hierarchical routing v aggregate routers into regions, autonomous systems (S) v routers in same S run same routing protocol intra-s routing protocol routers in different S can run different intra- S routing protocol gateway router: v at edge of its own S v has link to router in another S Network Layer 8

utonomous Systems (S) v S is a network under a single arative control currently over, Ses Think T&T, France Telecom, UNSW, IM, etc. v Ses are sometimes called domains. Hence, interdomain routing v Each S is assigned a unique identifier 6 bit S Number (SN) Network Layer 8

Interconnected Ses c a b S a c d b Intra-S Routing algorithm S Forwarding table Inter-S Routing algorithm a c S b v forwarding table configured by both intraand inter-s routing algorithm intra-s sets entries for internal dests inter-s & intra-s sets entries for external dests Network Layer 8

Inter-S tasks v suppose router in S receives datagram destined outside of S: router should forward packet to gateway router, but which one? S must:. learn which dests are reachable through S, which through S. propagate this reachability info to all routers in S job of inter-s routing! c other networks b a S a S c d b a S c b other networks Network Layer 84

Example: setting forwarding table in router d v suppose S learns ( inter-s protocol) that subnet x reachable S (gateway c), but not S inter-s protocol propagates reachability info to all internal routers v router d deteres from intra-s routing info that its interface I is on the least cost path to c installs forwarding table entry (x,i) c x other networks b a S a S c d b a S c b other networks Network Layer 85

Example: choosing among multiple Ses v now suppose S learns from inter-s protocol that subnet x is reachable from S and from S. v to configure forwarding table, router d must detere which gateway it should forward packets towards for dest x this is also job of inter-s routing protocol! c x other networks b a S a S c d? b a S c b other networks Network Layer 86

Example: choosing among multiple Ses v now suppose S learns from inter-s protocol that subnet x is reachable from S and from S. v to configure forwarding table, router d must detere towards which gateway it should forward packets for dest x this is also job of inter-s routing protocol! v hot potato routing: send packet towards closest of two routers. learn from inter-s protocol that subnet x is reachable multiple gateways use routing info from intra-s protocol to detere costs of least-cost paths to each of the gateways hot potato routing: choose the gateway that has the smallest least cost detere from forwarding table the interface I that leads to least-cost gateway. Enter (x,i) in forwarding table Network Layer 87

Network Layer: done! 4. introduction 4. virtual circuit and datagram networks 4. what s inside a router 4.4 IP: Internet Protocol datagram format, IPv4 addressing, IMP, IPv6 4.5 routing algorithms link state, ance vector, hierarchical routing 4.6 routing in the Internet (NOT OVERE) RIP, OSPF, GP 4.7 broadcast and multicast routing (NOT OVERE) v understand principles behind network layer services: network layer service models, forwarding versus routing how a router works, routing (path selection), broadcast, multicast v instantiation, implementation in the Internet Network Layer 88