Pcornel
Networking · Network & Protocols › BGP Protocol Reference

BGP Path Attribute Flags Reference

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

Back to the Topic

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 boundaryKnown-good for BGP Path Attribute Flags ReferenceSuspicious signatureNext proof
Identity/lengthExact object/peer and coherent structureWrong identity, type or boundaryRaw packet/LSDB object + peer state
Field semanticsFlags 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 designreserved/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 rulesCompare same object across both sides
State consequenceField predicts expected protocol/route transitionObject looks valid but local state disagreesLSDB/SPF or BGP policy → RIB/FIB
ClosureOriginal workload succeeds for the explained reasonProtocol state recovered only transientlyRepeat 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

Confirmation

Confirm action

Continue?