Professional Documents
Culture Documents
This class
Overview
Router Tasks
Forwarding
Move packet from input link to the appropriate output link Purely local computation Must go be very fast (executed for every packet)
Routing
Make sure that the next hop actually leads to the destination Global decisions; distributed computation and communication Can go slower (only important when topology changes)
Forwarding Options
Source routing
Virtual circuits
Set up path out-of-band and store path identifier in routers Local path identifier in packet
Destination-based forwarding
Router looks up address in forwarding table Forwarding table contains (address, next-hop) tuples
Source Routing
Routing
Requires variable length path header Router looks up next hop in packet header, strips it off and forwards remaining packet
Very quick forwarding, no lookup required
Forwarding
In practice
ad hoc networks (DSR), some HPC networks (Myrinet), and for debugging on the Internet (LSR,SSR)
Virtual Circuits
Routing
Hosts sets up path out-of-band, requires connection setup Write (input id, output id, next hop) into each router on path Flexible (one path per flow) Send packet with path id Router looks up input, swaps for output, forwards on next hop Repeat until reach destination Table lookup for forwarding (faster than IP lookup?)
Forwarding
In practice
ATM: fixed VC identifiers and separate signaling code MPLS: ATM meets the IP world (why? traffic engineering)
Destination-based Forwarding
Routing
Forwarding
In Practice: IP routing
Routing Tables
The routing table at A, lists at a minimum the next hops for the different destinations
Dest B C D E F G Next Hop B C C
E A D B C
E F F
F G
Routing on a Graph
Network is a directed graph; routers are vertices In the simplest case, best path is the shortest path
1
A
1 1
C
1 1
F E
1 1
X
D
=router =link
1 1
G
=cost
10
Routing Challenges
Intra-domain Routing
Overall goals
Provide intra-network connectivity Adapt quickly to failures or topology changes Optimize use of network resources
Non-goals
Extreme scalability Lying, and/or disagreements about edge costs Well deal with these when we talk about inter-domain routing
12
Basic Approaches
Static
Type in the right answers and hope they are always true So far
Distance vector
Tell your neighbors when you know about everyone Todays lecture!
Link state
Tell everyone what you know about your neighbors Next time
Base assumption
Each router knows its own address and the cost to reach each of its directly connected neighbors
Bellman-Ford algorithm
Mitigating loops
14
Bellman-Ford Algorithm
dx(y) = cost of least-cost path from X to Y dx(y) = min {c(x,v) + dv(y)} over all neighbors V v
2 1 1
x
3
u
1 4 5 3
s t z
2
w
local iteration caused by: Local link cost change Distance vector update message from neighbor
Distributed:
recompute estimates
Each node notifies neighbors only when its DV changes Neighbors then notify their neighbors if necessary
16
Step-by-Step
And neighbors update their own distance vectors Dx(y) minv{c(x,v) + Dv(y)} for each node y N
17
B 7 A
Info at node
A
8 2
Distance to Node A B C D E 0 7 1 7 1 0 1 8 1 0 2 2 0 2 8 2 0
18
B C D E
1 E 2 D
D sends vector to E
Im 2 from C, 0 from D and 2 from E
B 7 A
Info at node
A
8 2
Distance to Node A B C D E 0 7 1 7 1 0 1 8 1 0 2 4 2 0 2 8 2 0
19
B C D E
1 E 2 D
B sends vector to A
Im 7 from A, 0 from B, 1 from C & 8 from E
B 7 A
Info at node
A
8 2
Distance to Node A B C D E 0 7 8 1 7 1 0 1 8 1 0 2 4 2 0 2 8 2 0
20
B C D E
1 E 2 D
E sends vector to A
E is 1 away, 4+1<8 so C is 5 away, 1+2< so D is 3 away
B 7 A
Info at node
A
8 2
Distance to Node A B C D E 0 7 5 3 1 7 1 0 1 8 1 0 2 4 2 0 2 8 2 0
21
B C D E
1 E 2 D
until Convergence
B 7 A
Info at node
A
8 2
Distance to Node A B C D E 0 6 5 3 1 6 5 3 1 0 1 3 5 1 0 2 4 3 2 0 2 5 4 2 0
22
B C D E
1 E 2 D
B 7 A
Dest A C
2
D E
1 E 2 D
23
B 7 A
B
2
7 8 10 12
0 1 3 5
1 0 2 4
3 2 0 2
5 4 2 0
24
1 E D
C D E
Counting to Infinity
Distance to C 3 A 1 2 B 2 C
3 A
1 Update 3
4 B
5 A
1 Update 4
4 B
Etc
25
Why so High?
Updates dont contain enough information Cant totally order bad news above good news B accepts As path to C that is implicitly through B! Aside: this also causes delays in convergence even when it doesnt count to infinity
26
Mitigation Strategies
Hold downs
As metric increases, delay propagating information Limitation: Delays convergence Full path information in route advertisement Explicit queries for loops Never advertise a destination through its next hop
A doesnt advertise C to B
Loop avoidance
Split horizon
Poison reverse: Send negative information when advertising a destination through its next hop
A advertises C to B with a metric of Limitation: Only works for loops of size 2
27
Y
50
28
Tells C that D is unreachable (poison reverse) Tells A it has path of cost 3 (split horizon doesnt apply)
Etc
29
In practice
Rarely used today Ensures loop-freedom (DUAL algorithm) Only communicates changes (no regular broadcast) Combine multiple metrics into a single metric (BW, delay, reliability, load)
Summary
React to changes in the topology Compute the paths through the network
Each node sends list of its shortest distance to each destination to its neighbors Neighbors update their lists; iterate
31
Next time
32