The peer preferred-value command sets a preferred value for the routes that a BGP device learns from its peer.
The undo peer preferred-value command deletes the preferred value set for the routes that a BGP device learns from its peer.
By default, the preferred value of a route learned from a BGP peer is 0.
Usage Scenario
After the peer preferred-value command is run, all the routes learned from the specified peer have the preferred value. If there are multiple routes to the same address prefix, the route with the highest preferred value is preferred.
Prerequisites
A BGP peer has been configured. If the peer preferred-value command is used but no BGP peer exists, a message is displayed, indicating that the peer does not exist.
Configuration Impact
If a preferred value is set for the routes that a BGP device learns from a peer group, all members of the peer group inherit the configuration.
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] ipv4-family [*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both [*HUAWEI-vpn-instance-vpna-af-ipv4] quit [*HUAWEI-instance-vpna] quit [*HUAWEI] bgp 100 instance a [*HUAWEI-bgp-instance-a] ipv4-family vpn-instance vrf1 [*HUAWEI-bgp-instance-a-vrf1] peer 10.1.1.1 as-number 100 [*HUAWEI-bgp-instance-a-vrf1] peer 10.1.1.1 preferred-value 50