Network Bulls
www.networkbulls.com
Best Institute for CCNA CCNP CCSP CCIP CCIE Training in India
M-44, Old Dlf, Sector-14 Gurgaon, Haryana, India
Call: +91-9654672192
Border Gateway Protocol (BGP) advertises, learns, and chooses the best paths inside the
global Internet. When two ISPs connect, they typically use BGP to exchange routing information.
Collectively, the ISPs of the world exchange the Internet’s routing table using
BGP. And Enterprises sometimes use BGP to exchange routing information with one or
more ISPs, allowing the Enterprise routers to learn Internet routes.
One key difference when comparing BGP to the usual IGP routing protocols is BGP’s robust
best path algorithm. BGP uses this algorithm to choose the best BGP path (route) using
rules that extend far beyond just choosing the route with the lowest metric. This more
complex best path algorithm gives BGP the power to let engineers configure many different
settings that influence BGP best path selection, allowing great flexibility in how
routers choose the best BGP routes.
BGP Basics
BGP, specifically BGP Version 4 (BGPv4), is the one routing protocol in popular use today
that was designed as an Exterior Gateway Protocol (EGP) instead of as an Interior Gateway
Protocol (IGP). As such, some of the goals of BGP differ from those of an IGP such as
OSPF or EIGRP, but some of the goals remain the same.
First, consider the similarities between BGP and various IGPs. BGP does need to advertise
IPv4 prefixes, just like IGPs. BGP needs to advertise some information so that routers can
choose one of many routes for a given prefix as the currently best route. As for the mechanics
of the protocol, BGP does establish a neighbor relationship before exchanging
topology information with a neighboring router.
Next, consider the differences. BGP does not require neighbors to be attached to the same
subnet. Instead, BGP routers use a TCP connection (port 179) between the routers to pass
BGP messages, allowing neighboring routers to be on the same subnet, or to be separated
by several routers. (It is relatively common to see BGP neighbors who do not connect to
the same subnet.) Another difference lies in how the routing protocols choose the best
route. Instead of choosing the best route just by using an integer metric, BGP uses a more
complex process, using a variety of information, called BGP path attributes, which are
exchanged in BGP routing updates much like IGP metric information.
Table 12-4 summarizes some of these key comparison points.
www.CareerCert.info
Chapter 12: Internet Connectivity and BGP 397
Table 12-4 Comparing OSPF and EIGRP Logic to BGP
OSPF/EIGRP BGP
Advertises prefix/length Advertises prefix/length, called Network Layer
Reachability Information (NLRI.)
Advertises metric information Advertises a variety of path attributes (PA) that
BGP uses instead of a metric to choose the best
path.
Emphasis on fast convergence to the truly
most efficient route
Emphasis on scalability; may not always choose
the most efficient route.
Link state (OSPF) or distance vector
(EIGRP) logic
Path vector logic (similar to distance vector).
BGP ASNs and the AS_SEQ Path Attribute
BGP uses BGP path attributes (PA) for several purposes. PAs define information about a
path, or route, through a network. Some BGP PAs describe information that can be useful
in choosing the best BGP route, using the best path algorithm; BGP also uses some other
PAs for other purposes besides choosing the best path. This chapter focuses on one particular
PA that routers use when choosing the best path, and using this PA to help prevent
loops. Later, in Chapter 15, the text explores PAs in more detail, in the context of how to
use those PAs as a tool to achieve some design goal.
By default, if no BGP PAs have been explicitly set, BGP routers use the BGP AS_PATH
(autonomous system path) PA when choosing the best route among many competing
routes. The AS_Path PA itself has many subcomponents, only some of which matter to the
depth of the CCNP coverage of the topic. However, the most obvious component of
AS_Path, the AS_Seq (AS Sequence), can be easily explained with an example when the
concept of an autonomous system number (ASN) has been explained.
The integer BGP ASN uniquely identifies one organization that considers itself autonomous
from other organizations. Each company whose Enterprise network connects
to the Internet can be considered to be an autonomous system and can be assigned a BGP
ASN. (IANA/ICANN also assigns globally unique ASNs.) Additionally, each ISP has an
ASN, or possibly several, depending on the size of the ISP.
When a router uses BGP to advertise a route, the prefix/length is associated with a set of
PAs, including the AS_Path. The AS_Path PA associated with a prefix/length lists the
ASNs that would be part of an end-to-end route for that prefix as learned using BGP. In a
way, the AS_Path implies information like this: “If you use this path (route), the path will
go through this list of ASNs.”
BGP uses the AS_Path to perform two key functions:
■ Choose the best route for a prefix based on the shortest AS_Path (fewest number of
ASNs listed).
■ Prevent routing loops.
Key
Topic
www.CareerCert.info
398 CCNP ROUTE 642-902 Official Certification Guide
198.133.219.16/29
192.31.7.32/29
Company 1 Company 2
ISP1 ASN 1
ASN 11 ASN 12
ISP3 ASN3 ISP2 ASN2
I1
I2
I1-1 I1-2
I2-1
I2-2
I3-1
I3-2
Figure 12-4 Sample Portion of the Internet
An example can help demonstrate the concept. This example, and some others in this
chapter, use the design shown in Figure 12-4. This network has five ASNs: three ISPs and
two customers.
Figure 12-4 shows only a couple of routers in each ISP, and it also does not bother to
show much of the Enterprise networks for the two companies. However, the diagram does
show enough detail to demonstrate some key BGP concepts. For the sake of discussion,
assume each line between routers represents some physical medium that is working. Each
router will use BGP, and each router will form BGP neighbor relationships with the routers
on the other end of each link. For example, ISP1’s I1-2 router will have a BGP neighbor relationship
with Routers I1-1 and with I2-1.
With that in mind, consider Figure 12-5, which shows the advertisement of BGP updates
for prefix 192.31.7.32/29 to the other ASNs:
The figure shows four steps, as follows:
Step 1. I2, in ASN 12, advertises the route outside ASN 12. So, I2 adds its own ASN
(12) to the AS_Path PA when advertising the route.
Step 2. The routers inside ASN 2, when advertising the route outside ASN 2, add their
own ASN (2) to the AS_Path PA when advertising the route. Their advertised
AS_Path is then (12,2).
Step 3. Router I3-1, inside ASN 3, had previously learned about the route for
192.31.7.32/29 from ASN 2, with AS_Path (12,2). So, I3-1 advertises the route
to ASN 1, after adding its own ASN (3) to the AS_Path so that the AS_Path
(12, 2, 3).
ceive BGP updates that list the same prefix used by Company 1, but both Updates list an
AS_Path that includes ASN 12. Because ISP1 thinks it uses ASN 12, ISP1 thinks that these
BGP Updates should be ignored as part of the BGP loop prevention process. As a result,
customers of ISP1 cannot reach the prefixes advertised by routers in Company 1.
To prevent such issues, IANA controls the ASN numbering space. Using the same general
process as for IPv4 addresses, ASNs can be assigned to different organizations. The 16-bit
BGP ASN implies a decimal range of 0 through 65,535. Table 12-5 shows some of the details
of IANA’s current ASN assignment conventions.
Like the public IPv4 address space has suffered with the potential for complete depletion
of available addresses, the public BGP ASN space has similar issues. To help overcome this
issue, the ASN assignment process requires that each AS justify whether it truly needs a
publicly unique ASN or whether it can just as easily use a private ASN. Additionally, RFC
Table 12-5 16-Bit ASN Assignment Categories from IANA
Value or Range Purpose
0 Reserved
1 through 64,495 Assignable by IANA for public use
64,496 through 65,511 Reserved for use in documentation
64,512 through 65,534 Private use
65,535 Reserved
Key
Topic
www.CareerCert.info
402 CCNP ROUTE 642-902 Official Certification Guide
5398 reserves a small range of ASNs for use in documentation so that the documents can
avoid the use of ASNs assigned to specific organizations.
Private ASNs allow the routers inside an AS to participate with BGP, while using the same
ASN as many other organizations. Most often, an AS can use a private AS in cases where
the AS connects to only one other ASN. (Private ASNs can be used in some cases of connecting
to multiple ASNs as well.) The reason is that with only one connection point to another
ASN, loops cannot occur at that point in the BGP topology, so the need for unique
ASNs in that part of the network no longer exists. (The loops cannot occur due to the
logic behind the BGP best path algorithm, coupled with that BGP only advertises the best
path for a given prefix.)
No comments:
Post a Comment