lecture 5

advertisement
CSE 561 – Scalable Routing
David Wetherall
djw@cs.washington.edu
Spring 2000
This Lecture
• First, Clark on Internet design philosophy
• Making routing scale
– Landmark paper
– Other techniques
• Mobile IP
djw // CS 561, Spring 2000
L5.2
Clark, 1988
• Design philosophy in retrospect; important themes
• Survivability and impact on where to store state
• Division into IP + TCP / UDP for QOS
djw // CS 561, Spring 2000
L5.3
Network Service Models
• Datagram delivery: postal service
–
–
–
–
Also connectionless, best-effort or unreliable service
Network can’t guarantee delivery of the packet
Each packet from a host is routed independently
Example: IP
• Virtual circuit models: telephone
–
–
–
–
Also connection-oriented service
Signaling: connection establishment, data transfer, teardown
All packets from a host are routed the same way
Example: ATM, Frame Relay, X.25
djw // CS 561, Spring 2000
L5.4
“Survivability”
• What state goes where?
– Router versus end system
• What does survivability entail?
– Application versus network perspective
• Problem: loss of state held at routers could disrupt
application even though a path existed
• Solution: fate sharing
• Follow-on: flows and soft-state
djw // CS 561, Spring 2000
L5.5
“Types of Service”
• Application requirements
– Impact of reliability
– The TCP/IP split, with UDP
• Quality of service
– What is provided by the TCP/UDP distinction?
– What is provided by other mechanisms?
djw // CS 561, Spring 2000
L5.6
IPv4 Header Fields …
• Type of Service
• Abstract notion of
kind of service,
never really
worked out
– Routers ignore
• Field will be
reused for
Diffserv
djw // CS 561, Spring 2000
0
4
Version
8
HLen
16
TOS
31
Length
Identifier for Fragments
TTL
19
Flags
Protocol
Fragment Offset
Checksum
Source Address
Destination Address
Options (variable)
Pad
(variable)
Data
L5.7
Shortcomings
• Some have become increasingly apparent today …
• Accounting
• End host control
• Distributed management
djw // CS 561, Spring 2000
L5.8
Scalability Concerns
• Routing burden grows with size of an internetwork
– Size of routing tables
– Volume or routing messages
– Amount of routing computation
• RIP/OSPF do not scale to the size of the Internet
• We must apply further techniques:
– Careful address allocation
– Use of hierarchy
– Route aggregation
djw // CS 561, Spring 2000
L5.9
Landmark Routing
• Area versus landmark hierarchy
• Pros and cons of hierarchy
– Routing table size, number of messages, computation
– Path length
– Forwarding algorithm
djw // CS 561, Spring 2000
L5.10
Structure of the Internet
You at work
Large corporation
“Consumer ” ISP
Peering
point
Backbone service provider
“ Consumer” ISP
Large corporation
Small
corporation
djw // CS 561, Spring 2000
Peering
point
“Consumer”ISP
You at home
L5.11
IP Addresses
• Reflect location in topology; used for scalable routing
– Unlike “flat” Ethernet addresses
• Interfaces on same network share prefix
– Prefix administratively assigned (IANA or ISP)
– Addresses globally unique
• Routing only advertises entire networks
– Local delivery within a single “network” doesn’t involve router
– (will make “network” precise later on)
djw // CS 561, Spring 2000
L5.12
IPv4 Address Formats
Class A
Class B
Class C
0
1
1
7
24
Network
Host
0
1
0
14
16
Network
Host
21
8
Network
Host
• 32 bits written in “dotted quad” notation, e.g., 18.31.0.135
djw // CS 561, Spring 2000
L5.13
IPv6 Address Format
001
RegistryID
ProviderID
SubscriberID
SubnetID
InterfaceID
• 128 bits written in 16 bit hexadecimal chunks
• Still hierarchical, just more levels
djw // CS 561, Spring 2000
L5.14
Subnetting
• Split up one
network number
into multiple
physical networks
Network number
Host number
Class B address
111111111111111111111111
• Internal structure
isn’t propagated
Subnet mask (255.255.255.0)
Network number
• Helps allocation
efficiency
djw // CS 561, Spring 2000
00000000
Subnet ID
Host ID
Subnetted address
L5.15
Subnet Example
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.0
128.96.34.15
128.96.34.1
H1
R1
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.128
128.96.34.130
128.96.34.139
128.96.34.129
H2
R2
H3
128.96.33.14
djw // CS 561, Spring 2000
128.96.33.1
Subnet mask: 255.255.255.0
Subnet number: 128.96.33.0
L5.16
Inter-Domain Routing
• Network comprised of many
Autonomous Systems (ASes) or
domains
• To scale, use hierarchy:
separate inter-domain and
intra-domain routing
• Also called interior vs exterior
gateway protocols (IGP/EGP)
23
12
44
7
1123
321
– IGP = RIP, OSPF
– EGP = EGP, BGP
djw // CS 561, Spring 2000
L5.17
Inter-Domain Routing
• Border routers summarize and
advertise internal routes to
external neighbors and viceversa
• Border routers apply policy
AS1
R1
R3
R2
Border router
Autonomous system 1
• Internal routers can use notion
of default routes
• Core is “default-free”; routers
must have a route to all
networks in the world
djw // CS 561, Spring 2000
R4
R5
Autonomous system 2
Border
router
R6
AS2
L5.18
Exterior Gateway Protocol (EGP)
• First major inter-domain routing protocol
• Constrained Internet to tree structure; no longer in use
NSFNET backbone
Stanford
ISU
BARRNET
regional
Berkeley
MidNet
regional
Westnet
regional
PARC
UNM
NCAR
UNL
KU
UA
djw // CS 561, Spring 2000
L5.19
Border Gateway Protocol (BGP-4)
• EGP used in the Internet backbone today
• Features:
–
–
–
–
Path vector routing
Application of policy
Operates over reliable transport (TCP)
Works with CIDR
djw // CS 561, Spring 2000
L5.20
Path Vectors
• Similar to distance vector,
except send entire paths
– e.g. 321 hears [7,12,44]
– stronger avoidance of loops
– supports policies (later)
• Modulo policy, shorter paths
are chosen in preference to
longer ones
• Reachability only – no metrics
djw // CS 561, Spring 2000
23
12
44
7
1123
321
L5.21
Policies
• Choice of routes may depend on owner, cost, AUP, …
– Business considerations
• Local policy dictates what route will be chosen and
what routes will be advertised!
– e.g., X doesn’t provide transit for B, or A prefers not to use X
A
djw // CS 561, Spring 2000
X
B
L5.22
Impact of Policies – Example
• Early Exit / Hot Potato
– “if it’s not for you, bail”
• Combination of best local
policies not globally best
• Side-effect: asymmetry
djw // CS 561, Spring 2000
A
B
L5.23
Operation over TCP
• Most routing protocols operate over UDP/IP
• BGP uses TCP
– TCP handles error control; reacts to congestion
– Allows for incremental updates
• Issue: Data vs. Control plane
– Shouldn’t routing messages be higher priority than data?
djw // CS 561, Spring 2000
L5.24
CIDR (Supernetting)
• CIDR = Classless Inter-Domain Routing
• Aggregate advertised network routes
–
–
–
–
e.g., ISP has class C addresses 192.4.16 through 192.4.31
Really like one larger 20 bit address class …
Advertise as such (network number, prefix length)
Reduces size of routing tables
• But IP forwarding is more involved
– Based on Longest Matching Prefix operation
djw // CS 561, Spring 2000
L5.25
CIDR Example
• X and Y routes can be aggregated
Corporation X
(11000000000001000001)
Border gateway
(advertises path to
11000000000001)
Regional network
Corporation Y
(11000000000001000000)
djw // CS 561, Spring 2000
L5.26
Mobile IP
• Problem: addresses tied to topology and so change as a
node moves; this disrupts communications
• Approaches:
– Change DNS
– Mobile IP (level of indirection at network level)
– Link-layer mobility
• Mobile IP Solution
djw // CS 561, Spring 2000
L5.27
Getting an IP address
• Old fashioned way: sysadmin configured each machine
• Dynamic Host Configuration Protocol (DHCP)
– One DHCP server with the bootstrap info
• Host address, gateway address, subnet mask, …
• Find it using broadcast
– Addresses may be leased; renew periodically
• “Stateless” Autoconfiguration (in IPv6)
– Get rid of server – reuse Ethernet addresses for lower portion
of address (uniqueness) and learn higher portion from routers
djw // CS 561, Spring 2000
L5.28
Address Resolution Protocol (ARP)
• On a single link, need Ethernet addresses to send a
frame … source is a given, but what about destination?
– Requires mapping from IP to MAC addresses
• ARP is a dynamic approach to learn mapping
– Node A sends broadcast query for IP address X
– Node B with IP address X replies with its MAC address M
– A caches (X, M); old information is timed out (~15 mins)
– Also: B caches A’s MAC and IP addresses, other nodes refresh
djw // CS 561, Spring 2000
L5.29
Mobile IP Issues in Practice
•
•
•
•
Scalable, and backwards compatible
Slow takeoff: quasi-mobile and DHCP
Handoff latencies
Security
djw // CS 561, Spring 2000
L5.30
ARP Example
• To send a message … common case doesn’t require ARP
Who-is X?
I-am X
time
<Message>
A
djw // CS 561, Spring 2000
B
L5.31
Download