Use it for a quick override on one router — make this router prefer a path regardless of every other attribute — or when one router ignores LOCAL_PREF and you need to find out why.
Weight
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.
1. Cisco-only, local to the router; higher wins and it is checked first.
2. Default 0, or 32768 for locally originated routes.
3. neighbor X weight 100 or a route-map; not advertised to peers.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip bgpVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 First 30 seconds Verify boundary
Immediate answer: Verify Cisco-local Weight on all candidate paths and whether a policy set it before attributing best-path choice to external routing intent.
Verification chain: received path → inbound/local policy → Weight → LOCAL_PREF/other attributes → best path → RIB
Stop condition: Weight is local to the device; it does not propagate to peers or show network-wide exit policy.
Step 2 Operational verification and known-good state Verify boundary
show ip bgp
show ip bgp 203.0.113.0 255.255.255.0
show running-config | section router bgp
The table view has a Weight column for every path: 0 for learned routes, 32768 for local ones, anything else was configured. The detailed view prints weight <n> only when it is not 0. The configuration shows where a non-default value comes from.
Known-good: non-default Weights exist only where they were deliberately configured, and other routers in the AS reach the same decision by LOCAL_PREF — or the difference is intended.
Step 3 Verification and output interpretation Verify boundary
Inspect the Weight column/attribute for all candidate paths to the target prefix and confirm whether it is the first decisive difference. Compare the same prefix on other routers before assuming the AS has a consistent exit policy. After selection, verify RIB and CEF because local BGP preference still does not by itself show packet forwarding.
Step 4 Verification & troubleshooting Narrow the fault
1. show ip bgp <prefix> → weight appears on a path when it is not 0; show ip bgp has a Weight column.
2. Find where it is set: show running-config | section router bgp for neighbor … weight, and show route-map for set weight.
3. Run the same prefix lookup on another router in the AS. Does it choose differently, and is that intended?
4. After changing a Weight: clear ip bgp <neighbour> soft in.
Step 5 Failure signatures and troubleshooting branches Narrow the fault
- A router ignores LOCAL_PREF. A Weight is set on it.
- Two routers in the AS use different exits for the same prefix. One of them has a Weight; the other does not know.
- A configured Weight has no effect. No soft clear was done, the route-map is on the wrong neighbour or direction, or the competing path is locally originated with 32768.
- A locally originated prefix is preferred over a better external path. The 32768 default.
- Nobody remembers why a neighbour has a Weight. A temporary override that was never removed.
Step 6 When the problem is really fixed Narrow the fault
- The path meant to win shows the higher Weight and is best on this router.
- Other routers in the AS make the choice the design expects.
- Every non-default Weight in the configuration has a known reason.
- A traceroute from this router leaves through the intended neighbour.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
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.
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.
ReferenceWhat it is2 sections · depth on demand
BGP scope — internal and external paths
Weight is a Cisco-local preference used when comparing internal or external BGP candidates. Higher Weight wins before LOCAL_PREF among otherwise eligible candidates; a next hop must still be resolvable. Weight is not a standardized transmitted BGP path attribute and is not propagated to iBGP peers. Two routers receiving the same AS_PATH and communities can therefore select different exits because their local Weight differs. The retained eBGP examples illustrate an input source, not a propagation scope.
What it is
ReferenceWhy it matters1 section · depth on demand
Why it matters
Weight is the strongest tool and the narrowest. One command makes this router prefer one neighbour's routes regardless of what the attributes say — handy on a single router with two providers, or as a temporary override. The same property makes it a trap in a larger AS: only this router changes its mind, the others keep following LOCAL_PREF, and routers in the same AS end up using different exits.
ReferenceImportant terms & boundaries6 sections · depth on demand
Key points
- Range 0–65535; higher wins; first step of best-path selection on Cisco.
- Default 0 for learned routes, 32768 for routes the router originates itself.
- Local to the router where it is set; not part of any update.
- Set for everything from one neighbour with
neighbor <ip> weight <n>, or selectively withset weightin an inbound route-map. - For a preference that the whole AS should share, use LOCAL_PREF instead.
- Because local routes get 32768, a router prefers its own origination over a learned copy of the same prefix.
In depth
Weight is a Cisco-only preference on one router
Weight is step 1 in Cisco's best path order. Higher wins. The Cisco document describes it as Cisco-specific and local to the router: it's never advertised to any peer. Locally originated routes get weight 32768 and learned routes 0.
R1(config)# router bgp 64500
R1(config-router)# neighbor 192.0.2.1 weight 200
R1(config)# route-map PREFER-A permit 10
R1(config-route-map)# match ip address prefix-list CLOUD
R1(config-route-map)# set weight 500
R1(config-router)# neighbor 192.0.2.1 route-map PREFER-A in
R1# show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 192.0.2.1 0 200 64510 i
* 192.0.2.5 0 0 64511 i
*> 198.51.100.0/24 0.0.0.0 0 32768 i
When to use weight
| Use | Reason |
|---|---|
| One edge router with two ISPs | Simple outbound preference on that router only |
| A temporary override on one router during maintenance | Doesn't change policy anywhere else |
| Preferring a direct path over the same prefix via iBGP | Applies before LOCAL_PREF |
For a preference that must apply to the whole AS, use LOCAL_PREF.
Pitfalls
| Pitfall | Effect |
|---|---|
| Weight on one router, LOCAL_PREF elsewhere | That router may disagree with the rest of the AS, causing asymmetric routing |
neighbor … weight | Applies to all routes from that neighbour |
| Forgotten maintenance weight | Silently overrides later LOCAL_PREF policy |
Check
show ip bgp shows weight in its own column. For a single prefix, show ip bgp <prefix> shows weight only when it's non-zero.
Documented example, not captured output.
Quick reference
Weight is a Cisco-specific value applied on the local router only and never advertised. It is the first attribute in Cisco's best-path selection; the highest weight wins. Locally originated routes get 32768, learned routes 0.
router bgp 65010
address-family ipv4 unicast
neighbor 203.0.113.1 weight 200
! or per prefix via route-map
route-map W-IN permit 10
match ip address prefix-list CRITICAL
set weight 500
Documented example, not captured output.
Use weight only for router-local decisions; LOCAL_PREF is the tool for AS-wide policy.
Mechanics and state ownership
Weight is assigned at the moment a path enters the router's BGP table, by the neighbour setting or the inbound route-map, and stays with that path locally. Because the best-path comparison starts with it, nothing that arrives in an update can outrank it — not LOCAL_PREF, not a shorter AS_PATH.
The default of 32768 for locally originated routes has a visible consequence. A router that originates a prefix with a network statement keeps preferring its own route even when a neighbour advertises the same prefix with a high LOCAL_PREF, because the comparison never gets past Weight.
Scope is the thing to keep in mind. LOCAL_PREF is shared by the whole AS, MED is a message to the neighbouring AS, AS_PATH travels everywhere — Weight stops at the router. Used on one of several BGP routers in an AS it creates a private opinion that the others do not know about.
State model and selection mechanics
Weight is evaluated very early in Cisco BGP best-path selection and affects only the local router. Routes originated locally commonly receive a high default Weight, while learned routes commonly have zero unless policy changes it. Because Weight never propagates, two routers in the same AS can choose different exits for the same prefix if their local Weight policies differ.
Limits and common misconceptions
ReferenceConfiguration & state1 section · depth on demand
Policy and configuration model
Use Weight only when a router-local decision is actually intended. For AS-wide exit policy, LOCAL_PREF is usually easier to reason about because it propagates over iBGP. If Weight is set by neighbor or route-map policy, scope it to the intended prefixes and document why the preference should not be shared with other BGP speakers.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Lab addressing; local AS 65000; eBGP neighbours already Established; route-refresh supported.
router bgp 65000
address-family ipv4 unicast
neighbor 192.0.2.2 weight 500
!
! then: clear ip bgp 192.0.2.2 soft inExpected output
show ip bgp 203.0.113.0 255.255.255.0Expected state: The path with weight 500 is best although the other path has the higher LOCAL_PREF.
BGP routing table entry for 203.0.113.0/24
Paths: (2 available, best #1, table default)
65010
192.0.2.2 from 192.0.2.2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, weight 500, valid, external, best
65020
10.0.0.2 from 10.0.0.2 (4.4.4.4)
Origin IGP, metric 0, localpref 200, valid, internal
! Illustrative output, not captured Evidence.Weight is compared before LOCAL_PREF, so 500 beats the default 0 even though path 2 has LOCAL_PREF 200. The rest of the AS does not see this Weight and will still prefer path 2 — a common cause of routers disagreeing about the exit.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Routing → BGP → eBGP → Weight. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4271.html · confidence 94%Quick lookup tables
Weight · routing reference
Compact path-selection and evidence boundaries for fast lookup.
| Property | Weight |
|---|---|
| Scope | One router |
| Advertisement | Not sent to peers |
| Preference | Higher wins |
| Typical use | Router-local exit choice |
Weight operational reference
Topic-specific bounded interpretation: known-good BGP state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for Weight | Suspicious signature | Next proof |
|---|---|---|---|
| Session/input | Correct peer, AF and prefix context | Transport, FSM or prefix eligibility disagrees | Peer detail and exact prefix |
| Attribute/policy | Cisco-local BGP Weight as a non-advertised per-router preference, with higher values preferred and no automatic consistency across other routers in the AS matches intended policy | one router choosing a different exit because Weight was configured only locally, an inbound route-map assigning Weight to unintended prefixes, operators expecting Weight to propagate to peers, a locally originated path winning due to its local value, or a high-Weight path selected while NEXT_HOP/RIB/FIB state prevents usable forwarding | Compare candidate paths and policy |
| Route/forwarding | Expected best path reaches RIB/FIB | BGP state exists but installed path disagrees | RIB/FIB/CEF and next-hop proof |
| Closure | Original test passes for explained reason | Symptom moved, was bypassed or state was forced | Regression/failover test |