Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Network Layer: Routing Distributed, Distance Vector Protocols Y. Richard Yang 4/11/2016.

Similar presentations


Presentation on theme: "1 Network Layer: Routing Distributed, Distance Vector Protocols Y. Richard Yang 4/11/2016."— Presentation transcript:

1 1 Network Layer: Routing Distributed, Distance Vector Protocols Y. Richard Yang http://zoo.cs.yale.edu/classes/cs433/ 4/11/2016

2 Admin. r Exam 1 grading issue m Please stop by Monday/Wednesday 7:30-8:30 pm office hours to fix any issues r Assignment 3 design share m Wednesday at beginning of class r Assignment 4 issues r Projects 2

3 3 Recap: Primal-Dual Decomposition of Network-Wide Resource Allocation r SYSTEM(U): r USER f : r NETWORK:

4 4 Recap: Network Layer r Transport packet from source to dest. r Network layer in every host, router Basic function: m determine route taken by packets of a flow, and move the packets (potentially with QoS) along the route

5 5 Recap: Routing r Typically routing can be formulated as a graph problem r Routing has a large design space m who decides routing? source routing network routing –distributed vs (logically) centralized m what does routing compute shortest path or QoS aware m how many paths does routing compute? multi-path or single path routing m will routing adapt to network traffic demand? adaptive or static routing A E D CB F 2 2 1 3 1 1 2 5 3 5

6 6 r Routing has a large design space m who decides routing? source routing: end hosts make decision  network routing: networks make decision - (applications such as overlay and p2p are trying to bypass it) m what does routing compute  shortest path (mostly, plus policy routing) QoS aware m how many paths does routing compute? multi-path routing  single path routing (with small amount of multipath) m will routing adapt to network traffic demand? adaptive routing  static routing (mostly static; adjust in larger timescale) m … - Robustness - Optimality - Simplicity Routing Design Space: Internet

7 7 Alternative: Dynamic Link Costs r Assume link costs reflect current traffic D A B C 0 2+e 1+e 1 0 0 t=2 Solution: Link costs are a combination of current traffic intensity (dynamic) and topology (static). To improve stability, the static topology part should be large. Thus less sensitive to traffic; thus non-adaptive. D A B C 2+e 0 0 0 1+e 1 t=1 0 Link costs reflect current traffic intensity D A B C 1 1+e e 0 e 1 1 0 0 t=0 0 0 D A B C 2+e 0 e 0 1+e 1 t=3 0 D A B C e 1 1

8 Example: Cisco Proprietary Recommendation on Link Cost r Link metric: m metric = [K1 * bandwidth -1 + (K2 * bandwidth -1 ) / (256 - load) + K3 * delay] * [K5 / (reliability + K4)] By default, k1=k3=1 and k2=k4=k5=0. The default composite metric for EIGRP, adjusted for scaling factors, is as follows: EIGRP : Enhanced Interior Gateway Routing Protocol 8 BW min is in kbps and the sum of delays are in 10s of microseconds.

9 Example: EIGRP Link Cost r The bandwidth and delay for an Ethernet interface are 10 Mbps and 1 ms, respectively. r The calculated EIGRP BW metric is as follows: m 256 × 10 7 /BW = 256 × 10 7 /10,000 m = 256 × 10000 m = 256000 9 A E D CB F 2 2 1 3 1 1 2 5 3 5

10 Roadmap: Routing Computation Architecture Spectrum Distance Vector 10 Datapath Distributed Bellman Ford Distributed Link State Dijkstra Logically Central Link State Control Datapath Distributed Bellman Ford Datapath Distributed Link State Dijkstra Dijkstra Link State SDN notification/ management/ control protocol

11 11 Outline  Admin and recap  Routing computation  Distributed distance vector protocols

12 Distance Vector Routing r Setting: static (positive) costs assigned to network links o The static link costs may be adjusted in a longer time scale: this is called traffic engineering r Goal: distributed computing to compute the shortest path from a source to a destination o Based on the Bellman-Ford algorithm (BFA) o Conceptually, runs for each destination separately r Realization m Basis of RIP, IGRP, EIGRP routing protocols A E D CB F 2 2 1 3 1 1 2 5 3 5

13 13 Distance Vector Routing: Basic Idea r At node i, the basic update rule where - d i denotes the distance estimation from i to the destination, - N(i) is set of neighbors of node i, and - d ij is the distance of the direct link from i to j i j destination

14 14 Outline  Network overview  Routing computation  Distance vector protocols  synchronous Bellman-Ford (SBF)

15 15 Synchronous Bellman-Ford (SBF) r Nodes update in rounds: m there is a global clock; m at the beginning of each round, each node sends its estimate to all of its neighbors; m at the end of the round, updates its estimation A E D CB 7 8 10 2 1 2 A B E C D

16 16 Outline

17 17 r Initialization (time 0): A E D CB 7 8 1010 2 1 2

18 18 Example A E D CB 7 8 1010 2 1 2 A B C E D d(0) Consider D as destination; d(t) is a vector consisting of estimation of each node at round t d(1)d(2) 12 3 2 2 0 d(3) 10 3 2 2 0 d(4) 10 3 2 2 0

19 19 A Nice Property of SBF: Monotonicity

20 20  Claim: d i (h) is the length L i (h) of a shortest path from i to the destination using ≤ h hops m base case: h = 0 is trivially true  assume true for ≤ h, i.e., L i (h)= d i (h), L i (h-1)= d i (h-1), …

21 21  consider ≤ h+1 hops: since d i (h) ≤ d i (h-1)

22 22 Bellman Equation

23 23 Uniqueness of Solution to BE 1 1 1 1 Dest. A E D CB 7 8 1010 2 1 2 2 2 3 10

24 24 Uniqueness of Solution to BE

25 25 Outline

26 26 SBF at another Initial Configuration: SBF/-1 r Initialization (time 0): A E D CB 7 8 1010 2 1 2

27 27 Example A E D CB 7 8 1010 2 1 2 A B C E D d(0) -1 -1 -1 -1 0 Consider D as destination d(1) 6 0 0 2 0 d(2) 7 1 1 2 0 d(3) 8 2 2 2 0 d(4) 9 3 3 2 0 d(5) 10 3 3 2 0 d(6) 10 3 3 2 0

28 28 Bellman Equation and Correctness of SBF/-1 r SBF/-1 converges due to monotonicity r At equilibrium, SBF/-1 satisfies the set of equations called Bellman equations (BE) where d D = 0. r Another solution is shortest path solution d* r 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?

29 29 Outline  Network overview  Routing computation  Distance vector protocols o synchronous Bellman-Ford (SBF)  asynchronous Bellman-Ford (ABF)

30 Asynchronous Bellman-Ford (ABF) r No notion of global iterations m each node updates at its own pace r Asynchronously each node i computes using last received value d i j from neighbor j. r Asynchronously node j sends its estimate to its neighbor i: m there is an upper bound on the delay of estimate packet (no worry for out of order)

31 Asynchronous Bellman-Ford (ABF) r In general, nodes are using different and possibly inconsistent estimates i j dijdij djdj didi

32 Distance Table: Example A E D CB 7 8 1010 2 1 2 d () A B C D E distance tables from neighbors destinations computation E’s distance table distance table E sends to its neighbors A: 10 B: 8 C: 4 D: 2 E: 0 Below is just one step! The protocol repeats forever! A B D 10 8 2 A: 10 B: 8 D: 4 D: 2

33 Asynchronous Bellman-Ford (ABF) r ABF will eventually converge to the shortest path m links can go down and come up – but if topology is stabilized after some time t, ABF will eventually converge to the shortest path ! r If the network is connected, then ABF converges in finite amount of time, if conditions are met

34 ABF Convergence

35 System State i j where can distance estimate from node j appear?

36 System State didi dj dijdij dijdij three types of distance estimates from node j: - d j : current distance estimate at node j - d i j : last d j that neighbor i received - d i j : those d j that are still in transit to neighbor i

37 ABF Convergence r Consider the time when the topology is stabilized as time 0 r U(0) and L(0) provide upper and lower bound at time 0 on all corresponding elements of states  L j (0) ≤ d j ≤ U j (0) for all d j state at node j  L j (0) ≤ d i j ≤ U j (0)  L j (0) ≤ update messages d i j ≤ U j (0)

38 ABF Convergence rdjrdj m after at least one update at node j: d j falls between L j (1) ≤ d j ≤ U j (1) r d i j : m eventually all d i j that are only bounded by L j (0) and U j (0) are replaced with in L j (1) and U j (1) didi dj dijdij dijdij

39 Asynchronous Bellman-Ford: Summary r Distributed: each node communicates its routing table to its directly-attached neighbors r Iterative: continues periodically or when link changes, e.g. detects a link failure r Asynchronous: nodes need not exchange info/iterate in lock step! r Convergence in finite steps, independent of initial condition if network is connected

40 40 Summary: Distributed Distance-Vector r Tool box: a key technique for proving convergence (liveness) of distributed protocols: monotonicity m Consider two configurations d(t) and d’(t): if d(t) <= d’(t), then d(t+1) <= d’(t+1) m Identify two extreme configurations to sandwich any real configurations

41 Properties of Distance-Vector Algorithms r Good news propagate fast

42 Properties of Distance-Vector Algorithms r Bad news propagate slowly r This is called the counting-to-infinity problem Question: why does counting-to-infinity happen?

43 The Reverse-Poison (Split-horizon) Hack A E D CB 7 8 1 2 1 2 D () A B C D E distance tables from neighbors destinations computation E’s distance table 1, A 8, B 4, D 2, D distance table E sends to its neighbors distance through neighbor If the path to dest is through neighbor h, report ∞ to neighbor h for dest.

44 Implementation: RIP ( Routing Information Protocol) r Distance vector r Included in BSD-UNIX Distribution in 1982 r Link cost: 1 r Distance metric: # of hops r Distance vectors m exchanged every 30 sec via Response Message (also called advertisement) using UDP m each advertisement: route to up to 25 destination nets

45 RIP (Routing Information Protocol) Destination Network Next Router Num. of hops to dest. wA2 yB2 zB7 x--1 ….…..... w xy z A C I B Routing table in I...

46 RIP: Link Failure and Recovery If no advertisement heard after 180 sec --> neighbor/link declared dead m routes via neighbor invalidated m new advertisements sent to neighbors m neighbors in turn send out new advertisements (if tables changed) m link failure info quickly propagates to entire net m reverse-poison used to prevent ping-pong loops m set infinite distance = 16 hops (why?)

47 An Example Where Split-horizon Fails 1 1 1 1


Download ppt "1 Network Layer: Routing Distributed, Distance Vector Protocols Y. Richard Yang 4/11/2016."

Similar presentations


Ads by Google