Lecture6 InternetRoutingProtocols DHCP NAT MobileIP
Lecture6 InternetRoutingProtocols DHCP NAT MobileIP
Communication
Networks and Services
Internet Routing Protocols
DHCP, NAT, and Mobile IP
Lecture 6
Communication
Networks and Services
Internet Routing Protocols
Outline
Basic Routing
Routing Information Protocol (RIP)
Open Shortest Path First (OSPF)
Border Gateway Protocol (BGP)
Autonomous Systems
Global Internet viewed as collection of autonomous
systems.
Autonomous system (AS) is a set of routers or
networks administered by a single organization
Same routing protocol need not be run within the AS
But, to the outside world, an AS should present a
consistent picture of what ASs are reachable through it
Stub AS: has only a single connection to the outside
world.
Multihomed AS: has multiple connections to the outside
world, but refuses to carry transit traffic
Transit AS: has multiple connections to the outside
world, and can carry transit and local traffic.
AS Number
For exterior routing, an AS needs a globally unique
AS 16-bit integer number
Currently, there are about 11,000 registered ASs in
Internet (and growing)
Stub AS, which is the most common type, does not
need an AS number since the prefixes are placed at
the provider’s routing table
Transit AS needs an AS number
Request an AS number from the ARIN, RIPE and
APNIC
ARIN: American Registry for Internet Numbers
RIPE: Réseaux IP Européens
APNIC: Asia Pacific Network Information Centre
Inter and Intra Domain Routing
Interior Gateway Protocol (IGP): routing within AS
• RIP, OSPF, IGRP, EIGRP, IS-IS
Exterior Gateway Protocol (EGP): routing between AS’s
• BGPv4
Border Gateways perform IGP & EGP routing
IGP
R EGP IGP
R R
R
R
R
AS A
AS C
R
R
IGP
AS B
Inter and Intra Domain Routing
10.5.1.3 10.5.1.5
At steady state:
All routers have same LS database
Occasional Hello messages (10 sec) & LS updates sent (30 min)
OSPF Network
To improve scalability, AS may be partitioned into areas
Area is identified by 32-bit Area ID
Router in area only knows complete topology inside area & limits
the flooding of link-state information to area
Area border routers summarize info from other areas
Each area must be connected to backbone area (0.0.0.0)
Distributes routing info between areas
Internal router has all links to nets within the same area
Area border router has links to more than one area
Backbone router has links connected to the backbone
OSPF Areas
To another AS
N1 R1 N5
N2 R3 R6 N4 R7
R2 N6
R4
R5
N3
Area 0.0.0.2
Area 0.0.0.1 R8 Area 0.0.0.0
ABR: 3, 6, 8
N7
IR: 1,2,7
BR: 3,4,5,6,8
R = router
Area 0.0.0.3 N = network
Neighbor, Adjacent & Designated
Routers
Neighbor routers: two routers that have interfaces to a
common network
Neighbors are discovered dynamically by Hello protocol
Each neighbor of a router described by a state
Adjacent router: neighbor routers become adjacent when
they synchronize topology databases by exchange of link
state information
Neighbors on point-to-point links become adjacent
Routers on multiaccess nets become adjacent only to designated &
backup designated routers
Reduces size of topological database & routing traffic
Designated Routers
Reduces number of adjacencies
Elected by each multiaccess network after
neighbor discovery by hello protocol
Election based on priority & id fields
Generates link advertisements that list routers
attached to a multi-access network
Forms adjacencies with routers on multi-access
network
Backup prepared to take over if designated
router fails
Link State Advertisements
Link state info exchanged by adjacent routers to allow
area topology databases to be maintained
inter-area & inter-AS routes to be advertised
OSPF Protocol
OSPF packets transmitted directly on IP
datagrams; Protocol ID 89
OSPF packets sent to multicast address
224.0.0.5 (allOSPFRouters on pt-2-pt and
broadcast nets)
OSPF packets sent on specific IP addresses
on non-broadcast nets
Five OSPF packet types:
Hello
Database description
Link state request; Link state update; Link state
ack
OSPF Header
0 8 16 31
Router ID
Area ID
OSPF
common
Checksum Authentication type header
Authentication
Authentication
OSPF
packet
Data
body
R1 R4
N1
AS1 AS3
R2 R3
N1 reachable
through AS2 AS2
R1 R4
N1
AS1 AS3
• EGP routers within an AS, e.g. R3 and R2, are kept consistent
• Suppose AS2 willing to handle transit packets from AS1 to N1
• R2 advertises to AS1 the reachability of N1 through AS2
• R1 applies its policy to decide whether to send to N1 via AS2
Peering and Inter-AS connectivity
Peering Centre
AS
Tier 2 (transit AS)
Tier 2 (transit AS) Content or Application
Service Provider (Non- Tier 2 (transit AS)
AS AS transit)
AS AS AS AS
• Non-transit AS’s (stub & multihomed) do not carry transit traffic
• Tier 1 ISPs peer with each other, privately & peering centers
• Tier 2 ISPs peer with each other & obtain transit services from Tier 1s; Tier 1’s carry transit traffic
between their Tier 2 customers
• Client AS’s obtain service from Tier 2 ISPs
EGP Requirements
Scalability to global Internet
Provide connectivity at global scale
Link-state does not scale
Should promote address aggregation
Fully distributed
EGP path selection guided by policy rather
than path optimality
Trust, peering arrangements, etc
EGP should allow flexibility in choice of paths
Border Gateway Protocol v4
AS2
AS1 AS6
AS3 AS5
AS4 AS7
BGP (RFC 1771) an EGP routing protocol to exchange network
reachability information among BGP routers (also called BGP speakers)
Network reachability info contains sequence of ASs that packets traverse
to reach a destination network
Info exchanged between BGP speakers allows a router to construct a
graph of AS connectivity
Routing loops can be pruned
Routing policy at AS level can be applied
BGP Features
BGP is path vector protocol: advertises
sequence of AS numbers to the destination
network
Path vector info used to prevent routing loops
BGP enforces policy through selection of
different paths to a destination and by control
of redistribution of routing information
Uses CIDR to support aggregation &
reduction of routing information
BGP Speaker & AS Relationship
BGP speaker: a router running BGP
Peers or neighbors: two speakers exchanging information
on a connection
BGP peers use TCP (port 179) to exchange messages
Initially, BGP peers exchange entire BGP routing table
Incremental updates sent subsequently
R R R
iBGP eBGP
R eBGP
192.168.0.10;x
128.100.10.15;y
Private Network
NAT Public Network
192.168.0.13;w
Device
128.100.10.15; z
Home
Care-Of-Address
agent
Internet
Home Agent (HA) keeps track of location of each Mobile Host (MH) in its
network; HA periodically announces its presence
If an MH is in home network, e.g. MH#1, HA forwards packets directly to MH
When an MH moves to a Foreign network, e.g. MH#2, MH obtains a care-of-
address from foreign agent (FA) and registers this new address with its HA
Routing in Mobile IP Foreign
network
Home Foreign
network agent Mobile
host
2
Home
agent
Internet
3
Correspondent
host
IP header IP header
IP payload IP payload
Home Foreign
network agent Mobile
host
2a
Home
agent
Internet 3 4
1
2b
Correspondent
host
Going to HA inefficient if CH and MH are in same foreign network
When HA receives pkt from CH (1), it tunnels using care-of-
address (2a); HA also sends care-of-address to CH (2b)
CH can then send packets directly to care-of-address (4)