neighbor weight

Specifies a weight that the device will add to routes that are received from the specified BGP neighbor.

Syntax

neighbor { ip-address | ipv6-address | peer-group-name } weight num
no neighbor { ip-address | ipv6-address | peer-group-name } weight

Command Default

The default for num is 0.

Parameters

ip-address
IPv4 address of the neighbor.
ipv6-address
IPv6 address of the neighbor
peer-group-name
Name of the peer group.
num
Value from 1 through 65535.

Modes

BGP address-family IPv4 unicast configuration mode

BGP address-family IPv6 unicast configuration mode

BGP address-family IPv4 unicast VRF configuration mode

BGP address-family IPv6 unicast VRF configuration mode

Usage Guidelines

Use the no form of the command to restore the defaults.

BGP prefers larger weights over smaller weights.

Examples

This example changes the weight from the default.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# neighbor 10.11.12.13 weight 100

This example changes the weight from the default for VRF instance "red".

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv6 unicast vrf red
device(config-bgp-ipv6u-vrf)# neighbor 2001:2018:8192::125 weight 100