BGP Attributes

BGP's flexibility comes from configurable parameters called attributes that may be adjusted manually in the Cisco IOS. BGP attributes are classified into four categories:

  • Well-known Must be implemented in all BGP routers.

  • Mandatory Must be present in all BGP update messages; otherwise, the BGP connection is incompatible and will fail.

  • Discretionary May or may not be present in all BGP update messages; however, if they are present, discretionary attributes must be recognized by all BGP implementations.

  • Optional Do not have to be recognized by all BGP implementations because the type of optional attribute determines whether the information is passed on to other peers if the option is unrecognized. The two types of attributes are as follows:

    - Transitive optional attributes are passed on to other peers.

    - Non-transitive optional attributes, if unrecognized, are ignored and not passed on to other BGP peers.

BGP attributes are translated into a community value by the route map, which is in turn translated back into a BGP attribute by the receiving EBGP Peer. A community attribute provides BGP routers a way of grouping destinations, called communities, for which routing decisions (such as acceptance, preference, and redistribution) can be applied as a whole. Community Values identify these attributes.

The initial BGP specification (RFC 1771) defines seven attributes, as detailed in Table D-1.

Table D-1. RFC 1771 BGP Attributes

Attribute

Type

Flags

Value

ORIGIN

1

Well known

IGP (0)

EGP (1)

Incomplete (2)

AS_PATH

2

Well known

ASNs in the path

NEXT_HOP

3

Well known

Address of the next router

MULTI_EXIT_DESC (MED)

4

Optional, local

32 bit metric

LOCAL_PREF

5

Well known

32 bit metric

ATROMIC_AGGREGATE

6

Well known

Flags certain aggregations

AGGREGATOR

7

Operational, transitive

AS number and router ID

AS-Path Attribute

The AS-path attribute is a list of all the autonomous systems (ASes) a routing update has traversed. When an update passes through an AS, BGP prepends its AS number onto the existing AS path in the update.

Origin Attribute

The origin attribute indicates how reachability information through the path was obtained from the source, or origin, of the BGP update. This attribute has the following three values:

  • IGP (Internal) Indicates that the route originated within the AS of the advertising router.

  • EGP (External) Indicates that the route was learned via another router using an exterior gateway protocol, such as EBGP.

  • Incomplete Indicates that the origin of the route was learned by some means other than EGP or redistributed from an IGP.

Next Hop Attribute

Before a BGP peer can be told what the next hop is for reaching a particular AS, the router sending the updates adjusts the value of the next hop attributes. For EBGP, this attribute is usually the IP address. For IBGP, this attribute often is the address of the EBGP peer in the neighboring AS.

The next hop attribute is used to optimize BGP routing.

Weight Attribute

This is a Cisco proprietary BGP attribute that was added to assist in the BGP path selection process. Adjustments to the weight attribute can affect which route is preferred when multiple paths exist to the same destination. The weight attribute is present only on the local router and is not propagated to other BGP peers. Routes originated by the router are assigned a default weight of 32768; the range for this attribute is 0 to 65535; the larger the weight, the greater the preference of that path. Other paths learned by the router are assigned a value of zero.

Multi-Exit Discriminator (MED) Attribute

The MED is a non-transitive attribute and is defined as a metric that is used to convey the relative preference of entry points into an AS. The MED is assigned a value of zero by default when an update is generated. Lower MED values are the preferred values in an update. The MED is used to calculate the cost of using a particular router for reaching the next group in the AS.

Unlike the local preference attribute, the MED attribute is exchanged between ASes. However, because the MED attribute is non-transitive, the MED value for a destination is reset to zero when it leaves the neighboring Autonomous System, unless the AS is configured explicitly to propagate MED information into other ASes.

A set of path exchanges by BGP routers (internal to an AS) may include several nearly identical paths to destination, with the MED value and the next-hop attributes being the only differentiator. These paths should not be aggregated, or summed, by the router because they should use the MED value to select the preferred, or "best," exit point from the AS.

MED values received for the same destination from multiple ASes are usable only if the receiving router has the bgp always-compare-med configured. If the MED comparison is not configured, the MED value of the routing updates will not be used in the path selection process.

Local Preference Attribute

The local preference attribute is another way (aside from the weight attribute) used to affect the path selection process. Unlike the weight attribute, the local preference attribute is propagated via routing updates to other routers in the AS. The values for this attribute range from 0 to 255, with a local preference value of 100 being the default. The path with a highest preference is the preferred.

The various AS border routers may learn several paths that lead to the same routing prefixes. These paths will be propagated inside the AS; however, each of the BGP border gateways will select the path with the lowest local preference value.

Atomic Aggregate Attribute

The atomic aggregate attribute does not have content; its length is always zero. This attribute indicates that the router chose to pass an aggregated prefix. The aggregated prefix is a prefix that aggregates, or summarizes, several short prefixes. There may be more specific routes for longer network prefixes, but the BGP router chose to hide them to reduce the size of the AS path parameters.

Aggregator Attribute

The aggregator attribute is inserted by the AS that made the decision to aggregate the network prefix. This value is six octets in length, consisting of the 16-bit ASN and the 32-bit IP address of the router performing the aggregation.

Additional Attributes

There are additional attributes supported by BGP, developed in later RFCs, that are beyond the scope of this book. Following is a complete list of these attributes and their respective RFC specification.

Table D-2. BGP Full Attribute Values (as of April 30, 2001)

Attribute Value

Description

Reference

1

ORIGIN

RFC 1771

2

AS_PATH

RFC 1771

3

NEXT_HOP

RFC 1771

4

MULTI_EXIT_DISC

RFC 1771

5

LOCAL_PREF

RFC 1771

6

ATOMIC_AGGREGATE

RFC 1771

7

AGGREGATOR

RFC 1771

8

COMMUNITY

RFC 1997

9

ORIGINATOR ID

RFC 1998

10

CLUSTER_LIST

RFC 1998

11

DPA

Chen

12

ADVERTISER

RFC 1863

13

RCID_PATH / CLUSTER_ID

RFC 1863

14

MP_REACH_NLRI

RFC 2283

15

MP_UNREACH_NLRI

RFC 2283

16

EXTENDED COMMUNITIES

Rosen

17 255

Reserved for future development

-----



Network Sales and Services Handbook
Network Sales and Services Handbook (Cisco Press Networking Technology)
ISBN: 1587050900
EAN: 2147483647
Year: 2005
Pages: 269

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net