Routing - Route computation/ routing table construction...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Route computation/ routing table construction Routing protocol Goal: determine “good” path (sequence of routers) thru network from source to dest. Graph abstraction for routing algorithms: graph nodes are routers graph graph edges are physical graph links link cost: delay, $ cost, or link congestion level 2 1 5 3 3 1 B 2 C 1 5 A F 2 D E “good” path: typically means minimum cost typically path other def s possible other possible Note: Routing actually contains 2 major components: Info exchange and route computation to construct Routing Table at each router -Info this is what routing protocols are for ! Actual forwarding of packets by the router to the correct o/p port based on Routing Actual Table and packet header -- longest prefix match/ packet classification etc. Routing Algorithm classification Global or Partial information? Global network info: all routers have complete all network topology, link cost info “link state” algorithms Partial network info: router knows physicallyrouter connected neighbors, link costs to neighbors iterative process of iterative computation, exchange of info with neighbors “distance vector” algorithms Static or dynamic? Static: routes change slowly over routes time Dynamic: routes change more quickly routes periodic update periodic in response to link cost in changes Centralized or Distributed ? Link-State Routing: Key Tasks Each router is responsible for meeting its neighbors and learning Each their names Each router constructs a packet known as a link state packet (LSP) Each link which contains a list of names of and cost to each of its neighbors The LSP is somehow transmitted (via flooding) to all other routers, The somehow transmitted and each router stores the most recently generated LSP from each the LSP other router in the whole network. Each router, now armed with a complete map of the network Each topology (yielded from the information carried in the LSPs which provides the complete knowledge of the graph), computes routes to each destination Link-State Routing task 1: Meeting the neighbors On point-to-point link, neighbors meet each other by sending On special “Hello” and/or “Keep-alive” messages to each other On shared/broadcast media, e.g. N routers connecting to a LAN On such as Ethernet, additional mechanism to elect a “designated” router for the LAN to reduce the N(N-1)/2 router-to-router peering to N router-to-designated-router peering. The designated router is responsible to generate the LSP The capturing the router-to-router connection with the LAN and send the LSP to the outside world. Link-State Routing task 2: Constructing LSP After the identities of neighbors are known, the information is there, After it is just a matter of formatting the info. A router generates an LSP periodically as well as when: router It has a new neighbor (via Hello messages) It The cost of the link to an existing neighbor has changed. The A link to a neighbor has been broken (gone down). link Due to stability concern, few routing protocols change its link cost Due dynamically according to network loading, delay, packet-loss etc. Others, e.g. OSPF, IS-IS, have pre-configured link cost, which will Others, be effectively changed to Infinity if the connection of that link is In if broken. Link-State Routing task 3: Disseminating LSPs to ALL Routers Use “flooding” for robustness, and avoid “chicken-and-egg” problem. Use After a link changes state, it requires some time for updated knowledge After of the link-state to propagate throughout the network. Due to delay in LSP propagation via the network, routers can have Due different sets of LSPs => during this transient period, different views of a network held by different routers and routes may become non-functional => A lot of complexity of Link-State routing protocols is for ensuring the consistency of LSP databases held by all routers. Use timestamps (i.e. seq. # and aging scheme) on LSP to distinguish Use between old and new ones. Accept (and flood) OR discard newly arrived LSPs by comparing its Accept timestamp with that of the currently held LSP. LSP distribution can become cancerous due to the seq.# wrap around LSP problems. (This did cause an ARPANET meltdown!!) Link-State Routing task 4: Computing Routes Each Router use its LSP database to construct its view of network Each topology and link-costs Based on its own view, a router computes least cost paths from Based itself (“the source”) to all other nodes (potential destinations) using, e.g. Dijkstra s Shortest Path First algorithm, and then for Shortest each dest., pick the next-hop, i.e. outgoing interface Why conventional IP routing always use shortest-path-based route Why selection ? Why can t we use non-shortest-path-based routing ? we This is due to the per-hop forwarding/routing decision used by This IP routing. Even with per-hop forwarding/routing decision, Shortest Path Even based routing can still guarantee “progress” towards the destination, not so for non-shortest-path-based routing. Computing Routes (cont d) Why can t we use non-shortest-path ? Router B All Link Cost = 1 Router A Host Router C Possible Oscillations with Dynamic link costs For example, link cost = amount of carried traffic For D 1 1 0 A 00 1+e e B 1 2+e A 1+e 1 D 0 0 C e 0 B D 0 1 A 00 2+e 1+e B 2+e A 1+e 1 D 0 e C C 0 B C initially … recompute routing … recompute … recompute Distance Vector Routing Algorithm: Key Ideas Each node maintains the distance from itself to each possible Each destination, this is the so-called “distance vector” (DV) The distances are computed using the info in neighbor s DV. The DV. Neighbors exchange their DVs from time to time upon some events Neighbors some events Events that cause recalculation: Events Receipt from a neighbor of a DV containing different info than Receipt before Discovery that a link to a neighbor has gone down. In such Discovery case, the DV from that neighbor is discarded before the local DV is recalculated. If the recalculation lead to changes in local DV, send the new If local DV to the neighbors. Otherwise, no need to re-distribute Distance Vector Routing Algorithm: Steps Initially, each router is configured with its own I.D. and costs of Initially, attached links Each router starts with a DV consisting of a distance of zero to itself Each and distance of infinity for every other unknown destinations (initial, the known dests. include only the neighbors, more dest. will be learned later from DVs of neighbors) Each router transmits its DV to each of its neighbor whenever the Each whenever the DV info changes (as well as when a link to a neighbor first comes up and probably also periodically) Each router saves the most recently received DV from each of its Each neighbor Each router calculates its own DV based on minimizing the cost to Each each dest., by examining the cost to that dest. Reported by each neighbor in turn and then adding the configured cost of the link to that neighbor. =>This actually corresponds to the distributed computation of Shortest Path using the Bellman-Ford Shortest Path algorithm Bellman-Ford Shortest Distance Vector Routing Algorithm iterative: continues until no nodes continues exchange info. self-terminating: no self-terminating “signal” to stop asynchronous: nodes need not nodes not exchange info/iterate in lock step! distributed: each node each communicates only with only with directly-attached neighbors Distance Table data structure each node has its own each row for each possible destination row column for each directly-attached column neighbor to node example: in node X, for dest. Y via example: neighbor Z: distance from X to = Y, via Z as next hop = c(X,Z) + minw{D (Y,w)} Z D (Y,Z) X Distance Table: example B 8 1 1 A 7 C 2 D () A D E cost to destination via A 1 7 6 4 B 14 8 9 11 D 5 5 4 2 E 2 D destination D (C,D) = c(E,D) + minw {D (C,w)} = 2+2 = 4 E B C D D (A,D) = c(E,D) + minw {D (A,w)} D (A,B) E = 2+3 = 5 loop! = c(E,B) + minw {D (A,w)} = 8+6 = 14 loop! B E D Distance table gives routing table D () A destination E cost to destination via A 1 7 6 4 B 14 8 9 11 D 5 destination Outgoing link to use, cost A B C D A,1 D,5 D,4 D,2 B C D 5 4 2 Distance table Routing table Distance Vector Routing: overview Iterative, asynchronous: each local iteration caused by: local link cost change local message from neighbor: its message least cost path change from neighbor Distributed: each node notifies neighbors each only when its least cost path when to any destination changes neighbors then notify neighbors their neighbors if necessary Each node: wait for (change in local link cost of msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Distance Vector Algorithm: example X 2 Y 7 1 Z D (Z,Y) = c(X,Y) + minw {D (Z,w)} = 2+1 = 3 X Y D (Y,Z) = c(X,Z) + minw{D (Y,w)} = 7+1 = 8 X Z Distance Vector Algorithm: example 2 Y 7 1 X Z Distance Vector Algorithm: At all nodes, X: 1 Initialization: 2 for all adjacent nodes v: 3 DX(*,v) = infty /* the * operator means "for all rows" */ X 4 D (v,v) = c(X,v) 5 for all destinations, y X 6 send min D (y,w) to each neighbor /* w over all X's neighbors */ w Distance Vector Algorithm (cont.): 8 loop 9 wait (until I see a link cost change to neighbor V 10 or until I receive update from neighbor V) 11 12 if (c(X,V) changes by d) 13 /* change cost to all dest's via neighbor v by d */ 14 /* note: d could be positive or negative */ 15 for all destinations y: DX(y,V) = DX(y,V) + d 16 17 else if (update received from V wrt destination Y) 18 /* shortest path from V to some Y has changed */ 19 /* V has sent a new value for its minw DV(Y,w) */ 20 /* call this received new value is "newval" */ 21 for the single destination y: DX(Y,V) = c(X,V) + newval 22 23 if we have a new minw DX(Y,w)for any destination Y 24 send new value of min w DX(Y,w) to all neighbors 25 26 forever Distance Vector: link cost changes Link cost changes: node detects local link cost change node updates distance table (line 15) updates if cost change in least cost path, notify if neighbors (lines 23,24) 1 X 4 Y 50 1 Z “good news travels fast” algorithm terminates Distance Vector: link cost changes Link cost changes: good news travels fast good bad news travels slow bad “count to infinity” problem! 60 X 4 Y 50 1 Z algorithm continues on! Distance Vector: poisoned reverse If Z routes through Y to get to X : Z tells Y its (Z s) distance to X is infinite tells s) (so Y won t route to X via Z) route will this completely solve count to infinity will problem? 60 X 4 Y 50 1 Z algorithm terminates Comparison of LS and DV algorithms Message complexity LS: with n nodes, E links, O(nE) LS: with msgs sent DV: message exchange between message neighbors only Actual # of msg exchanged after a Actual link state change depends on scenario Speed of Convergence Speed LS: O(n**2) algorithm requires LS: O(n**2) O(nE) msgs may have oscillations if use may dynamic link-weight. Robustness: what happens if router malfunctions? LS: node can advertise incorrect link node link cost which will be used by all other nodes to compute their own tables own tables DV: DV node can advertise incorrect DV path cost cost each node s table used by each table others =>error propagate thru network Both algorithm can be completely Both disabled by a single router not following the rules !! DV: convergence time varies DV may have routing loops may count-to-infinity problem count-to-in Hierarchical Routing Our routing study thus far - idealization all routers identical all network “flat” network … not true in practice true scale: with 50 million destinations: can t store all dest s in can store in routing tables! routing table exchange routing would swamp links! Routing tables actually Routing stored dest. Network prefixes!! (not necessary dest addr.) administrative autonomy internet = network of networks internet each network admin may want each to control routing in its own network A view of the Internet An interconnections of Autonomous Systems (AS), each An belongs to its individual administrative domain ; Inter-domain routing across AS es es Hierarchical Routing aggregate routers into aggregate regions, “autonomous systems” (AS) routers in same AS run routers same routing protocol “intra-AS” routing protocol routers in different AS routers can run different intra-AS routing protocol gateway routers special routers in AS special run intra-AS routing run protocol with all other routers in AS also responsible for also responsible routing to destinations outside AS run inter-AS routing run inter-AS protocol with other gateway routers Intra-AS (or Intra-Domain) and Inter-AS (or Inter-Domain) routing C.b b d A A.a A.c a b c a B B.a c Gateways: •perform inter-AS routing amongst themselves •perform intra-AS b routers with other routers in their AS a C network layer inter-AS, intra-AS routing in gateway A.c link layer physical layer Intra-AS and Inter-AS routing C.b b A.a a Inter-AS routing between A and B A.c d c b A Intra-AS routing within AS A B.a a c B b Host h2 a Host h1 C Intra-AS routing within AS B Two level routing: Intra-AS: administrator is responsible for choice Inter-AS: unique standard Why different Intra- and Inter-AS routing ? Policy: Inter is concerned with policies (which provider we must Policy select/avoid, etc). Intra is contained in a single organization, so, no policy decisions necessary Scale: Inter provides an extra level of routing table size and Scale routing update traffic reduction above the Intra layer Performance: Intra is focused on performance metrics; needs Performance to keep costs low. In Inter it is difficult to propagate performance metrics efficiently (latency, privacy etc). Besides, policy related information is more meaningful. We need BOTH! BOTH Common Routing Protocols in the Internet Intra-Domain (within AS) routing protocols [a.k.a. Interior Gateway Intra-Domain Protocols (IGPs)] RIP(Ver 2): Routing Information Protocol (DV) RIP(Ver OSPF: Open Shortest Path First (LS + 2-level hierarchical structure OSPF: inside a Domain (AS) + enhancements) IS-IS: Intermediate System--Intermediate System (LS + multipleIS-IS: level tree hierarchical structure inside a Domain (AS) + enhancements) EIGRP: Enhanced Interior Gateway Routing Protocol (Cisco EIGRP: proprietary.) (DV + loop-prevention enhancements (DUAL) + linkcost can be configured to be static or dynamic w.r.t. network loading, delay, packet loss etc) Inter-Domain (among ASes) routing protocols [a.k.a. Exterior Gateway Inter-Domain Protocols (EGPs)] Dominated by BGP: Border Gateway Protocol Version 4 (Path Dominated Vector-based) The Intra Domain and Inter Domain Routing protocols need to The cooperate to achieve end-to-end routing History of Internet Routing Protocols 1st routing protocols used Distance Vector Routing. This includes 1st DECnet, the “old” ARPANET routing protocol and RIP Ver 1 [RFC1058] 1st Link State Protocol was the ARPANET “new” routing protocol. The 1st 2nd was DECnet Phase V s routing alg. designed by Radia Perlman. routing DECnet Phase V alg. + enhancements becomes IS-IS, adopted by ISO DECnet at around 1988 IETF wanted a similar LS protocol for IP and eventually created OSPF IETF Ross Callon pointed out IS-IS could easily be extended to support IP Ross routing, but was a hard-sell to IETF to accept an ISO-adopted protocol IETF/IAB declared OSPF the winner (i.e. they recommend OSPF for IETF/IAB Intradomain routing) It took years to debug/deploy OSPF while IS-IS had been there all along It In the meantime, most big U.S. ISPs use IS-IS (even as of today) while In customers lived with RIP until OSPF became ready/stable in 90 s. s. Recently, IETF has revived interest in IS-IS and launched a working Recently, group for it The Rivalry between IS-IS and OSPF has led to continuous The improvements of quality of both ...
View Full Document

This note was uploaded on 12/08/2010 for the course IEG IEG3310 taught by Professor Wingc.lau during the Spring '10 term at CUHK.

Ask a homework question - tutors are online