Tuesday, February 9, 2010

BGP--Route Selection Using Attributes

Route Selection Using Attributes

Attributes fall into multiple categories.

Well-known means that all implementations must support the attribute.

Optional attributes do not need to be recognized by the BGP implementation.

There are two categories of well-known attributes. They are mandatory and discretionary.

Mandatory attributes must be included in all messages.

Discretionary attributes do not need to be included in a message.

Mandatory Well-Known attributes are as follows:

Origin

AS-Path

Next-hop IP

Discretionary Well-Known attributes are those below:

Local Preference

Atomic Aggregate

Optional attributes can be either transitive or nontransitive.

Non-transitive means the metric is not carried far.

Transitive means that they are kept and carried beyond the local neighbors.

The MED is an optional nontransitive attribute.

The aggregator and community are optional transitive attributes.

The AS-path stores the list of AS numbers traversed for a network advertisement.

The next-hop attribute is the next-hop IP that will be used. Use caution with this attribute on multipoint NBMA networks. The next-hop-self keyword may be needed.

Weight is the first attribute considered in route selection. A higher weight is preferred. Weight is not advertised. It is only used to influence the path selection to an outbound network from a single router.

Local Preference works like the weight attribute for path selection. However, it affects the entire AS.

AS-Path Prepending influences how other autonomous systems reach your network. Remember to prepend your own AS number, otherwise the advertisement will be dropped. Prepend additional AS numbers onto the path that you are attempting to devalue.

The Multi-Exit Discriminator, AKA “metric”, is used to influence how a neighboring AS reaches your network. Higher metric values are perceived as worse.

Communities allow route tagging. Once routes have been tagged, they may be filtered. Communities are 32 bit values represented in decimal values separated by a colon. 2000:100 is an example of a community value. The first 16 bits represent the AS number. The last 16 bits represent the tag value.

There are four special community values.

No-export: will not be advertised beyond the confederation

Internet: equivalent to any

No-advertise: never advertise this route

Local-AS: will not be advertised outside of the AS (even with regards to confederations)

No comments: