Roting: Otlook Flooding Flooding Link-State: complete, global knoledge Distance-Vector: iteratie, distribted calclation Goal: To distribte a packet in the hole netork (i.e. to realie a netork-ide broadcast) Each node shold receie the packet at least once. Efficient distribtion. The destination addresses are not knon. Problems: - Copies of data packets - Old packets - Seqence nmber oerflos Broadcast: send a message on all links Flooding Algorithms Spanning Tree On message on link i: Uncontrolled flooding: - send msg on all links j!i > ccles, broadcast storm seqence nmber controlled flooding: list of receied, dplicated, forarded messages - if in list: drop msg - else send msg on all links j!i Link on ith the message as first heard = reerse path to the sorce of the message. Efficient distribtion of information (broadcast) Roting on reerse path
Roting Distribted algorithm eected among the roters hich bilds the roting tables Optimiation based on roting metric (cost): dela, hops, congestion, qalit, batter, polic, etc. Design and ealation criteria: Scalabilit Speed of conergence Stabilit Roting: G=(N,E) Nodes: Roters and Hosts (,,,...) Edges: Links beteen nodes. Each edge has a Cost associated ith it. - c(,) = 1, c(,)=2, etc. Main Problem - Calclating the path ith the loest cost from sorce to destination: D(,) = min{path: sm of all edge costs c(.,.) oer the path} 2 1 2 5 1 3 2 4 3 Link-State Roting Assmptions: Each node knos the cost of the link of each its directl connected neighbors. Basic Idea: - Eer node knos ho to reach it s neighbors. - If this information is spread to eer node ia flooding, then eer node ill hae enogh information to determine the correct path to an node in the netork. In fact, eer node ill be able to bild a complete map of the netork. - This means that eer node ill eentall hae access to the same information, as eer other node. Link-State Roting 2 Link-State protocols rel on 2 things: - Reliable spreading of link-state information (Reliable Flooding) - Calclation of paths from the sm of all the accmlated link-state knoledge > e.g., Dijkstra-Algorithm - Notation Dijkstra-Algorithm D(): cost of least-cost path from sorce to p(): preios node along the crrent least-cost path from sorce to N : sbset of nodes; is in N = least cost from sorce to definitiel knon.
Dijkstra s Algorithm Initialisation: N = {} for all nodes n if n is a neighbor of then D(n)=c(,n) else D(n)=inf Dijkstra s Algorithm Loop: find m not in N sch that D(m) is a minimm: add m to N pdate D(n) for each neighbor n of m and not in N : D(n) = min(d(n), D(m)+c(m,n)) if ne D(n): p(n) = m ntil N =N step N D(), p() D(), p() D(), p() D(), p() D(), p() step N D(), p() D(), p() D(), p() D(), p() D(), p() 0 1, 5, 2, inf inf Distance-Vector Roting Each node knos the cost of the link of each its directl connected neighbors: initial forarding table. Periodicall each node transmits their table to all their neighbors. When a node receies sch a table it calclates the distance to the nodes on the receied table. If the node discoers a shorter path to a destination node, it s on table is pdated. If the table as pdated, the ne table is immediatel sent to the neighbors, otherise the node aits for a timeot or a ne message. Bellman-Ford Eqaltion d () = min{c(, ) + d ()} : neighbor of d(): least cost rote from to as seen from c(,): link cost on link from to
Vie of a Node A nodes roting table consists of triples in the form: <destination, cost, nethop> The messages sent are (pdate)lists containing tples in the form: <destination, cost> Rotig table for node : dest cost nethop 1 3 2 3 6 Algorithm Initialisation (at node s): for all dest d in N: Ds(d) = c(s,d) for each neighbor n Dn(d) = inf for all dest d in N send distance ector Ds = [Ds(d): d in N] to n Loop (at node s): ait (ntil c(s,n) changes for some neighbor n, or ntil receie Dn from some neighbor n) for each d in N: Ds(d) = min_n{c(s,n} + Dn(d)} if Ds(d) changed for an destination d send distance ector Ds = [Ds(d): d in N] to all neighbors n Notation: s sorce d destination n neighbor Link-Cost Changes 1) : =1, =1 > adertise 2) : =2, =1 > adertise 3) conergence cont-to-infinit problem: 1) : =6, =1 LOOP!! 2) : =7, =1... 3) : =8, =1...... 45) : =50, =1 (partial) Soltion: Poisoned Reerse annonces D()=inf if it rotes throgh to get to. Detection of Bad Links Roters periodicall send control packets hich hae to be acknoledged Roter epects periodic roting pdates or Hello messages from its neighbors Roting oscillations are aoided b k of n rle: a change is onl accepted if it persists dring at least k of n periods
Distance-Vector s. Link-State The difference beteen the to algorithms can be smmaried: - D.V.: Each node onl talks to its directl connected neighbors, bt sends its entire forarding table. simple to implement, simple to configre, bad conergence, bad scaling. - L.S.: Each node talks to all other nodes, bt onl tells them hat it knos for sre (i.e., the state of its directl connected links) fast conergence, generates less traffic, fast reaction on topolog changes, bad scaling Different Approaches to Roting Proactie s. reactie roting - proactie: constantl pdate roting tables for all nodes. - reactie: find a rote on demand (hen needed). Incremental forarding s. sorce roting - incremental: roters hae a forarding table specifing the net hop. - sorce roting: the rote a packet shold take is eplicitl stored in the packet. - loose sorce roting: onl a partial rote (sbset) is specified. Smmar of Roting Algorithms Flooding/Spanning Tree Link-State neighbors send to: eerone Distance-Vector eerone send to: neighbors Problem: Does not scale for large netorks like the Internet. 200 million hosts; netork of netorks $ tracerote.eth.ch 1 r1.n.it..se (130.238.8.1) 4.772 ms 2 l-2..se (130.238.6.238) 0.457 ms 3 2-fe2.snet.se (130.242.88.17) 1.364 ms 4 ppsala2-srp2.snet.se (130.242.85.162) 2.686 ms 5 stockholm2-pos0.snet.se (130.242.82.33) 4.070 ms 6 se-kth.nord.net (193.10.252.177) 2.591 ms 7 se-o.nord.net (193.10.252.42) 2.916 ms 8 dk-g2.nord.net (193.10.68.118) 11.817 ms 9 nordnet.rt1.cop.dk.geant2.net (62.40.124.45) 12.385 ms 10 so-7-3-0.rt1.fra.de.geant2.net (62.40.112.49) 24.939 ms 11 so-6-2-0.rt1.gen.ch.geant2.net (62.40.112.21) 33.028 ms 12 sice2-10ge-1-1.sitch.ch (62.40.124.22) 33.212 ms 13 sils2-10ge-1-3.sitch.ch (130.59.37.2) 34.002 ms 14 sie2-10ge-1-1.sitch.ch (130.59.36.206) 37.455 ms 15 ro-r-g-giga-to-sitch.eth.ch (192.33.92.1) 37.761 ms...
$ tracerote.bs.ch 1 r1.n.it..se (130.238.8.1) 9.989 ms 2 l-2..se (130.238.6.238) 0.591 ms 3 2-fe2.snet.se (130.242.88.17) 1.430 ms 4 ppsala2-srp2.snet.se (130.242.85.162) 1.346 ms 5 stockholm2-pos0.snet.se (130.242.82.33) 2.607 ms 6 stockholm4-pos0.snet.se (130.242.82.50) 2.873 ms 7 pos7-7.br1.stk2.alter.net (130.242.94.118) 3.564 ms 8 so-5-0-0.tr2.stk2.alter.net (146.188.6.85) 3.280 ms 9 so-2-0-0.tr2.r3.alter.net (146.188.3.82) 32.009 ms 10 so-6-0-0.r2.r4.alter.net (146.188.5.134) 32.288 ms 11 pos2-0.g4.r4.alter.net (146.188.4.194) 31.890 ms 12 bs-g.cstomer.alter.net (146.188.66.170) 33.284 ms...