450 likes | 651 Views
Distance Vector Routing Protocols. Apr. 5, 2012. Control protocols error reporting e.g. ICMP. Control protocols - router “ signaling ” e.g. RSVP. Network layer protocol (e.g., IP) addressing conventions packet format packet handling conventions. Routing protocols path selection
E N D
Distance Vector Routing Protocols Apr. 5, 2012
Control protocols • error reportinge.g. ICMP Control protocols - router “signaling”e.g. RSVP • Network layer protocol (e.g., IP) • addressing conventions • packet format • packet handling conventions • Routing protocols • path selection • e.g., RIP, OSPF, BGP forwarding Recap: Internet Network Layer Protocols Transport layer Network layer Link layer physical layer
5 3 5 2 2 1 3 1 2 1 A D E B F C Routing Recap: Routing Goal: determine “good” paths (sequences of routers) thru network from source to dest. Graph abstraction for the routing problem: • graph nodes are routers • graph edges are physical links • links have properties: delay, capacity, $ cost, policy
Basis of RIP, IGRP, EIGRP routing protocols Positive costs assigned to network links Distributedshortestrouting conceptually, runs for each destination separately hence we consider one dest only state: each node maintains a current estimate to the destination di denotes the distance estimation from node i to dest update rule: based on Bellman-Ford alg. 5 3 5 2 2 1 3 1 2 1 A D B E F C Distance Vector Routing
At node i, the basic update rule where - di denotes the distance estimation from i to the destination, - N(i) is set of neighbors of node i, and - dij is the distance of the direct link from i to j Distance Vector Routing: Update destination j i
A D E B C Synchronous Bellman-Ford (SBF) 1 7 2 8 10 2 • Nodes update in rounds: • there is a global clock; • at the beginning of each round, each node sends its estimate to dest to all of its neighbors; • at the end of the round, updates its estimation A B E C D
Outline • Network overview • Control plane: routing overview • Distance vector protocols • synchronous Bellman-Ford (SBF) • - SBF/
A D E B C SBF/ 1 7 2 8 10 2 • Initialization (time 0):
1 7 2 8 10 2 1232 2 0 2 2 0 1032 2 0 1032 2 0 0 d(0) d(4) d(2) d(3) d(1) A D B E C Example Consider D as destination; d(t) is a vector consisting of estimation of each node at round t A B C E D Observation: d(0) d(1) d(2) d(3) d(4) =d*
A Nice Property of SBF: Monotonicity • Consider two configurations d(t) and d’(t) • If d(t) d’(t) • i.e., each node has a higher estimate in d than in d’, • then d(t+1) d’(t+1) • i.e., each node has a higher estimate in d than in d’ after one round of synchronous update.
Correctness of SBF/ • Claim: di(h) is the length Li(h) of a shortest path from i to the destination using ≤ h hops • base case: h = 0 is trivially true • assume true for ≤ h, i.e., Li(h)=di(h), Li(h-1)=di(h-1), …
since di(h) ≤ di(h-1) Correctness of SBF/ • consider ≤ h+1 hops:
Bellman Equation • We referred to the equations as Bellman equations (BE): where dD = 0. • SBF/ solves the equations in a distributed way • Does the equation have a unique solution (i.e., the shortest path one)?
1 7 2 8 10 2 A D E B C 1 1 1 1 Uniqueness of Solution to BE • Assume another solution d, we will show that d = d* case 1: we show d d* Since d is a solution to BE, we can construct paths as follows: for each i, pick a j which satisfies the equation; since d* is shortest, d d* 2 3 Dest. 10 2
Uniqueness of Solution to BE Case 2: we show d ≤ d* assume we run SBF with two initial configurations: • one is d • another is SBF/ (d), -> monotonicity and convergence of SBF/ imply that d ≤ d*
Outline • Network overview • Control plane: routing overview • Distance vector protocols • synchronous Bellman-Ford (SBF) • SBF/ • SBF/-1
A D E B C SBF at another Initial Configuration: SBF/-1 1 7 2 8 10 2 • Initialization (time 0):
1 7 2 8 10 2 -1-1 -1 -1 0 103 3 2 0 9 3 3 2 0 8 2 2 2 0 7 1 1 2 0 6 0 0 2 0 103 3 2 0 d(5) d(4) d(3) d(6) d(1) d(0) d(2) A D B E C Example Consider D as destination A B C E D Observation: d(0) d(1) d(2) d(3) d(4) d(5) = d(6) = d*
Bellman Equation and Correctness of SBF/-1 • SBF/-1 converges due to monotonicity • At equilibrium, SBF/-1 satisfies the set of equations called Bellman equations (BE) where dD = 0. • Another solution is shortest path solution d* • Since there is a unique solution to the BE equations; thus SBF/-1 converges to shortest path Question: will SBF converge under other non-negative initial conditions? Problems of running synchronous BF?
Outline • Network overview • Control plane: routing overview • Distance vector protocols • synchronous Bellman-Ford (SBF) • asynchronous Bellman-Ford (ABF)
Asynchronous Bellman-Ford (ABF) • No notion of global iterations • each node updates at its own pace • Asynchronously each node i computes using last received value dij from neighbor j. • Asyncrhonously node j sends its estimate to its neighbor i: • there is an upper bound on the delay of estimate packets (no worry for out of order)
j i Asynchronous Bellman-Ford (ABF) • In general, nodes are using different andpossibly inconsistent estimates dj dij di
1 distance table E sends to its neighbors 7 A: 10 B: 8 C: 4 D: 2 E: 0 2 8 10 2 A D E B C Distance Table: Example Below is just one step! The protocol repeats forever! distance tablesfrom neighbors computation E’s distance table d () A B C D A B D A B D E 10 15 0 7 A: 10 B: 8 7 0 17 8 destinations D: 4 1 2 9 4 0 2 D: 2 10 8 2
Asynchronous Bellman-Ford (ABF) • ABF will eventually converge tothe shortest path • links can go down and come up – but if topology is stabilized after some timet, ABF will eventually converge to theshortest path ! • Ifthe network is connected, then ABF converges in finite amount of time, if conditions are met
ABF Convergence • There are too many different “runs” of ABF, so need to use monotonicity • Consider two sequences: • SBF/; call the sequence U() • SBF/-1; call the sequence L()
j i System State where can distance estimate from node j appear?
dj di System State • three types of distance estimates from node j: • dj: current distance estimate at node j • - dij: last dj that neighbor i received • - dij: those dj that are still in transit to neighbor i dij dij
ABF Convergence • Consider the time when the topology is stabilized as time 0 • U(0) and L(0) provide upper and lower bound at time 0 on all corresponding elements of states • Lj (0) ≤ dj≤ Uj (0) for all dj state at node j • Lj (0) ≤ dij≤ Uj (0) • Lj (0) ≤ update messages dij≤ Uj (0)
dj di ABF Convergence • dj • after at least one update at node j: dj falls between Lj (1) ≤ dj ≤ Uj (1) • dij : • eventually all dij that are only bounded by Lj (0) and Uj (0) are replaced with inLj(1) and Uj(1) dij dij
Distributed:each node communicates its routing table to its directly-attached neighbors Iterative:continues periodically or when link changes, e.g. detects a link failure Asynchronous:nodes need not exchange info/iterate in lock step! Convergence in finite steps, independent of initial condition if network is connected Asynchronous Bellman-Ford: Summary
Properties of Distance-Vector Algorithms • Good news propagate fast
Properties of Distance-Vector Algorithms • Bad news propagate slowly (link A-B broke) • This is called the counting-to-infinity problem Question: why does counting-to-infinity happen?
What is a Routing Loop? • A routing loop is a global state (consisting of the nodes’ local states) at a global moment (observed by an oracle) such that there exist nodes A, B, C, … E such that A (locally) thinks B as down stream, B thinks C as down stream, … E thinks A as down stream • Counting-to-infinity because of routing loops
1 7 2 8 1 2 A D E B C The Reverse-Poison (Split-horizon) Hack If the path to dest is through neighbor h, report to neighbor h for dest. distance tables from neighbors computation E’s distance table distance table E sends to its neighbors E D () A B C D A 0 7 1 c(E,A) B 7 0 1 8 c(E,B) A 1 8 D 2 0 2 c(E,D) B 15 8 9 D 4 2 1, A 8, B 4, D 2, D To B A: 1 B: C: 4 D: 2 E: 0 To A A: B: 8 C: 4 D: 2 E: 0 To D A: 1 B: 8 C: D: E: 0 destinations distance through neighbor
An Example Where Split-horizon Fails 1 1 1 1 • When the link between C and D fails, C will set its distance to D as • However, unfortunate timing can cause problem • A receives the bad news () from C, A will use B to go to D • A sends the news to C • C sends the news to B Question: what is the routing loop formed?
Example: RIP ( Routing Information Protocol) • Distance vector • Included in BSD-UNIX Distribution in 1982 • Link cost: 1 • Distance metric: # of hops • Distance vectors • exchanged every 30 sec via Response Message (also called advertisement) using UDP • each advertisement: route to up to 25 destination nets
RIP (Routing Information Protocol) z ... w x y A I B C Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B 7 x -- 1 …. …. .... Routing table in I
RIP: Link Failure and Recovery If no advertisement heard after 180 sec --> neighbor/link declared dead • routes via neighbor invalidated • new advertisements sent to neighbors • neighbors in turn send out new advertisements (if tables changed) • link failure info quickly propagates to entire net • reverse-poison used to prevent ping-pong loops • set infinite distance = 16 hops (why?)
EIGRP Neighbor Discovery • EIGRP routers actively establish relationships with their neighbors • EIGRP routers establish adjacencies with neighbor routers by using small hello packets. • The Hello protocol uses a multicast address of 224.0.0.10, and all routers periodically send hellos.
EIGRP Neighbor Discovery • On hearing hellos, the router creates a table of its neighbors. • The continued receipt of these packets maintains the neighbor table By forming adjacencies, EIGRP routers do the following: • Dynamically learn of new routes that join their network • Identify routers that become either unreachable or inoperable • Rediscover routers that had previously been unreachable
Using Virtual Circuit to Implement Network Services • In order to provide some functionalities, a network may choose virtual circuit, e.g., Virtual Private Network (VPN)
Using Datagram to Implement the Most Basic Network Service • A datagram network generally provides simple services: the forwarding of packets from src to dest. • We will focus on datagram networks which provide best effort service • extensions to provide more services will be discussed in the multimedia networking part of the course