Name

neighbor weight — router, BGP

Synopsis

neighbor {address | peer-group} weight value
no neighbor {address | peer-group} weight value

Configures

The weight metric for a BGP neighbor

Default

Routes learned from the local router have a weight of 32,768; routes learned from other BGP peers have a weight of 0

Description

This command lets you assign a weight to routes learned from the given neighbor (as specified by address or peer-group). Routes with a higher weight are chosen first. You can use this command to tell BGP to prefer routes learned from a given neighbor. This is a Cisco proprietary attribute.

Example

In the following configuration, we assign a weight of 100 to routes learned from the neighbor 10.200.200.3. This weighting causes the router to prefer routes learned from 10.200.200.3 to routes learned from other BGP peers.

router bgp 200
  neighbor 10.200.200.3 weight 100

Get Cisco IOS in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.