You are on page 1of 21

BGP Overview

Understanding BGP Path Attributes

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-1


Outline

• Overview
• BGP Path Attributes
• Well-Known BGP Attributes
• Optional BGP Attributes
• AS-Path Attribute
• Next-Hop Attribute
• Summary

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-2


BGP Path Attributes

• BGP metrics are called path attributes.


• BGP attributes are categorized as “well-known” and
“optional.”
• Well-known attributes must be recognized by all
compliant implementations.
• Optional attributes are recognized only by some
implementations (could be private); expected not to be
recognized by all.

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-3


Well-Known BGP Attributes

Well-known attributes are divided into mandatory


and discretionary.
• Mandatory well-known attributes must be present in all
update messages.
• Discretionary well-known attributes are optional; they could
be present in update messages.
• All well-known attributes are propagated to other neighbors.

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-4


Mandatory Well-Known BGP Attributes

• Origin
– The origin of a BGP route
• i Route originated in an IGP
• e Route originated in EGP
• ? Route was redistributed into BGP
• AS-path
– Sequence of AS numbers through which the network is
accessible
• Next-hop
– IP address of the next-hop router

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-5


Discretionary Well-Known BGP Attributes

• Local preference
– Used for consistent routing policy within AS
• Atomic aggregate
– Informs the neighbor AS that the originating router
aggregated routes

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-6


Optional BGP Attributes

Optional BGP attributes are transitive or nontransitive.


• Transitive optional attributes
– Propagated to other neighbors if not recognized; partial bit set to
indicate that the attribute was not recognized
• Nontransitive optional attributes
– Discarded if not recognized

Recognized optional attributes are propagated to


other neighbors based on their meaning (not
constrained by transitive bit).

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-7


Optional BGP Attributes (Cont.)

Nontransitive attributes
• Multi-exit discriminator
– Used to discriminate between multiple entry points to a single
AS
Transitive attributes
• Aggregator
– Specifies IP address and AS number of the router that performed
route aggregation
• Community
– Used for route tagging

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-8


AS-Path Attribute

• The AS-path attribute is empty when a local route is


inserted in the BGP table.
• The AS number of the sender is prepended to the AS-
path attribute when the routing update crosses AS
boundary.
• The receiver of BGP routing information can use the
AS-path attribute to determine through which AS the
information has passed.
• An AS that receives routing information with its own AS
number in the AS path silently ignores the information.

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-9


AS-Path Attribute Example

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-10


AS-Path Attribute Example

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-11


AS-Path Attribute Example

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-12


Next-Hop Attribute

• Indicates the next-hop IP address used for packet


forwarding
• Usually set to the IP address of the sending External
Border Gateway Protocol (EBGP) router
• Can be set to a third-party IP address to optimize
routing

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-13


Next-Hop Attribute Example

Next-Hop Processing

• Next-hop attribute is usually set to the IP address of the sending


router.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-14
Next-Hop Attribute Example

Next-Hop Processing

•Next-hop attribute is usually set to the IP address of the sending


router.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-15
Next-Hop Attribute Example
Next-Hop Processing
on Shared Media

• If the receiving BGP router is in the same subnet as the current next-hop address,
the next-hop address remains unchanged to optimize packet forwarding.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-16
Next-Hop Attribute Example
Next-Hop Processing
on Shared Media

• If the receiving BGP router is in the same subnet as the current next-hop address,
the next-hop address remains unchanged to optimize packet forwarding.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-17
Next-Hop Attribute Example
Next-Hop Processing
on NBMA Network

• BGP next-hop processing can break connectivity with improper network


designs over partially meshed WAN networks.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-18
Next-Hop Attribute Example
Next-Hop Processing
on NBMA Network

• BGP next-hop processing can break connectivity with improper network


designs over partially meshed WAN networks.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-19
Summary

• BGP metrics attached to a BGP route are called “path


attributes.”
• Some path attributes are well-known and should be recognized
by every BGP implementation. Some of the well-known
attributes are mandatory and have to be present in every BGP
update. These are the AS-path, next-hop, and origin attributes.
Other well-known attributes are discretionary.
• Attributes that are not required to be recognized by every BGP
implementation are called “optional.” These attributes could
be transitive (propagated if not recognized) or nontransitive
(dropped).

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-20


Summary (Cont.)

• The AS-path attribute lists the autonomous systems that the


routing update has already crossed. This attribute is used for
BGP loop detection and BGP route selection.
• The next-hop attribute specifies the IP address that is to be
used for packet forwarding. The next hop is usually set to the
IP address of the BGP router sending the update.

© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-21

You might also like