peer preferred-value (BGP-EVPN address family view)

Function

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.

Format

peer peerIpv4Addr preferred-value preferredvalue

undo peer peerIpv4Addr preferred-value

Parameters

Parameter Description Value
peerIpv4Addr

Specifies the IPv4 address of a peer.

It is in dotted decimal notation.

preferredvalue

Specifies the preferred value of the routes that a BGP device learns from its peer.

The value is an integer ranging from 0 to 65535.

Views

BGP-EVPN address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

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.

Example

# In the BGP-EVPN address family view, set a preferred value to 50 for the routes that a BGP device learns from a specified peer.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 1.1.1.2 as-number 100
[*HUAWEI-bgp] l2vpn-family evpn
[*HUAWEI-bgp-af-evpn] peer 1.1.1.2 enable
[*HUAWEI-bgp-af-evpn] peer 1.1.1.2 preferred-value 50
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >