Chapter 4 Advanced Internetworking

Chapter 4 Advanced Internetworking
• Problem: How to build a scalable routing system, i.e., a routing system that can
handle hundreds of thousands of networks?
o Solution: Divide the routing problem into two parts - intradomain
routing and interdomain routing
o We study interdomain routing in this chapter
• The Internet consists of Autonomous Systems (ASes), also known as routing
domains
o An AS is a collection of routers and networks under a single
administrative control
 E.g., the internal network of a university, a corporation, or an ISP
is an AS
o Each AS is assigned a unique 32-bit number
• There are three types of ASes in the Internet
o A stub AS has only a single connection to one other AS, it only carries
local traffic, i.e., traffic that originates at or terminates on the nodes
within the AS
o A multihomed AS has connections to more than one other AS but
refuses to carry transit traffic, i.e., traffic that passes through the AS
o A transit AS has connections to more than one other AS and carries both
local traffic and transit traffic
• Two levels of routing in the Internet
o Intradomain routing (i.e., routing within a single AS) focuses on finding
optimal paths based on minimizing the scalar cost of the path
o Each AS selects its own intradomain routing protocols (e.g., RIP,
OSPF)
o Interdomain routing (i.e., routing between ASes) focuses on finding
non-looping, policy-compliant paths
 Each AS has its own routing policies, e.g., “I prefer to send traffic
via AS X than via AS Y, but I will use AS Y if it is the only path, and I
never want to carry traffic from AS X to AS Y or vice versa.”
• Challenges in Interdomain Routing
o The interdomain routing system must support complex policies and
focus on finding non-looping, policy-compliant paths
o An Internet backbone router must be able to forward any packet
destined anywhere in the Internet
 This means a backbone router must have a routing table that will
provide a match for any valid IP address
o Each AS chooses its own scheme to assign link costs, so it is impossible
to pick an optimal path
 Interdomain routing advertises only reachability (e.g., “You can
reach this network through this AS”);
• The Border Gateway Protocol (BGP) – the Internet’s interdomain routing
protocol
o Each AS has one or more border routers through which packets enter
and leave the AS
o Each AS that participates in BGP has at least one BGP speaker, a router
that speaks BGP to other BGP speakers in other ASes
 Border routers are often BGP speakers
o A BGP speaker advertises complete paths as an enumerated lists of ASes
to reach a particular network prefix. For this reason, BGP is called a
path-vector protocol.
o Advertising complete paths enables routing loop detection and policy
enforcement
 Loop detection: If AS X receives an advertisement from AS Y
saying “Network 128.34 can be reached along the path <Y, F, X,
G>, AS X will not use the path as AS X is in this path
 Policy enforcement: In the above example. AS X will not use the
path if it has a policy “Never use AS F to carry my traffic”.
o A BGP speaker only advertises the best route to a destination
 If a BGP speaker has several different routes to a destination, it
will choose the best one according to its own local policies, and
then advertises that route
o A BGP speaker does not have to advertise any route to a destination,
even if it has one
 This allows an AS to implement a policy of not providing transit by
not advertising routes to prefixes that are not contained within
the AS
o A BGP speaker can cancel previously advertised paths (due to link
failures and policy changes) through negative advertisement
o BGP runs on top of TCP
• Common AS relationships and policies
o Provider-Customer: A provider connects its customers to the rest of the
Internet (A customer may be a stub or a smaller ISP with its own
customers)
 The common policy of the provider is to advertise all the routes I
know about to my customer, and advertise routes I learn from my
customer to everyone
 The common policy of the customer is to advertise my own
prefixes and routes learned from my customers to my provider,
advertise routes learned from my provider to my customers, but
don’t advertise routes learned from one provider to another
provider (i.e., not providing transit between providers)
o Peer: two ASes who view themselves as equals usually peer so that they
can get access to each other’s customers without paying another
provider
 The typical policy is to advertise routes learned from my
customers to my peer, advertise routes learned from my peer to
my customers, but don’t advertise routes learned from my peer to
any provider or vice versa
• Integrating interdomain and intradomain routing: BGP speakers learn
interdomain routing information; how do all the other routers in an AS get this
information?
o Stub AS: it connects to another AS at the border router
 The border router injects a default route into the intradomain
routing protocol, causing all routers in the AS to add a default
entry in their forwarding tables.
 The default entry indicates that any network that has not been
explicitly advertised in the intradomain routing protocol is
reachable through the border router.
o Provider AS
 Suppose the border router that connects to a customer AS learns
that a particular network prefix is located inside the customer AS,
it injects a route to that prefix (“I have a link to the prefix with
cost X”) into the intradomain routing protocol.
• This causes other routers in the provider AS to learn that
this border router is the place to send packets destined for
that prefix
 The border router that connects to the backbone network injects
a default route into the intradomain routing protocol. This
indicates that any network that has not been explicitly advertised
in the intradomain routing protocol is reachable through the
border router
o Backbone networks
 A backbone router’s routing table must provide a match for any
valid IP address
 Each router in the backbone AS learns the best border router to
use to reach any prefix using a variant of BGP called interior BGP
(iBGP).
 At the same time, each router in the backbone AS learns how to
get to each border router using an intradomain routing protocol.
 Each router then determines the appropriate next hop for any
prefix reachable via some border router by combining the above
two sets of information.