The peer preferred-value command assigns a preferred value for the peer.
The undo peer preferred-value command removes the preferred value assigned to the peer.
By default, the preferred value of the routes learned from other BGP peers is 0.
peer { group-name | ipv4-address | ipv6-address } preferred-value value
undo peer { group-name | ipv4-address | ipv6-address } preferred-value
| Parameter | Description | Value |
|---|---|---|
group-name |
Specifies the name of the peer group. |
The name is a string of 1 to 47 characters without any space. It is case-sensitive. |
ipv4-address |
Specifies the IPv4 address of the peer. |
It is in dotted decimal notation. |
ipv6-address |
Specifies the IPv6 address of the peer. |
The address is a 32-digit hexadecimal number in the X:X:X:X:X:X:X:X format. |
value |
Specifies the preferred value assigned to routes. |
It is an integer that ranges from 0 to 65535. |
ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view,BGP-VPN-Target address family view , BGP-IPv6 unicast address family view, BGP-VPNv4 address family view, and BGP-VPN instance IPv4 address family view.
ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.
BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN-Target address family view, BGP-VPNv4 address family view
Usage Scenario
If a peer is configured with a preferred value, all routes learned from the peer have the preferred value. When multiple routes to the same address prefix exist, the route with the greatest preferred value is selected.
Prerequisites
A BGP peer has been configured.
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.