
Configuring BGP Services
5-17
How BGP Selects the Best Path
A BGP speaker must, at times, evaluate and compare different paths to a
destination network to determine the best path. Because all border routers must
provide the same view of the AS to external ASs, having a selection strategy that
is consistent in the router, and that can be consistent across all border routers, is
very important in BGP. To select the best available path, BGP uses AS weights
and classes and IP policies. To compare IBGP routes, BGP-4 can also calculate
and use a Local Preference value. These mechanisms are described in the
following sections.
AS Weight and Class Values
You can assign a weight class to any AS number and a weight value to a weight
class.
AS weight classes allow a network administrator to assign multiple weight values
to the same AS. This feature allows the administrator to consider an AS path
differently for different networks. For example, consider a situation in which two
networks — 192.32.1.0 and 192.32.2.0 — are both reachable by two paths. The
first path to each network shares a common AS — AS 5. The second path to each
network also shares a common AS — AS 10. If the administrator for some reason
wants to favor AS 5 in the path to 192.32.1.0 and AS 10 in the path to 192.32.2.0,
he or she can assign one weight class to the AS as a component in the path to
network 192.32.1.0 and another class to the AS component in the path to
192.32.2.0.
An assigned weight can range from 1 to 15 plus an infinity value. Weights provide
a way either to prefer or to avoid routes that pass through certain ASs. The weights
of each AS in a path are added, and the path with the smallest total weight is the
preferred path. Any path containing an AS weight of infinity will be avoided.
When a BGP router receives a new route, it is evaluated against any existing
accept policies. If after this evaluation, the path still is to be used, the total weight
of the path is calculated.
AS weights should be configured the same on all BGP routers in an AS.
For instructions on assigning weight and class values to an autonomous system, see
“Configuring BGP AS Weights and Weight Classes” on page 5-47.
Kommentare zu diesen Handbüchern