The default local-preference command sets the default local preference for BGP routes.
The undo default local-preference command restores the default configuration.
By default, the local preference for BGP routes is 100.
Parameter | Description | Value |
---|---|---|
local-preference | Specifies the local preference for BGP routes. The greater the value, the higher the preference. | The value is an integer that ranges from 0 to 4294967295. |
BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view
Usage Scenario
The Local_Pref attribute is used to determine an optimal route for traffic before traffic leaves an AS. When the switch that runs BGP has multiple routes to the same destination, the switch selects the route with the highest local preference as the optimal route.
Precautions
If the switch is already configured with a default local preference for BGP routes, the configuration of a new default local preference will override the previous configuration.
The local preference is exchanged only between IBGP peers and is not advertised to other ASs.