15 744 Computer Networking L5 IntraDomain Routing Srinivasan

  • Slides: 59
Download presentation
15 -744: Computer Networking L-5 Intra-Domain Routing © Srinivasan Seshan, 2001 LH-1; 1 -15

15 -744: Computer Networking L-5 Intra-Domain Routing © Srinivasan Seshan, 2001 LH-1; 1 -15 -00

Intra-Domain Routing • Routing algorithms • • Distance vector routing – challenges Link state

Intra-Domain Routing • Routing algorithms • • Distance vector routing – challenges Link state routing How to make routing adapt to load • How to make routing scale • Assigned reading • • [KZ 89] The revised ARPANET routing metric © Srinivasan Seshan, 2001 L -5; 1 -29 -01 2

Factors Affecting Routing algorithms view the network as a graph • Problem: find lowest

Factors Affecting Routing algorithms view the network as a graph • Problem: find lowest cost path between two nodes • Factors • • Static topology Dynamic load Policy © Srinivasan Seshan, 2001 A 1 3 4 C L -5; 1 -29 -01 6 1 B 9 E 2 F 1 D 3

Outline • Distance vector routing – challenges • Link state routing • Routing metrics

Outline • Distance vector routing – challenges • Link state routing • Routing metrics • Routing hierarchy © Srinivasan Seshan, 2001 L -5; 1 -29 -01 4

The Bouncing Effect dest B C cost 1 2 dest cost 1 X A

The Bouncing Effect dest B C cost 1 2 dest cost 1 X A B 1 1 1 25 C dest cost A B © Srinivasan Seshan, 2001 A C L -5; 1 -29 -01 2 1 5

C Sends Routes to B dest B C cost 1 2 dest cost A

C Sends Routes to B dest B C cost 1 2 dest cost A B ~ 1 1 25 C dest cost A B © Srinivasan Seshan, 2001 A C L -5; 1 -29 -01 2 1 6

B Updates Distance to A dest B C cost 1 2 dest cost A

B Updates Distance to A dest B C cost 1 2 dest cost A B 3 1 1 25 C dest cost A B © Srinivasan Seshan, 2001 A C L -5; 1 -29 -01 2 1 7

B Sends Routes to C dest B C dest cost 1 2 A B

B Sends Routes to C dest B C dest cost 1 2 A B 3 1 1 25 C dest cost A B © Srinivasan Seshan, 2001 A C L -5; 1 -29 -01 4 1 8

C Sends Routes to B dest B C cost 1 2 dest cost A

C Sends Routes to B dest B C cost 1 2 dest cost A B 5 1 1 25 C dest cost A B © Srinivasan Seshan, 2001 A C L -5; 1 -29 -01 4 1 9

How are These Loops Caused? • Observation 1: • • B’s metric increases Observation

How are These Loops Caused? • Observation 1: • • B’s metric increases Observation 2: • • C picks B as next hop to A But, the implicit path from C to A includes itself! © Srinivasan Seshan, 2001 L -5; 1 -29 -01 10

Solution 1: Holddowns • If metric increases, delay propagating information • • In our

Solution 1: Holddowns • If metric increases, delay propagating information • • In our example, B delays advertising route C eventually thinks B’s route is gone, picks its own route B then selects C as next hop Adversely affects convergence © Srinivasan Seshan, 2001 L -5; 1 -29 -01 11

Other “Solutions” • Split horizon • • Poisoned reverse • • C does not

Other “Solutions” • Split horizon • • Poisoned reverse • • C does not advertise route to B C advertises route to B with infinite distance Works for two node loops • Does not work for loops with more nodes © Srinivasan Seshan, 2001 L -5; 1 -29 -01 12

Example Where Split Horizon Fails When link breaks, C marks D as unreachable and

Example Where Split Horizon Fails When link breaks, C marks D as unreachable and reports that to A and B • Suppose A learns it first • 1 A B • 1 1 • C X 1 D © Srinivasan Seshan, 2001 A now thinks best path to D is through B A reports D unreachable to B and a route of cost=3 to C C thinks D is reachable through A at cost 4 and reports that to B • B reports a cost 5 to A who reports new cost to C • etc. . . • L -5; 1 -29 -01 13

Avoiding the Bouncing Effect Select loop-free paths • One way of doing this: •

Avoiding the Bouncing Effect Select loop-free paths • One way of doing this: • • • Each route advertisement carries entire path If a router sees itself in path, it rejects the route BGP does it this way • Space proportional to diameter • © Srinivasan Seshan, 2001 L -5; 1 -29 -01 14

Loop Freedom at Every Instant • Does bouncing effect avoid loops? • • No!

Loop Freedom at Every Instant • Does bouncing effect avoid loops? • • No! Transient loops are still possible Why? Because implicit path information may be stale See this in BGP convergence Only way to fix this • Ensure that you have up-to-date information by explicitly querying © Srinivasan Seshan, 2001 L -5; 1 -29 -01 15

Distance Vector in Practice • RIP and RIP 2 • • Uses split-horizon/poison reverse

Distance Vector in Practice • RIP and RIP 2 • • Uses split-horizon/poison reverse BGP • • Propagates entire path Path also used for effecting policies © Srinivasan Seshan, 2001 L -5; 1 -29 -01 16

Outline • Distance vector routing – challenges • Link state routing • Routing metrics

Outline • Distance vector routing – challenges • Link state routing • Routing metrics • Routing hierarchy © Srinivasan Seshan, 2001 L -5; 1 -29 -01 17

Basic Steps • Start condition • • Step 1 • • • Each node

Basic Steps • Start condition • • Step 1 • • • Each node assumed to know state of links to its neighbors Each node broadcasts its state to all other nodes Reliable flooding mechanism Step 2 • • Each node locally computes shortest paths to all other nodes from global state Dijkstra’s shortest path tree (SPT) algorithm © Srinivasan Seshan, 2001 L -5; 1 -29 -01 18

Link State Packets (LSPs) • Periodically, each node creates a link state packet containing:

Link State Packets (LSPs) • Periodically, each node creates a link state packet containing: • • • Node ID List of neighbors and link cost Sequence number • • • Needed to avoid stale information from flood Time to live (TTL) Node outputs LSP on all its links © Srinivasan Seshan, 2001 L -5; 1 -29 -01 19

Reliable Flooding • When node J receives LSP from node K • • •

Reliable Flooding • When node J receives LSP from node K • • • If LSP is the most recent LSP from K that J has seen so far, J saves it in database and forwards a copy on all links except link LSP was received on Otherwise, discard LSP How to tell more recent • • Use sequence numbers Same method as sliding window protocols © Srinivasan Seshan, 2001 L -5; 1 -29 -01 20

SPT Algorithm (Dijkstra) SPT = {a} for all nodes v if v adjacent to

SPT Algorithm (Dijkstra) SPT = {a} for all nodes v if v adjacent to a then D(v) = cost (a, v) else D(v) = infinity Loop find w not in SPT, where D(w) is min add w in SPT for all v adjacent to w and not in SPT D(v) = min (D(v), D(w) + C(w, v)) until all nodes are in SPT © Srinivasan Seshan, 2001 L -5; 1 -29 -01 21

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3 C 1 3 1 L -5; 1 -29 -01 F 2 E C 5 D E F 22

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3 C 1 3 1 L -5; 1 -29 -01 F 2 E C 5 D E F 23

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3 C 1 3 1 L -5; 1 -29 -01 F 2 E C 5 D E F 24

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3 C 1 3 1 L -5; 1 -29 -01 F 2 E C 5 D E F 25

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3 C 1 3 1 L -5; 1 -29 -01 F 2 E C 5 D E F 26

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3

Example 5 B 2 A 2 1 D B © Srinivasan Seshan, 2001 3 C 1 3 1 L -5; 1 -29 -01 F 2 E C 5 D E F 27

Link State Characteristics With consistent LSDBs, all nodes compute consistent loop-free paths • Limited

Link State Characteristics With consistent LSDBs, all nodes compute consistent loop-free paths • Limited by Dijkstra computation overhead, space requirements • Can still have transient loops • © Srinivasan Seshan, 2001 B 1 A X 1 3 5 C 2 D Packet from C A may loop around BDC if B knows about failure and C & D do not L -5; 1 -29 -01 28

Link State vs. Distance Vector In DV send everything you know to your neighbors

Link State vs. Distance Vector In DV send everything you know to your neighbors • In LS send info about your neighbors to everyone • Msg size: small with LS, potentially large with DV • Msg exchange: LS: O(n. E), DV: only to neighbors • © Srinivasan Seshan, 2001 L -5; 1 -29 -01 29

Link State vs. Distance Vector • Convergence speed: • • • LS: faster –

Link State vs. Distance Vector • Convergence speed: • • • LS: faster – don’t need to process LSPs before forwarding DV: fast with triggered updates Space requirements: • • LS maintains entire topology DV maintains only neighbor state © Srinivasan Seshan, 2001 L -5; 1 -29 -01 30

Link State vs. Distance Vector • Robustness: • LS can broadcast incorrect/corrupted LSP •

Link State vs. Distance Vector • Robustness: • LS can broadcast incorrect/corrupted LSP • • Can be made robust since sources are aware of alternate paths DV can advertise incorrect paths to all destinations • Incorrect calculation can spread to entire network © Srinivasan Seshan, 2001 L -5; 1 -29 -01 31

Link State vs. Distance Vector In LS nodes must compute consistent routes independently -

Link State vs. Distance Vector In LS nodes must compute consistent routes independently - must protect against LSDB corruption • In DV routes are computed relative to other nodes • Bottom line: no clear winner, but we see more frequent use of LS in the Internet • © Srinivasan Seshan, 2001 L -5; 1 -29 -01 32

Outline • Distance vector routing – challenges • Link state routing • Routing metrics

Outline • Distance vector routing – challenges • Link state routing • Routing metrics • Routing hierarchy © Srinivasan Seshan, 2001 L -5; 1 -29 -01 33

Importance of Cost Metric • Choice of link cost defines traffic load • •

Importance of Cost Metric • Choice of link cost defines traffic load • • Low cost = high probability link belongs to SPT and will attract traffic, which increases cost Main problem: convergence • • Avoid oscillations Achieve good network utilization © Srinivasan Seshan, 2001 L -5; 1 -29 -01 34

Metric Choices • Static metrics (e. g. , hop count) • • • Good

Metric Choices • Static metrics (e. g. , hop count) • • • Good only if links are homogeneous Definitely not the case in the Internet Static metrics do not take into account • • • Link delay Link capacity Link load (hard to measure) © Srinivasan Seshan, 2001 L -5; 1 -29 -01 35

Original ARPANET Metric • Cost proportional to queue size • • Instantaneous queue length

Original ARPANET Metric • Cost proportional to queue size • • Instantaneous queue length as delay estimator Problems • • • Did not take into account link speed Poor indicator of expected delay due to rapid fluctuations Delay may be longer even if queue size is small due to contention for other resources © Srinivasan Seshan, 2001 L -5; 1 -29 -01 36

Metric 2 - Delay Shortest Path Tree • Delay = (depart time - arrival

Metric 2 - Delay Shortest Path Tree • Delay = (depart time - arrival time) + transmission time + link propagation delay • • (Depart time - arrival time) captures queuing Transmission time captures link capacity Link propagation delay captures the physical length of the link Measurements averaged over 10 seconds • Update sent if difference > threshold, or every 50 seconds © Srinivasan Seshan, 2001 L -5; 1 -29 -01 37

Performance of Metric 2 • Works well for light to moderate load • •

Performance of Metric 2 • Works well for light to moderate load • • Oscillates under heavy load • • Static values dominate Queuing dominates Reason: there is no correlation between original and new values of delay after rerouting! © Srinivasan Seshan, 2001 L -5; 1 -29 -01 38

Specific Problems • Range is too wide • • 9. 6 Kbps highly loaded

Specific Problems • Range is too wide • • 9. 6 Kbps highly loaded link can appear 127 times costlier than 56 Kbps lightly loaded link Can make a 127 -hop path look better than 1 hop No limit to change between reports • All nodes calculate routes simultaneously • • Triggered by link update © Srinivasan Seshan, 2001 L -5; 1 -29 -01 39

Example A Net X Net Y B © Srinivasan Seshan, 2001 L -5; 1

Example A Net X Net Y B © Srinivasan Seshan, 2001 L -5; 1 -29 -01 40

Example After everyone re-calculates routes: A Net X Net Y B . . Oscillations!

Example After everyone re-calculates routes: A Net X Net Y B . . Oscillations! © Srinivasan Seshan, 2001 L -5; 1 -29 -01 41

Consequences Low network utilization (50% in example) • Congestion can spread elsewhere • Routes

Consequences Low network utilization (50% in example) • Congestion can spread elsewhere • Routes could oscillate between short and long paths • Large swings lead to frequent route updates • • • More messages Frequent SPT re-calculation © Srinivasan Seshan, 2001 L -5; 1 -29 -01 42

Revised Link Metric Better metric: packet delay = f(queueing, transmission, propagation) • When lightly

Revised Link Metric Better metric: packet delay = f(queueing, transmission, propagation) • When lightly loaded, transmission and propagation are good predictors • When heavily loaded queueing delay is dominant and so transmission and propagation are bad predictors • © Srinivasan Seshan, 2001 L -5; 1 -29 -01 43

Normalized Metric • • • If a loaded link looks very bad then everyone

Normalized Metric • • • If a loaded link looks very bad then everyone will move off of it Want some to stay on to load balance and avoid oscillations It is still an OK path for some Hop normalized metric diverts routes that have an alternate that is not too much longer Also limited relative values and range of values advertised gradual change © Srinivasan Seshan, 2001 L -5; 1 -29 -01 44

Revised Metric • Limits on relative change • • • Measured link delay is

Revised Metric • Limits on relative change • • • Measured link delay is taken over 10 sec period Link utilization is computed as. 5*current sample +. 5*last average Max change limited to slightly more than ½ hop Min change limited to slightly less than ½ hop Bounds oscillations Normalized according to link type • Satellite should look good when queueing on other links increases © Srinivasan Seshan, 2001 L -5; 1 -29 -01 45

Routing Metric vs. Link Utilization 225 140 9. 6 satellite New metric (routing units)

Routing Metric vs. Link Utilization 225 140 9. 6 satellite New metric (routing units) 90 75 60 30 0 © Srinivasan Seshan, 2001 9. 6 terrestrial 56 satellite 56 terrestrial 25% 50% Utilization L -5; 1 -29 -01 75% 100% 46

Observations • Utilization effects • • • Link types • • • High load

Observations • Utilization effects • • • Link types • • • High load never increases cost more than 3*cost of idle link Cost = f(link utilization) only at moderate to high loads Most expensive link is 7 * least expensive link High-speed satellite link is more attractive than low-speed terrestrial link Allows routes to be gradually shed from link © Srinivasan Seshan, 2001 L -5; 1 -29 -01 47

Network Response Maps • Load of “average” link as a function of that link’s

Network Response Maps • Load of “average” link as a function of that link’s cost • Created empirically 1. 0 100% 200% 400% Network load 0. 8 50% Mean load on link 0. 6 0. 4 25% 0. 2 0. 0 0. 5 © Srinivasan Seshan, 2001 1. 0 1. 5 2. 0 2. 5 Link cost L -5; 1 -29 -01 3. 0 3. 5 4. 0 48

Equilibrium Calculation • Combine utilization to cost and cost to utilization maps • Equilibrium

Equilibrium Calculation • Combine utilization to cost and cost to utilization maps • Equilibrium points at intersections 1. 0 100% 200% 400% Network load HN-SPF 0. 8 50% Mean load on link D-SPF 0. 6 0. 4 25% 0. 2 0. 0 0. 5 © Srinivasan Seshan, 2001 1. 0 1. 5 2. 0 2. 5 Link cost L -5; 1 -29 -01 3. 0 3. 5 4. 0 49

Equilibrium Utilizations • Equilibrium points vs. offered load 1. 2 HN-SPF Min Hop Ideal

Equilibrium Utilizations • Equilibrium points vs. offered load 1. 2 HN-SPF Min Hop Ideal 1. 0 Utilization 0. 8 D-SPF 0. 6 0. 4 0. 2 0. 0 © Srinivasan Seshan, 2001 0 1 2 3 4 5 6 Min-Hop Offered Load L -5; 1 -29 -01 7 8 9 50

Routing Dynamics • Limiting maximum metric change bounds oscillation Bounded oscillation 1. 0 Metric

Routing Dynamics • Limiting maximum metric change bounds oscillation Bounded oscillation 1. 0 Metric map 0. 75 Utilization 0. 5 0. 25 0 Network response 0. 5 1. 0 1. 5 2. 0 2. 5 3. 0 3. 5 4. 0 Link reported cost © Srinivasan Seshan, 2001 L -5; 1 -29 -01 51

Routing Dynamics Metric map 1. 0 0. 75 Utilization Easing in a new link

Routing Dynamics Metric map 1. 0 0. 75 Utilization Easing in a new link 0. 5 Network response 0. 25 0 0. 5 1. 0 1. 5 2. 0 2. 5 3. 0 3. 5 4. 0 Reported cost © Srinivasan Seshan, 2001 L -5; 1 -29 -01 52

Outline • Distance vector routing – challenges • Link state routing • Routing metrics

Outline • Distance vector routing – challenges • Link state routing • Routing metrics • Routing hierarchy © Srinivasan Seshan, 2001 L -5; 1 -29 -01 53

Routing Hierarchies • Flat routing doesn’t scale • • Key observation • • Each

Routing Hierarchies • Flat routing doesn’t scale • • Key observation • • Each node cannot be expected to have routes to every destination (or destination network) Need less information with increasing distance to destination Two radically different approaches for routing • • The area hierarchy The landmark hierarchy (discuss in routing alternatives) © Srinivasan Seshan, 2001 L -5; 1 -29 -01 54

Areas • Divide network into areas • • • Areas can have nested sub-areas

Areas • Divide network into areas • • • Areas can have nested sub-areas Constraint: no path between two sub-areas of an area can exit that area Hierarchically address nodes in a network • • • Sequentially number top-level areas Sub-areas of area are labeled relative to that area Nodes are numbered relative to the smallest containing area © Srinivasan Seshan, 2001 L -5; 1 -29 -01 55

The Area Hierarchy 1 2 2. 1 1. 1 2. 2. 1 1. 2.

The Area Hierarchy 1 2 2. 1 1. 1 2. 2. 1 1. 2. 2 3 3. 1 © Srinivasan Seshan, 2001 L -5; 1 -29 -01 3. 2 56

Routing • Within area • • Outside area • • • Each node has

Routing • Within area • • Outside area • • • Each node has routes to every other node Each node has routes for other top-level areas only Inter-area packets are routed to nearest appropriate border router Can result in sub-optimal paths © Srinivasan Seshan, 2001 L -5; 1 -29 -01 57

Path Sub-optimality 1 2 2. 1 1. 1 2. 2. 1 1. 2. 1

Path Sub-optimality 1 2 2. 1 1. 1 2. 2. 1 1. 2. 1 start end 3. 2. 1 3 3 hop red path vs. 2 hop green path © Srinivasan Seshan, 2001 3. 1 L -5; 1 -29 -01 3. 2 58

Next Lecture: Inter-Domain Routing Border Gateway Protocol (BGP) • Assigned reading • • [LAB

Next Lecture: Inter-Domain Routing Border Gateway Protocol (BGP) • Assigned reading • • [LAB 00] Delayed Internet Routing Convergence © Srinivasan Seshan, 2001 L -5; 1 -29 -01 59