Networking · Network & Protocols › BGP Protocol Reference
BGP AS_PATH & Community Field Reference
Cheat sheet · https://pcornel.dk/topic.php?topic=296
Answer
AS_PATH is encoded as segments (AS_SEQUENCE or AS_SET) of AS numbers. Communities are 32-bit tags written as AS:value, and large communities are 96-bit tags written as AS:value:value so they fit 4-byte AS numbers.
First checks
show bgp ipv4 unicast <prefix>— AS path and communitiesshow ip bgp regexp <regex>— match AS pathsshow bgp ipv4 unicast community <comm>— match community
Commands
ip as-path access-listshow ip bgpip bgp-community new-format
Verify in this order
UPDATE → AS_PATH/COMMUNITY attributes → policy match → best path
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
BGP AS_PATH & Community Field Reference packet-level operational reference
| Wire boundary | Known-good for BGP AS_PATH & Community Field Reference | Suspicious signature | Next proof |
|---|---|---|---|
| Message identity | Correct peer/direction/type and coherent lengths | Wrong sender, type, length or packet phase | Packet sequence + peer state |
| Field semantics | path-attribute flags/type/length; AS_PATH segment type/count/ASN sequence; standard Community values; Large Community Global Administrator/Local Data parts where present match intended protocol state | AS_PATH prepends appear on the wrong neighbor or direction, four-octet ASN display/encoding is misread, community propagation is absent because send-community behavior is missing, a route-map matches the wrong community set, Large Community and standard-community namespaces are confused, or attributes arrive correctly but higher-priority best-path inputs dominate | Decode exact fields on both sides |
| State consequence | Packet produces expected protocol/route transition | Wire looks healthy but local state disagrees | FSM/LSDB/BGP table → RIB/FIB |
| Closure | Original workload succeeds for the explained reason | Session/adjacency recovered only transiently | Repeat capture + regression/failover test |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=296