default local-preference
Use default local-preference to configure a default local preference.
Use undo default local-preference to restore the default.
Syntax
default local-preference value
undo default local-preference
Default
The default local preference is 100.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
Predefined user roles
network-admin
Parameters
value: Specifies a default local preference in the range of 0 to 4294967295. A larger value represents a higher preference.
Usage guidelines
You can also use the apply local-preference command in a routing policy to configure the local preference for BGP routes. If no routing policy is configured, all BGP routes use the local preference set by the default local-preference command. If a routing policy is configured, BGP routes matching the routing policy use the local preference set by the apply local-preference command. Other BGP routes use the local preference set by the default local-preference command.
Examples
# In BGP IPv4 unicast address family view, set the default local preference to 180.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp-default] address-family ipv4 unicast [Sysname-bgp-default-ipv4] default local-preference 180
Related commands
apply local-preference
route-policy