12 Weight
Weight is a Cisco-proprietary path attribute used to influence a router’s outbound path selection. It is the very first tiebreaker in the best-path algorithm, and it is purely local.
Characteristics
- Local significance only: Weight is never exchanged between routers. It is not included in Update messages, so it affects only the router on which it is set.
- Cisco-proprietary: it is not part of the standard attribute classification.
- Higher value wins: unlike most metrics, a higher Weight is more preferred.
- Range: 0 to 65535.
- Default values:
- 0 for prefixes received from a neighbor.
- 32768 for routes originated locally by the router itself.
Because locally originated routes get a high default Weight (32768), a router naturally prefers its own routes over those learned from neighbors.
Why local significance matters
Since Weight is never propagated, it can only influence the single router where it is configured. To steer outbound traffic for an entire AS, an attribute that propagates internally is needed instead (Local Preference, note 13). Weight is the right tool when the decision only needs to apply to one router.
Position in best-path
Weight is checked first in the best-path algorithm (before Local Preference and everything else). This makes it a powerful override on a single router: because it is evaluated before Local Preference, a higher Weight can win even against a route with a better Local Preference.
How it is applied
Weight can be set in two ways:
- Per neighbor, applying the same Weight to all prefixes received from that neighbor.
- Per prefix, using a route-map that matches specific routes and sets their Weight (more granular).
Because Weight influences the local router’s own outbound decision based on what it learns, it is applied on inbound routes.
Self-check
Q1 — Is Weight exchanged between routers?
A) Yes, it is a well-known transitive attribute
B) No, it has local significance only and is never sent in Updates
C) Only between iBGP peers
D) Only between eBGP peers
Respuesta
B is correct. Weight is Cisco-proprietary and local; it is never included in Update messages, so it affects only the router where it is set.
- A) False — it is not a standard well-known attribute and is not transmitted.
- C) False — it is not shared with iBGP peers.
- D) False — it is not shared with eBGP peers either.
Q2 — Which Weight value is preferred, and what is the range?
A) Lower wins, range 0 to 4294967295
B) Higher wins, range 0 to 65535
C) Lower wins, range 0 to 65535
D) Higher wins, range 0 to 255
Respuesta
B is correct. A higher Weight is more preferred, and the range is 0 to 65535.
- A) False — higher wins, and that range is Local Preference’s.
- C) False — the range is right but higher (not lower) wins.
- D) False — the range is 0 to 65535, not 0 to 255.
Q3 — What is the default Weight for a locally originated route?
A) 0
B) 100
C) 32768
D) 65535
Respuesta
C is correct. Locally originated routes default to Weight 32768, while routes received from a neighbor default to 0. This is why a router prefers its own routes.
- A) False — 0 is the default for routes received from a neighbor.
- B) False — 100 is the default Local Preference, not Weight.
- D) False — 65535 is the maximum, not the local-origination default.
Q4 — Where does Weight sit in the best-path algorithm?
A) Last, as a final tiebreaker
B) First, before Local Preference
C) Right after AS-PATH
D) It is not part of best-path
Respuesta
B is correct. Weight is checked first, before Local Preference and everything else, so a higher Weight can override a route with a better Local Preference on that router.
- A) False — it is first, not last.
- C) False — it comes before AS-PATH and before Local Preference.
- D) False — it is the first step of best-path.