Interdomain Routing with BGP
Author: Carol Kavalla, Global Knowledge
Instructor
Abstract
Border Gateway Protocol (BGP) is a very complex routing protocol
where the administrator can influence the route choice in more ways
than with an interior gateway protocol. This white paper provides
you with a high-level overview of interdomain routing with BGP,
including: interior vs. exterior gateway protocol; basic
characteristics of BGP; attributes of BGP; how relationships
between BGP neighbors are defined; and how BGP chooses the best
path. It will also provide you with a review of the function of a
router and how a router installs routes in its table.
Sample
Routing Basics
The function of a router is to find a path to a destination
network and forward packets. The path a packet takes is ultimately
derived from information received from a routing protocol
neighbor.
If more than one routing protocol is enabled on a router, it
will install the route with the lower administrative distance for
identical routes learned. If there is only one routing protocol
enabled on a router, the router will install the route with the
lowest metric (for example: hop count; cost; or bandwidth and
delay).
Several alternate paths to a destination network may exist, but
only the best next hop is stored in the routing (or forwarding)
table. Depending on the routing protocol, a router can store
several equal cost paths in its routing table. When the topology of
a network changes, a router will attempt to install an alternate
path and will then continue to forward packets along that alternate
path.
The IP route lookup is done on the destination IP address in the
IP packet and is based on "longest match" routing. A more specific
prefix is preferred over a less specific prefix. For example: an IP
packet with a destination address of 192.168.100.33/27 is sent to
the router announcing the 192.168.100.32/27 rather the one
announcing the 192.168.100.0/24 network.
After determining the longest match for a particular route, the
router then determines to which interface the IP packet is to be
sent and switches out the packet to that interface.
Routing decisions in BGP are based on routing policies and
metrics, more accurately referred to as attributes (more on this
later).
Interior Gateway Protocol vs. Exterior Gateway Protocol
A routing protocol can route packets within an autonomous system
(AS) or between autonomous systems. An AS is a network or group of
networks under a common administration and with common routing
policies.
BGP is used to exchange routing information in the Internet
between Internet Service Providers (ISP)-autonomous systems.
Enterprise networks make use of Interior Gateway Protocols (IGP)
such as Enhanced Interior Gateway Protocol (EIGRP) or Open Shortest
Path First (OSPF) for the exchange of routing information within
their Autonomous Systems. Larger users connected to ISP's, and ISPs
use BGP to exchange customer and Internet routes. When BGP is used
between autonomous systems, the protocol is referred to as External
BGP (EBGP). When BGP is used to exchange routes within an AS, then
the protocol is referred to as Interior BGP (IBGP).
| Interior Gateway Protocol |
Exterior Gateway Protocol |
| Automatic neighbor discovery |
Specifically configured peers |
| Generally trust your IGP routers |
Connecting with outside networks |
| Binds routers in one AS together |
Sets administrative boundaries |
Basic Characteristics
Basic characteristics of BGP include:
- BGP is a distance vector protocol with enhancements:
- Reliable updates
- Triggered updates only
- Rich metrics (called path attributes)
- Designed to scale to huge internetworks
BGP uses TCP, port 179, as its transport protocol. Because TCP
is a reliable transport protocol, it makes it unnecessary for BGP
to utilize acknowledgement packets for reliability.
When two BGP neighbors first exchange routing information, they
exchange their entire BGP Routing Information Bases (RIB)-best
paths only. After the initial exchange, they only send
triggered-updates. Cisco's implementation of BGP batches the
updates and sends them periodically. The default batch timer is
every 5 seconds for Internal BGP peers and every 30 seconds for
External BGP peers. If there are no triggered updates, BGP peers
send keepalives every 60 seconds (default).
BGP was designed to be implemented in an extremely large
network, such as the Internet. The developers of BGP decided that
scalability was more important than fast convergence of topology
changes, because it was expected that a very large network would
have changing routes. Consequently, today BGP has been able to
scale to over 290,000 routes, and it converges slowly compared to
an internal gateway protocol like OSPF.
BGP is used when customers are multihomed or are connected to
two different service providers. Internet Service Providers also
employ BGP, both within their autonomous system (IBGP) and between
autonomous systems (EBGB).
Attributes of BGP
BGP attributes have a similar function to IGP metrics. Routes
learned via BGP have associated properties or attributes that are
used to determine the best path to a destination network when
multiple paths exist. These properties are called path
attributes.

Related Courses