Configuring BGP Route Attributes 387
n
■ Using a routing policy can set preferences for routes matching it. Routes not
matching it use the default preferences.
■ If other conditions are identical, the route with the smallest MED value is
selected as the best external route.
Configure
the MED
attribute
Configure the default
MED value
default med med-value Optional
0 by default
Enable the comparison of
MED of routes from
different ASs
compare-different-as-med Optional
Not enabled by
default
Enable the comparison of
MED of routes from each
AS
bestroute compare-med Optional
Not enabled by
default
Enable the comparison of
MED of routes from
confederation peers
bestroute
med-confederation
Optional
Not enabled by
default
Specify the router as the next hop of
routes to a peer/peer group
peer { group-name |
ip-address } next-hop-local
Optional
By default, routes to
an EBGP peer/peer
group take the
router as the next
hop, while routes to
an IBGP peer/peer
group do not take
the local router as
the next hop.
Configure
the
AS_PATH
attribute
Configure repeating times
of local AS number in
routes from a peer/peer
group
peer { group-name |
ip-address } allow-as-loop
[ number ]
Optional
The local AS number
can not be repeated
in routes from the
peer/peer group.
Disable the router from
taking AS_PATH as a
factor for best route
selection
bestroute as-path-neglect Optional
By default, the router
takes AS_PATH as a
factor for best route
selection.
Specify a fake AS number
for a peer/peer group
peer { group-name |
ip-address } fake-as
as-number
Optional
Not specified by
default
This command is only
applicable to an
EBGP peer or peer
group.
Substitute local AS
number for the AS
number of a peer/peer
group in the AS_PATH
attribute
peer
{ group-name |
ip-address } substitute-as
Optional
The substitution is
not configured by
default.
Configure BGP to not
keep private AS number
in AS_PATH of updates to
a peer/peer group
peer { group-name |
ip-address } public-as-only
Optional
By default, BGP
updates carry private
AS numbers.
To do… Use the command… Remarks