1
Internet Routing Protocols
Lecture 01
Timothy G. Griffin
Computer Lab
Cambridge UK
Advanced Systems Topics
Lent Term, 2008
Common View of the Telco
Network
Common View of the IP Network
(Layer 3)
IP routing is the little bit-o-smarts left in the IP
network layer
• Dynamic Routing protocols are used to
implement and maintain connectivity in the
Internet.
• Which protocols are used?
• How do they work?
• How do they behave?
• What are some of the fundamental
tradeoffs in the design space of routing
protocols?
3
Outline
• Lecture 1 : Routing vs. Forwarding.
Internet routing architecture
• Lecture 2: Intra-domain routing with
“shortest paths”. Link-state vs.
distance-vector.
• Lecture 3 : Inter-domain routing. The
Border Gateway Protocol (BGP)
• Lecture 4 : BGP continued
• Lecture 5 : BGP dynamics
5
(Winter '02) (W in te r '0 2) (Summer '03) UW-Superior UW-Stout UW-River Falls Fox Valley TC UW-Oshkosh UW-Milwaukee UW-Parkside UW-Whitewater UW-Madison UW-Platteville UW-La Crosse UW-Eau Claire UW-Stevens Point UW-Green Bay Marshfield Rhinelander Rice Lake Clintonville Stiles Jct. Portage Dodgeville La Crosse Genuity OC-3 (155Mbps) DS-3 (45Mbps) T1 (1.5Mbps) OC-12 (622Mbps) (Summer '02) Qwest and Other Provider(s) (S umm er '02 ) Internet 2 & Qwest
! Peering - Public and Private
! Commodity Internet Transit
! Internet2
! Merit and Other State Networks
! National Education Network
! Regional Research Peers Wausau Gigabit Ethernet (Summer '02) (S um m er '0 3) Chicago - 1 Chicago - 2 (Winter '02) Chicago
wiscnet.net
GO BUCKY!
7
WorldCom (UUNet)
Telstra international
Charlotte Portland Providence Newark Cedar Knolls Syracuse Buffalo White Plains Rochester Columbia New Orleans Nashville Austin Houston Tulsa Oklahom a City Albuquerque Phoenix Anaheim Anaheim Las Vegas Salt Lake City Colorado Springs Milwaukee Detroit Columbus Cincinnati SeattleSpokane Portland Louisville Little Rock Jacksonville Ft. Lauderdale Miami Raleigh Richmond Denver Indianapolis Pittsburgh Baltimore Plymouth Atlanta Minneapolis Garden a Tampa San Bernardino Arlington Ft. Worth Rochelle Pk Honolulu Orlando Sherman Oaks Ojus Hamilton Square Silver Springs Wayne Chicago Rolling Meadows Omaha St Louis San Diego Anchorage, AK N X OC48 Backbone Node Gateway Node N X DS3 N X OC3 Remote Access RouterR Remote GSR Access Router
N X OC12 NX OC192 Cambridge Framingham Stamford Bridgepor t Grand Rapids Providence Glenvie w Albany Sacramento Oakland Redwood City San Jose San Francisco Chicago San Francisco Florissant Davenport Worcester Madison Camden, NJ Norcross New Brunswick Birmingham San Antonio Oak Brook South Bend Dayto n Bohemia Hartford San Juan PR W. Palm Beach Harrisburg Des Moines Memphis Greensboro Norfolk R Kansas City Akron R R R Los Angeles Dallas Wash. DC St. Paul Freehold R Manchester R R R Ft. Lauderdale Dunwoody
Note: Connectivity and nodes shown are targeted for deployment; actual deployment may vary. Maps should not be used to predict service availability. R R R Phil NYC Cleveland R R NYC-Bdwy Birmingham LA-Airport Blvd
AT&T IP Backbone
Year end 2001
Rev. 6-4-019
Architecture of Dynamic
Routing
AS 1
AS 2
BGP
EGP = Exterior Gateway Protocol.
Policy Based.
IGP = Interior Gateway Protocol.
Metric based.
OSPF, IS-IS, RIP, EIGRP (cisco)
Only one: BGP
The Routing Domain of BGP is the entire Internet
IGP
IGP
How many ASN are used today?
Jan 28. 2008
Routers Talking to Routers
(The “control plane”)
Routing info
Routing info
•
Routing computation is distributed among routers within a
routing domain
•
Computation of best next hop based on routing information
is the most CPU/memory intensive task on a router
•
Routing messages are
usually
not routed, but exchanged
via layer 2 between physically adjacent routers (internal
BGP and multi-hop external BGP are exceptions)
• Topology information is
flooded within the routing
domain
• Best end-to-end paths are
computed locally at each router.
• Best end-to-end paths
determine next-hops.
• Based on minimizing some
notion of distance
• Works only if policy is shared
and uniform
• Examples: OSPF, IS-IS
• Each router knows little about
network topology
• Only best next-hops are chosen
by each router for each
destination network.
• Best end-to-end paths result
from composition of all
next-hop choices
• Does not require any notion of
distance
• Does not require uniform
policies at all routers
• Examples: RIP, BGP
Link State
Vectoring
11
The Gang of Four
Link State
Vectoring
EGP
IGP
BGP
RIP
IS-IS
OSPF
22The standard model
Physical
Network
DataLink
Transport
Application
Session
Presentation
Physical
Network
DataLink
Transport
Application
Session
Presentation
data sent
data received
23
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| IHL | Service Type | Total Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification |Flags| Fragment Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time to Live | Protocol | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
All Hail the IP Datagram!
H
E
A
D
E
R
D
A
T
A
1981, RFC 791
... up to 65,515 octets of data ...
: : | + | + | : : | + | + | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+shaded fields little-used today
24
IP Hour Glass
IP
Networking Technologies
Networking Applications
Frame
ATM
DWDM
SONET
Web
file transfer
Ethernet
FDDI
Multimedia
X.25
Remote Access
Voice
VPN
Minimalist network layer
TCP
13
Best Effort, Connectionless,
Connectivity
The is the fundamental service provided
by Internet Service Providers (ISPs)
All other IP services depend on connectivity:
DNS, email, VPNs, Web Hosting, …
IP traffic
135.207.49.8 192.0.2.153
26
IP is a Network Layer Protocol
Physical 1
Network
DataLink 1
Transport
Application
Session
Presentation
Network
Physical 1
DataLink 1
Physical 2
DataLink 2
Router
Physical 2
Network
DataLink 2
Transport
Application
Session
Presentation
Medium 1
Medium 2
Separate physical networks
glued together into one
logical network
27
Hosts, Networks, and Routers
Network A
Network B
Network C
Router
Host 1
Host 2
Host 7
Host 1
Host 12
Host 2
Unique IP Address =
Network Number + Host Number
28
Actually, IP addresses Identify
Interfaces
Network A
Network B
Network C
Host 1
Host 2
Host 7
Host 1
Host 12
Host 2
Network C,
Host 3
Network A,
Host 3
Network B,
Host 77
Machines can have more
than one IP address.
All routers do!
15
29
IP Forwarding Table
Destination
Next Hop
Interface
Net A
Net B
Net C, Host 3
Router 1
Direct
Router 2
Router 1
INT 7
INT 7
INT 3
INT 4
A destination is usually
a network. May also be
a host, or a “gateway
of last resort” (default)
The next hop is
either a directly
connected network or a
router on a directly
connected network
A physical interface
Net C
30IP Forwarding Process
Forwarding Process
IP Forwarding Table
Router
1. Remove a packet from an input queue 3. Match packet’s destination to a table entry 2. Check for sanity, decrement TTL field 4. Place packet on correct output queue If queues get full, just drop packets!If queues get full, just drop packets!
31
IPv4 Addresses are 32 Bit
Values
11111111 00010001 10000111 00000000
255
17
134
0
255.17.134.0
Dotted quad notation
IPv6 addresses have 128 bits
32
IP Addresses come in two
parts
11111111 00010001 10000111 00000000
Network Number
Host Number
Where is this dividing line?
Well, that depends ....
17
33Classful Addresses
0nnnnnnn
10nnnnnn nnnnnnnn
nnnnnnnn nnnnnnnn
110nnnnn
hhhhhhhh hhhhhhhh hhhhhhhh
hhhhhhhh hhhhhhhh
hhhhhhhh
n = network address bit
h = host identifier bit
Class
A
Class C
Class B
Leads to a rigid, flat, inefficient use of address space …
34
RFC 1519: Classless Inter-Domain
Routing (CIDR)
IP Address : 12.4.0.0 IP Mask: 255.254.0.0
00001100 00000100 00000000 00000000
11111111 11111110 00000000 00000000
Address
Mask
for hosts
Network Prefix
Use two 32 bit numbers to represent a network.
Network number = IP address + Mask
Which IP Addresses are Covered by a
Prefix?
00001100 00000100 00000000 00000000
11111111 11111110 00000000 00000000
12.4.0.0/15
00001100 00000101 00001001 00010000
00001100 00000111 00001001 00010000
12.5.9.16
12.7.9.16
12.5.9.16 is covered by prefix 12.4.0.0/15
12.7.9.16 is not covered by prefix 12.4.0.0/15
36
CIDR allows Hierarchy in Addressing
12.0.0.0/8
12.0.0.0/16
12.254.0.0/16
12.1.0.0/16
12.2.0.0/16
12.3.0.0/16
:
:
:
12.253.0.0/16
12.3.0.0/24
12.3.1.0/24
:
:
12.3.254.0/24
12.253.0.0/19
12.253.32.0/19
12.253.64.0/19
12.253.96.0/19
12.253.128.0/19
12.253.160.0/19
12.253.192.0/19
:
:
:
19
Classless Forwarding
Destination =12.5.9.16
payload
Prefix
Next Hop
Interface
12.0.0.0/8 10.14.22.19
ATM 5/0/8
12.4.0.0/15
12.5.8.0/23 attached
Ethernet 0/1/3
Serial 1/0/7
10.1.3.77
IP Forwarding Table
0.0.0.0/0
10.14.11.33 ATM 5/0/9
even better
OK
better
best!
38How Are Forwarding Tables
Populated to implement Routing?
Statically
Dynamically
Routers exchange network reachability
information using ROUTING PROTOCOLS.
Routers use this to compute best routes
Administrator
manually configures
forwarding table entries
In practice : a mix of these.
Static routing mostly at the “edge”
+ More control
+ Not restricted to
destination-based
forwarding
- Doesn’t scale
- Slow to adapt to
network failures
+ Can rapidly adapt to changes
in network topology
+ Can be made to scale well
- Complex distributed algorithms
- Consume CPU, Bandwidth, Memory
- Debugging can be difficult
39
Routing vs. Forwarding
R
R
R
A
B
C
D
R1
R2
R3
R4
R5
E
Net
Nxt Hop
R4
R3
R3
R4
Direct
R4
Net
Nxt Hop
A
B
C
D
E
default
R2
R2
Direct
R5
R5
R2
Net
Nxt Hop
A
B
C
D
E
default
R1
Direct
R3
R1
R3
R1
Default to upstream routerA
B
C
D
E
default
Forwarding: determine next hop
Routing: establish end-to-end paths
Forwarding always works Routing can be badly broken
40
Happy Packets: The Internet Does Not Exist Only to
Populated Routing Tables
Forwarding Table
OSPF
Domain
RIP
Domain
BGP
OSPF Process
OSPF Routing tables
RIP Process
RIP Routing tables
BGP Process
BGP Routing tables
21
Before We Go Any Further
…
IP ROUTING PROTOCOLS DO NOT
DYNAMICALLY ROUTE AROUND
NETWORK CONGESTION
• IP traffic can be very bursty
• Dynamic adjustments in routing typically
operate more slowly than fluctuations in
traffic load
• Dynamically adapting routing to account
for traffic load can lead to wild, unstable
oscillations of routing system
42
Next Lecture: Shortest Path
Routing
This is what IS-IS, OSPF, and RIP do,
more or less.
A
D
E
C
B
100 100 20 20 35 35 20 20 20 20 10 10 10 1055
35
20
30
Dest. Nxt Hop
B
C
C
C
D
D
D
E