Configure the Default Local Preference
The local preference is used to determine the best route for traffic leaving the local AS. When a BGP
router obtains from several iBGP peers multiple routes to the same destination but with different next
hops, it considers the route with the highest local preference as the best route.
This task allows you to specify the default local preference for routes sent to iBGP peers.
Follow these steps to specify the default local preference:
Enter system view
Enter BGP view
Configure the default local preference
Configuring the MED Attribute
MED is used to determine the best route for traffic going into an AS. When a BGP router obtains from
eBGP peers multiple routes to the same destination but with different next hops, it considers the route
with the smallest MED value as the best route if other conditions are the same.
Configure the default MED value
Follow these steps to configure the default MED value:
Enter system view
Enter BGP view
Configure the default MED value
Enable the comparison of MED of routes from different ASs
Follow these steps to enable the comparison of MED of routes from different ASs:
Enter system view
Enter BGP view
Enable the comparison of MED of
routes from different ASs
Enable the comparison of MED of routes from each AS
Route learning sequence may affect optimal route selection.
To do...
To do...
To do...
Use the command...
system-view
bgp as-number
default local-preference
value
Use the command...
system-view
bgp as-number
default med med-value
Use the command...
system-view
bgp as-number
compare-different-as-med
1-27
Remarks
—
—
Optional
100 by default
Remarks
—
—
Optional
0 by default
Remarks
—
—
Required
Not enabled by default
Need help?
Do you have a question about the S7906E and is the answer not in the manual?