Pcornel
Networking · Routing › BGP › BGP Path Selection

Weight

Cheat sheet · https://pcornel.dk/topic.php?topic=1141

Back to the Topic

Answer

Weight is a Cisco-only BGP value that applies on the local router only and is never advertised to peers. The highest weight wins and it is checked first in best-path selection; locally originated routes get 32768 by default.

Remember

Cisco-specific and the first step of best-path selection; higher wins. Weight is never advertised, so it affects only the router where it is set. Default is 0 for learned routes and 32768 for routes the router originates itself.

First checks

show ip bgp → Weight column. show ip bgp <prefix> → weight appears on a path when it is not 0. show running-config | section router bgp → neighbor … weight or a route-map with set weight.

Commands

show ip bgp <prefix>
show ip bgp
show route-map
clear ip bgp <neighbour> soft in

Verify in this order

Weight set locally (neighbor weight or inbound route-map) → highest Weight wins before any other attribute → best path on this router only → RIB → this router's outbound traffic; other routers are unaffected

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

Weight · routing reference

PropertyWeight
ScopeOne router
AdvertisementNot sent to peers
PreferenceHigher wins
Typical useRouter-local exit choice

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1141

Confirmation

Confirm action

Continue?