IP orwarding - omputer Networking Lecture : Intra-omain Routing RIP (Routing Information Protocol) & OSP (Open Shortest Path irst) The Story So ar IP addresses are structure to reflect Internet structure IP packet headers carry these addresses When Packet rrives at Router xamine header to determine intended destination Look up in table to determine next hop in path Send packet out appropriate port This/next lecture How to generate the forwarding table Router 9/8/ Lecture : Intra-omain Routing Graph Model Routes from Represent each router as node irect link between routers represented by edge Symmetric links undirected graph dge cost c(x,y) denotes measure of difficulty of using link delay, $ cost, or congestion level Task etermine least cost path from every node to every other node Path cost d(x,y) = sum of link costs 9/8/ Lecture : Intra-omain Routing orwarding Table for est ost Next Properties Some set of shortest paths forms tree Shortest path spanning tree Solution not unique.g., ---- also has cost 9/8/ Lecture : Intra-omain Routing
Ways to ompute Shortest Paths entralized ollect graph structure in one place Use standard graph algorithm isseminate routing tables Link-state very node collects complete graph structure ach computes shortest paths from it ach generates own routing table istance-vector No one has copy of graph s construct their own tables iteratively ach sends information about its table to neighbors Outline istance Vector Link State Routing Hierarchy 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing istance-vector Method istance-vector Update Initial Table for est ost Next Idea t any time, have cost/next hop of best known path to destination Use cost when no path known Initially Only have entries for directly connected nodes 9/8/ Lecture : Intra-omain Routing c(x,z) x z d(z,y) d(x,y) Update(x,y,z) d c(x,z) + d(z,y) # ost of path from x to y with first hop z if d < d(x,y) # ound better path return d,z # Updated cost / next hop else return d(x,y), nexthop(x,y) # xisting cost / next hop 9/8/ Lecture : Intra-omain Routing 8 y
9/8/ Lecture : Intra-omain Routing 9 lgorithm ellman-ord algorithm Repeat or every node x or every neighbor z or every destination y d(x,y) Update(x,y,z) Until converge 9/8/ Lecture : Intra-omain Routing Start Table for st st Table for st st Table for st st Table for st st Table for st st Table for st st Optimum -hop paths 9/8/ Lecture : Intra-omain Routing Iteration # Table for st st Table for st st Table for st st Table for st st Table for st st Table for st st Optimum -hop paths 9/8/ Lecture : Intra-omain Routing Iteration # Table for st st Table for st st Table for st st Table for st st Table for st st Table for st st Optimum -hop paths
istance Vector: Link ost hanges istance Vector: Link ost hanges Link cost changes: detects local link cost change Updates distance table If cost change in least cost path, notify neighbors X Y Z Link cost changes: Good news travels fast ad news travels slow - count to infinity problem! X Y Z good news travels fast algorithm terminates algorithm continues on! 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing istance Vector: Split Horizon istance Vector: Poison Reverse If Z routes through Y to get to X : Z does not advertise its route to X back to Y??? X Y Z algorithm terminates 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) liminates some possible timeouts with split horizon Will this completely solve count to infinity problem? X Y Z algorithm terminates 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing
Poison Reverse ailures Routing Information Protocol (RIP) Table for st st Table for st st Table for st st Table for st st 8 orced Update etter Route Table for st Table for st 9 orced Update Table for st st Table for st st orced Iterations don t converge Update st st ount to infinity Table for orced Solution st st Update Make infinity smaller Table for What is upper bound on st st orced maximum path length? Update 9 9/8/ Lecture : Intra-omain Routing arliest IP routing protocol (98 S) urrent standard is version (R ) eatures very link has cost Infinity = Limits to networks where everything reachable within hops Sending Updates very router listens for updates on UP port RIP message can contain entries for up to table entries 9/8/ Lecture : Intra-omain Routing 8 RIP Updates Initial When router first starts, asks for copy of table for every neighbor Uses it to iteratively generate own table Periodic very seconds, router sends copy of its table to each neighbor Neighbors use to iteratively update their tables Triggered When every entry changes, send copy of entry to neighbors xcept for one causing update (split horizon rule) Neighbors use to update their tables RIP Staleness / Oscillation ontrol Small Infinity ount to infinity doesn t take very long Route Timer very route has timeout limit of 8 seconds Reached when haven t received update from next hop for periods If not updated, set to infinity Soft-state refresh important concept!!! ehavior When router or link fails, can take minutes to stabilize 9/8/ Lecture : Intra-omain Routing 9 9/8/ Lecture : Intra-omain Routing
Outline istance Vector Link State Routing Hierarchy Link State Protocol oncept very node gets complete copy of graph very node floods network with data about its outgoing links very node computes routes to every other node Using single-source, shortest-path algorithm Process performed whenever needed When connections die / reappear 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing Sending Link States by looding ijkstra s lgorithm X Wants to Send Information Sends on all outgoing links When Y Receives Information from Z Send on all links other than Z X (a) X (c) X (b) X (d) Given Graph with source node s and edge costs c(u,v) etermine least cost path from s to every node v Shortest Path irst lgorithm Traverse graph in order of least cost from source 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing
ijkstra s lgorithm: oncept ijkstra s lgorithm: Initially Horizon Sets one lready have least cost path to it Horizon: Reachable in hop from node in one Unseen: annot reach directly from node in one one Label d(v) = path cost rom s to v Path Keep track of last link in path 9/8/ Lecture : Intra-omain Routing Unseen urrent Path osts No nodes done in horizon one Horizon 9/8/ Lecture : Intra-omain Routing Unseen urrent Path osts ijkstra s lgorithm: Initially ijkstra s lgorithm one Horizon urrent Path osts Unseen one Horizon urrent Path osts Unseen d(v) to node shown in red Only consider links from done nodes 9/8/ Lecture : Intra-omain Routing Select node v in horizon with minimum d(v) dd link used to add node to shortest path tree Update d(v) information 9/8/ Lecture : Intra-omain Routing 8
ijkstra s lgorithm ijkstra s lgorithm one Horizon urrent Path osts Unseen one Unseen urrent Path osts Horizon Repeat Update d(v) values an cause addition of new nodes to horizon 9/8/ Lecture : Intra-omain Routing 9 9/8/ Lecture : Intra-omain Routing ijkstra s lgorithm Link State haracteristics inal tree shown in green With consistent LSs*, all nodes compute consistent loop-free paths an still have transient loops *Link State ata ase X Packet from may loop around if knows about failure and & do not 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing 8
OSP Routing Protocol Open Open standard created by IT Shortest-path first nother name for ijkstra s algorithm More prevalent than RIP OSP Reliable looding Transmit link state advertisements Originating router Typically, minimum IP address for router Link I I of router at other end of link Metric ost of link Link-state age Incremented each second Packet expires when reaches Sequence number Incremented each time sending new link information 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing OSP looding Operation X Receives LS from Y With Sequence Number q Looks for entry with same origin/link I ases No entry present dd entry, propagate to all neighbors other than Y ntry present with sequence number p < q Update entry, propagate to all neighbors other than Y ntry present with sequence number p > q Send entry back to Y To tell Y that it has out-of-date information ntry present with sequence number p = q Ignore it 9/8/ Lecture : Intra-omain Routing looding Issues When should it be performed Periodically When status of link changes etected by connected node What happens when router goes down & back up Sequence number reset to Other routers may have entries with higher sequence numbers Router will send out LSs with number Will get back LSs with last valid sequence number p Router sets sequence number to p+ & resends 9/8/ Lecture : Intra-omain Routing 9
doption of OSP RIP viewed as outmoded Good when networks small and routers had limited memory & computational power OSP dvantages ast convergence when configuration changes 9/8/ Lecture : Intra-omain Routing omparison of LS and V lgorithms Message complexity LS: with n nodes, links, O(n) messages V: exchange between neighbors only Speed of onvergence LS: omplex computation ut can forward before computation may have oscillations V: convergence time varies may be routing loops count-to-infinity problem (faster with triggered updates) Space requirements: LS maintains entire topology V maintains only neighbor state 9/8/ Lecture : Intra-omain Routing 8 omparison of LS and V lgorithms 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 errors propagate thru network Other tradeoffs Making LSP flood reliable Outline istance Vector Link State Routing Hierarchy 9/8/ Lecture : Intra-omain Routing 9 9/8/ Lecture : Intra-omain Routing
Routing Hierarchies lat routing doesn t scale Storage ach node cannot be expected to store routes to every destination (or destination network) onvergence times increase ommunication Total message count increases Key observation Need less information with increasing distance to destination Need lower diameters networks Solution: area hierarchy reas ivide network into areas reas can have nested sub-areas Hierarchically address nodes in a network Sequentially number top-level areas Sub-areas of area are labeled relative to that area s are numbered relative to the smallest containing area 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing Routing Hierarchy rea Hierarchy ddressing rea-order Router ackbone reas Lower-level reas.......... Partition Network into reas Within area ach node has routes to every other node Outside area ach node has routes for other top-level areas only Inter-area packets are routed to nearest appropriate border router onstraint: no path between two sub-areas of an area can exit that area.... 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing
Path Sub-optimality Next Lecture: GP an result in sub-optimal paths.... start end.... How to connect together different ISPs.. hop red path vs. hop green path.. 9/8/ Lecture : Intra-omain Routing 9/8/ Lecture : Intra-omain Routing RIP Table Processing XTR SLIS RIP routing tables managed by application-level process called route-d (daemon) advertisements sent in UP packets, periodically repeated The rest of the slides are YI 9/8/ Lecture : Intra-omain Routing 8
ijsktra s lgorithm ijkstra s algorithm: example Initialization: N = {} for all nodes v if v adjacent to then (v) = c(,v) else (v) = infinity 8 Loop 9 find w not in N such that (w) is a minimum add w to N update (v) for all v adjacent to w and not in N: (v) = min( (v), (w) + c(w,v) ) /* new cost to v is either old cost to v or known shortest path cost to w plus cost from w to v */ until all nodes in N Step start N (),p(),,, (),p(),,,, (),p(), (),p() infinity, (),p() infinity infinity,,, 9/8/ Lecture : Intra-omain Routing 9 9/8/ Lecture : Intra-omain Routing