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.
To specify the default local preference:
Step
Enter system view.
1.
Enter BGP view or
2.
BGP-VPN instance view.
Configure the default local
3.
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.
Configuring the default MED value
Step
Enter system view.
1.
Enter BGP view or
2.
BGP-VPN instance view.
Configure the default MED
3.
value.
Enabling the comparison of MED of routes from different ASs
Step
Enter system view.
1.
Command
system-view
•
Enter BGP view:
bgp as-number
•
Enter BGP-VPN instance
view:
a. bgp as-number
b. ipv4-family
vpn-instance
vpn-instance-name
default local-preference value
Command
system-view
•
Enter BGP view:
bgp as-number
•
Enter BGP-VPN instance
view:
a. bgp as-number
b. ipv4-family
vpn-instance
vpn-instance-name
default med med-value
Command
system-view
212
Remarks
N/A
Use either method.
Optional.
The default local preference is
100.
Remarks
N/A
Use either method.
Optional.
0 by default.
Remarks
N/A