BGP Weight Attribute

BGP weight attribute is a Cisco proprietary path attribute that is local to the router and is used to influence local path selection on a certain router.

BGP weight is the first in the list:

BGP weight is the first tie breaker for best path selection on a Cisco router, the attribute is not propagated to other routers in the BGP updates and only found on Cisco routers.

The path with the highest weight is selected as the best toward a destination.

BGP weight values:

The weight can be a number from 0 to 65,535. Paths that the router originates have a weight of 32,768 by default, and other paths have a weight of 0. As we mentioned earlier the path with the highest weight value wins.

Setting BGP weight:

BGP weight can be set using one of three ways on a Cisco router.

  1. Assigned per neighbor using the neighbor {ip-address | peer-group} weight weight. This command will influence all routes received from a certain neighbor by assigning the configured value to all these routes.
  2. Using AS-Path access lists. ip as-path access-list access-list-number {permit | deny} as-regular-expression neighbor ip-address filter-list access-list-number weight weight. This method will apply the weight value to As-paths defined in the access list.
  3. Using route-maps for more complex definitions.

The following video, created by Roger Perkin will help explain different weight configuration options for further understanding.

https://www.youtube.com/watch?v=QHW5hfkEeAs

Key Points Summary:

BGP weight is the easiest way to manipulate the BGP path selection on a single Cisco router for outbound traffic. The attribute is local and will not be propagated to other routers in the network within the BGP update messages.

Weight values can be assigned to routes using the neighbor command, IP AS-PATH or route maps for complex policies.

BGP local preference among other attributes is more appropriate to manipulate outbound traffic network wide.

Check Also

Best AI tools list