peer high-priority (BGP-VPNv4 address family view/BGP-VPNv6 address family view)

Function

The peer high-priority command enables a device to preferentially select routes based on their high priority.

The undo peer high-priority command disables a device from preferentially selecting routes based on their high priority.

By default, the routes learned from a peer are selected based on the default priority.

Format

peer { ipv4-address | ipv6-address } high-priority

peer { ipv4-address | ipv6-address } high-priority disable

undo peer { ipv4-address | ipv6-address } high-priority

undo peer { ipv4-address | ipv6-address } high-priority disable

Parameters

Parameter Description Value
ipv4-address

Specifies an IPv4 address for a peer.

The value is in dotted decimal notation.

ipv6-address

Specifies an IPv6 address for a peer.

The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

disable

Disables a device from preferentially selecting routes based on their high priority.

-

Views

BGP-VPNv4 address family view, BGP-VPNv6 address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

The VPNv4/VPNv6 address family supports the coexistence of IPv4 and IPv6 peers. A device may learn routes with the same prefix from both IPv4 and IPv6 peers. To control the route selection sequence, you can run this command.

In a scenario where an L3VPN supports IPv4/IPv6 dual-stack and the VPNv4/VPNv6 address family has routes with the same prefix learned from both IPv4 and IPv6 peers, when the route learned from one peer is preferentially selected, the routes learned from another peer cannot be advertised. Therefore, during service evolution, you need to run the peer high-priority command on IPv4/IPv6 peers in the VPNv4/VPNv6 address family to ensure that the routes learned by the peers are preferentially selected.

Configuration Impact

The peer high-priority command takes effect only for VPNv4/VPNv6 routes and remotely leaked routes.

Example

# Enable a device to preferentially select a route with an IPv4 next hop based on a high priority in the VPNv4 address family.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 10.1.1.1 as-number 100
[*HUAWEI-bgp] peer 2001:DB8:1::1 as-number 100
[*HUAWEI-bgp] peer 10.1.1.1 connect-interface LoopBack0
[*HUAWEI-bgp] peer 2001:DB8:1::1 connect-interface LoopBack0
[*HUAWEI-bgp] ipv4-family unicast
[*HUAWEI-bgp-af-ipv4] peer 10.1.1.1 enable
[*HUAWEI-bgp-af-ipv4] peer 2001:DB8:1::1 enable
[*HUAWEI-bgp-af-ipv4] quit
[*HUAWEI-bgp] ipv4-family vpnv4
[*HUAWEI-bgp-af-vpnv4] peer 10.1.1.1 enable
[*HUAWEI-bgp-af-vpnv4] peer 2001:DB8:1::1 enable
[*HUAWEI-bgp-af-vpnv4] peer 10.1.1.1 high-priority
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >