BGP Path Attribute Flags Reference
Cheat sheet · https://pcornel.dk/topic.php?topic=266
Answer
Each BGP path attribute has a flags byte saying whether it is optional or well-known, transitive or not, partial, and uses an extended length. These flags decide how routers handle attributes they do not recognise.
Remember
Flag bits: Optional (1) / well-known (0), Transitive, Partial, Extended Length. Well-known mandatory: ORIGIN, AS_PATH, NEXT_HOP. An unknown optional transitive attribute is passed on with Partial set; an unknown optional non-transitive one is silently dropped. A malformed attribute can reset the session — RFC 7606 makes most errors "treat-as-withdraw" instead.
First checks
- Wireshark filter
bgp.type == 2— UPDATE messages; expand Path attributes → Flags, Type Code, Length. show ip bgp <prefix>— attributes the router accepted (origin, AS path, next hop, communities).show ip bgp neighbors <ip> | include error|Last reset— notifications and reset reasons.debug ip bgp updates— attribute processing (lab or briefly).
Verify in this order
UPDATE received → each attribute's flags and type parsed → known attributes applied → unknown optional transitive passed on with Partial → malformed attribute handled (treat-as-withdraw or reset)
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
BGP Path Attribute Flags Reference field-level operational reference
| Field boundary | Known-good for BGP Path Attribute Flags Reference | Suspicious signature | Next proof |
|---|---|---|---|
| Identity/length | Exact object/peer and coherent structure | Wrong identity, type or boundary | Raw packet/LSDB object + peer state |
| Field semantics | Flags octet (Optional, Transitive, Partial, Extended Length), Type Code, one- or two-octet Attribute Length and the exact value boundary before interpreting AS_PATH, NEXT_HOP, communities or any other attribute payload match intended design | reserved/illegal flag combinations, Partial used in an invalid context, wrong Extended Length interpretation, attribute length that overruns or truncates the UPDATE, unexpected optional-transitive propagation, an unknown optional non-transitive attribute treated as if it should propagate, or a malformed attribute whose handling differs by BGP implementation/error-handling rules | Compare same object across both sides |
| State consequence | Field predicts expected protocol/route transition | Object looks valid but local state disagrees | LSDB/SPF or BGP policy → RIB/FIB |
| Closure | Original workload succeeds for the explained reason | Protocol state recovered only transiently | Repeat state/capture + regression test |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=266