internet protocol routing algorithms internet protocol
play

Internet Protocol: Routing Algorithms Internet Protocol: Routing - PowerPoint PPT Presentation

Internet Protocol: Routing Algorithms Internet Protocol: Routing Algorithms Srinidhi Varadarajan Routing Routing Rout ing prot ocol 5 Goal: det ermine good pat h (sequence of rout ers) t hru 3 B C net work f rom source t o dest .


  1. Internet Protocol: Routing Algorithms Internet Protocol: Routing Algorithms Srinidhi Varadarajan

  2. Routing Routing Rout ing prot ocol 5 Goal: det ermine “good” pat h (sequence of rout ers) t hru 3 B C net work f rom source t o dest . 5 2 A 2 F 1 3 Graph abstraction for 1 2 D E routing algorithms: 1 � graph nodes are routers � “good” path: � graph edges are – typically means physical links minimum cost path – link cost: delay, $ cost, – other def’s possible or congestion level

  3. Routing Algorithm classification Routing Algorithm classification Global or decentralized Static or dynamic? information? Static: Global: � routes change slowly � all routers have complete topology, link cost info over time � “link state” algorithms Dynamic: Decentralized: � routes change more � router knows physically- quickly connected neighbors, link costs to neighbors – periodic update � iterative process of – in response to link computation, exchange of info with neighbors cost changes � “distance vector” algorithms

  4. A Link- -State Routing Algorithm State Routing Algorithm A Link Dijkstra’s algorithm Notation: � net topology, link costs � c(i,j): link cost from node i known to all nodes to j. cost infinite if not – accomplished via “link direct neighbors state broadcast” � D(v): current value of cost – all nodes have same of path from source to info dest. V � computes least cost paths � p(v): predecessor node from one node (‘source”) along path from source to to all other nodes v, that is next v – gives routing table for � N: set of nodes whose that node least cost path definitively � iterative: after k iterations, known know least cost path to k dest.’s

  5. Dijsktra’s Algorithm Algorithm Dijsktra’s 1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v) 6 else D(v) = infty 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

  6. Dijkstra’s algorithm: example algorithm: example Dijkstra’s Step D(B),p(B) D(C),p(C) D(D),p(D) D(E),p(E) start N D(F),p(F) 0 2,A 5,A 1,A infinity A infinity 1 2,A 4,D 2,D AD infinity 2 2,A 3,E ADE 4,E 3 3,E ADEB 4,E 4 ADEBC 4,E 5 ADEBCF 5 3 B C 5 2 A 2 F 1 3 1 2 D E 1

  7. Dijkstra’s algorithm, discussion algorithm, discussion Dijkstra’s Algorithm computational complexity: n nodes � each iteration: need to check all nodes, w, not in N � n*(n+1)/2 comparisons: O(n 2 ) � more efficient implementations possible: – O(nlogn): Use a heap (sorted) to maintain interim table Oscillations possible: � e.g., link cost = amount of carried traffic A A A A 1 1+e 2+e 0 2+e 0 2+e 0 D B D B D B D 0 B 0 1+e 1 0 0 1+e 1 e 0 0 0 1 e 1+e 0 C C C C 1 1 e … recomput e …recomput e … recomput e init ially rout ing

  8. Link State: Reliable Flooding Link State: Reliable Flooding � Link State routers exchange information using Link State Packets (LSP). � LSP contains – id of the node that created the LSP – cost of the link to each directly connected neighbor – sequence number (SEQNO) – time-to-live (TTL) for this packet � Reliable flooding – store most recent LSP from each node – forward LSP to all nodes but one that sent it – generate new LSP periodically • increment SEQNO – start SEQNO at 0 when reboot – decrement TTL of each stored LSP • discard when TTL=0

  9. Distance Vector Routing Algorithm Distance Vector Routing Algorithm iterative: Distance Table data structure � continues until no nodes exchange info. � each node has its own � self-terminating : no � row for each possible “signal” to stop destination asynchronous: � column for each directly- attached neighbor to node � nodes need not exchange info/iterate in lock step! distributed: � each node communicates only with directly-attached neighbors

  10. Distance Table: example Distance Table: example cost to destination via 1 E B C D () A B D 7 A 2 8 A 1 14 1 5 E D 2 B 7 8 5 destination E D D (C,D) c(E,D) + min {D (C,w)} = w C 6 9 4 = 2+2 = 4 E D D (A,D) c(E,D) + min {D (A,w)} = w D 4 11 2 = 2+3 = 5 loop! E B D (A,B) c(E,B) + min {D (A,w)} = w = 8+6 = 14 loop!

  11. gives routing table Distance table gives routing table Distance table cost to destination via E Outgoing link D () A B D to use, cost A 1 14 5 A A,1 B 7 8 5 destination B D,5 destination C 6 9 4 C D,4 D 4 11 2 D D,4 Rout ing t able Dist ance t able

  12. Distance Vector Routing: overview Distance Vector Routing: overview Iterative, asynchronous: Each node: each local iteration caused by: � local link cost change wait for (change in local link � message from neighbor: cost of msg from neighbor) its least cost path change from neighbor Distributed: recompute distance table � each node notifies neighbors only when its least cost path to any if least cost path to any dest destination changes has changed, notify – neighbors then notify their neighbors if neighbors necessary

  13. Distance Vector: link cost changes Distance Vector: link cost changes Link cost changes: 1 � node detects local link cost change Y 4 1 � updates distance table (line 15) X Z � if cost change in least cost path, 50 notify neighbors (lines 23,24) “good algor it hm news t erminat es t ravels f ast ”

  14. Distance Vector: link cost changes Distance Vector: link cost changes Link cost changes: 60 � good news travels fast Y 4 1 � bad news travels slow - X Z “count to infinity” 50 problem! algor it hm cont inues on!

  15. Distance Vector: poisoned reverse Distance Vector: poisoned reverse 60 If Z routes through Y to get to X : Y 4 1 � Z tells Y its (Z’s) distance to X is X Z infinite (so Y won’t route to X via Z) 50 � Does not work on larger loops algor it hm t erminat es

  16. Comparison of LS and DV algorithms Comparison of LS and DV algorithms Robustness: what happens if Message complexity router malfunctions? � LS: with n nodes, with an LS: average of l links/node, each – node can advertise node sends O(nl). Total incorrect link cost messages O(n 2 l) – each node computes only � DV: exchange between its own table neighbors only DV: – convergence time varies – DV node can advertise – may be routing loops incorrect path cost – count-to-infinity problem – each node’s table used by others • error propagate thru network

  17. Hierarchical Routing Hierarchical Routing Our routing study thus far -idealization � all routers identical � network “flat” … not true in practice administrative autonomy scale: with 50 million � internet = network of destinations: networks � can’t store all dest’s in � each network admin may routing tables! want to control routing in its � routing table exchange own network would swamp links!

  18. Hierarchical Routing Hierarchical Routing gat eway rout ers � aggregate routers into regions, “autonomous � special routers in AS systems” (AS) � run intra-AS routing protocol with all other � routers in same AS routers in AS run same routing � also responsible for protocol routing to destinations – “intra-AS” routing outside AS protocol – run inter-AS routing – routers in different AS protocol with other can run different intra- gateway routers AS routing protocol

  19. Why different Intra- - and Inter and Inter- -AS routing ? AS routing ? Why different Intra Policy: � Inter-AS: admin wants control over how its traffic is routed and who routes through its net. � Intra-AS: single admin, so no policy decisions needed Scale: � hierarchical routing saves table size, reduced update traffic Performance: � Intra-AS: can focus on performance � Inter-AS: policy may dominate over performance

  20. Intra- -AS and Inter AS and Inter- -AS routing AS routing Intra C.b Gat eways: B.a •perf orm int er-AS A.a rout ing amongst b c A.c t hemselves a a C b •perf orm int ra-AS a B rout ers wit h ot her d c rout ers in t heir b A AS net work layer int er-AS, int ra-AS link layer rout ing in physical layer gat eway A.c

  21. Intra- -AS and Inter AS and Inter- -AS routing AS routing Intra I nt er-AS rout ing C.b bet ween B.a A and B A.a Host b h2 c A.c a a C b a B Host d I nt ra-AS rout ing c h1 b A wit hin AS B I nt ra-AS rout ing wit hin AS A

  22. Routing in the Internet Routing in the Internet � The Global Internet consists of Autonomous Systems (AS) interconnected with each other: – Stub AS : small corporation – Multihomed AS : large corporation (no transit) – Transit AS : provider � Two-level routing: – Intra-AS: administrator is responsible for choice – Inter-AS: unique standard

  23. Internet AS Hierarchy Internet AS Hierarchy I nt ra-AS border (ext erior gat eway) rout ers I nt er-AS int erior (gat eway) rout ers

Recommend


More recommend