Outline: Peter Steenkiste Departments of Computer Science and Electrical and Computer Engineering How Do Routers Works?
Outline: Peter Steenkiste Departments of Computer Science and Electrical and Computer Engineering How Do Routers Works?
Outline
ICMP ICMP
Frag. Needed Frag. Needed
MTU = 2000 MTU = MTU = 1500 MTU =
2000 host 2000 host
router router
router
t MTU = 1500 router
t MTU = 1500
host host
MTU = 4000 MTU = 4000
IP IP
Packet Packet
5 5 6 6
1
2/16/2008
MTU =
2000
router
host z ICMP
router MTU = 1500
host
MTU = 4000
z How do Routers Works?
Length = 1500, Don’t Fragment
IP
Packet z Routing
Linecards
output port
L
Line Card
input port
Cisco 12000
Switch
9 9 10 10
» Recompute checksum e.g., Ethernet z Given datagram dest., lookup output port
using routing table in input port memory
» Forward to next hop line card
z Queue needed if datagrams arrive faster than
– Forwarding engine forwarding rate into switch fabric
11 11 12 12
2
2/16/2008
13 13 14 14
System Bus
Modern routers
• Input port processor performs lookup, copy into memory
• Cisco Catalyst 8500
15 15 16 16
3
2/16/2008
Buffering Outline
path F 1
2
– Send packet out appropriate port 6
1
z How do we generate the forwarding table? A 4
3 D
B
21 21 22 22
4
2/16/2008
E 2 E B
z Routing F 6 F
else
return d(x,y), nexthop(x,y) # Existing cost / next hop
27 27 28 28
Start Iteration #1
Optimum 1-hop paths Optimum 2-hop paths
Table for A Table for B Table for A Table for B
E 3 C E 3 C
Dst Cst Hop Dst Cst Hop 1 Dst Cst Hop Dst Cst Hop 1
A 0 A A 4 A 1 A 0 A A 4 A 1
2 F 2 F
B 4 B B 0 B B 4 B B 0 B
6 6
C ∞ – C ∞ – 1 C 7 F C 2 F 1
D ∞ – D 3 D 3 D D 7 B D 3 D 3 D
A 4 A 4
E 2 E E ∞ – E 2 E E 4 F
B B
F 6 F F 1 F F 5 E F 1 F
Table for C Table for D Table for E Table for F Table for C Table for D Table for E Table for F
Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop
A ∞ – A ∞ – A 2 A A 6 A A 7 F A 7 B A 2 A A 5 B
B ∞ – B 3 B B ∞ – B 1 B B 2 F B 3 B B 4 F B 1 B
C 0 C C 1 C C ∞ – C 1 C C 0 C C 1 C C 4 F C 1 C
D 1 D D 0 D D ∞ – D ∞ – D 1 D D 0 D D ∞ – D 2 C
E ∞ – E ∞ – E 0 E E 3 E E 4 F E ∞ – E 0 E E 3 E
F 1 F F ∞ – F 3 F F 0 F F 1 F F 2 C F 3 F F 0 F
29 29 30 30
5
2/16/2008
algorithm
algorithm terminates
continues
on! ? ? ?
33 33 34 34
6
2/16/2008
z Small Infinity
» Count to infinity doesn’t take very long
z Route Timer
» Every route has timeout limit of 180 seconds
– Reached when haven’t received update from next
hop for 6 periods
» If not updated, set to infinity
» Soft-state refresh Æ important concept!!!
z Behavior
» When router or link fails, can take minutes to
stabilize
39 39