Skip to content
QKQuickKit日本語
Routing & BGPLOCALRuns in your browser

AS_PATH Parser

Parse BGP AS_PATH text, flag legacy set segments deprecated by RFC 9774, and calculate its decision-process path length.

This tool handles input and primary processing in your browser and is designed not to send the input to QuickKit’s server.

Summary

How it works

Parses bare ASNs as AS_SEQUENCE, braces as AS_SET, parentheses as AS_CONFED_SEQUENCE, and square brackets as AS_CONFED_SET. RFC 9774 deprecates AS_SET and AS_CONFED_SET: unless explicitly configured otherwise for a transition, BGP speakers must not advertise UPDATEs containing these segments and must apply treat-as-withdraw when receiving them in AS_PATH or AS4_PATH. This offline parser still accepts and marks the set forms so historical dumps can be inspected; parsing them does not mean they are recommended or normally permitted in modern BGP operation.

For decision-process length, each AS_SEQUENCE member counts once, each AS_SET counts once, and confederation segments do not count outside their confederation. A final AS_SET has multiple possible origin ASNs, so none is selected as uniquely authoritative.

An ASN repeated back to back inside one AS_SEQUENCE or AS_CONFED_SEQUENCE is listed as a prepend candidate, because RFC 4271 and RFC 5065 let a speaker prepend its own AS number more than once. Other repeats (separate positions, AS_SET members, or across segments) are listed separately. A repeat across segments is not classified as a prepend candidate automatically, but a speaker starts a new segment when an AS_SEQUENCE or AS_CONFED_SEQUENCE would exceed 255 ASNs (RFC 4271 §5.1.2, RFC 5065 §4.1), so it may still have been prepended.

A repeated ASN alone does not show an AS loop, and a prepended path is still an AS loop for a receiver whose own ASN is in it: AS loop detection compares the path with the receiving router's own ASN, so it is evaluated only when you enter a local ASN. The number alone does not say which role it has at the receiver, so each role is shown as a conditional result. As the AS number of a speaker outside any confederation (RFC 4271 §9.1.2), a match in AS_SEQUENCE or AS_SET is a loop; such a speaker must treat confederation segments as a malformed AS_PATH (RFC 5065 §5), so that check is not evaluated when they are present. As an AS Confederation Identifier, a match anywhere in the AS_PATH is a loop; as a Member-AS Number, a match in AS_CONFED_SEQUENCE or AS_CONFED_SET is a loop (RFC 5065 §4).

This is offline structural inspection, not a guarantee of how a router accepts or discards the route; implementation settings that accept the own ASN, such as allowas-in, are not modeled. AS_TRANS (AS23456) can stand for a four-octet ASN (RFC 6793 §4.2.2); this tool does not reconstruct the path from AS4_PATH (RFC 6793 §4.2.3), so with AS_TRANS present the loop check covers only the entered AS_PATH and a missing match is not conclusive.