BGP Attributes
Local Preference Attribute
Metric (Multi-Exit Discriminator) Attribute
382
NE2552E Application Guide for ENOS 8.4
The following two BGP attributes are discussed in this section: Local preference
and metric (Multi‐Exit Discriminator).
When there are multiple paths to the same destination, the local preference
attribute indicates the preferred path. The path with the higher preference is
preferred (the default value of the local preference attribute is 100). Unlike the
weight attribute, which is only relevant to the local router, the local preference
attribute is part of the routing update and is exchanged among routers in the same
AS.
The local preference attribute can be set in one of two ways:
Using the BGP default local preference method, affecting the outbound
direction only.
NE2552E(config)# router bgp
NE2552E(config_router_bgp)# local-preference <0-4294967294>
NE2552E(config_router_bgp)# exit
Using the route map local preference method, which affects both inbound and
outbound directions.
NE2552E(config)# route-map 1
NE2552E(config_route_map)# local-preference <0-4294967294>
NE2552E(config_route_map)# enabled
NE2552E(config_router_map)# exit
NE2552E(config)# router bgp
NE2552E(config_router_bgp)# neighbor {<number>/group <number>} route-map
{<in/out> <1‐255>}
This attribute is a hint to external neighbors about the preferred path into an AS
when there are multiple entry points. A lower metric value is preferred over a
higher metric value. The default value of the metric attribute is 0.
Unlike local preference, the metric attribute is exchanged between ASs; however, a
metric attribute that comes into an AS does not leave the AS.
When an update enters the AS with a certain metric value, that value is used for
decision making within the AS. When BGP sends that update to another AS, the
metric is reset to 0.
Unless otherwise specified, the router compares metric attributes for paths from
external neighbors that are in the same AS.