About this tool
The BGP AS_PATH attribute records autonomous systems a route advertisement has traversed. Engineers inspect it to understand route origin, transit relationships, loops and policy behavior.
This parser breaks an AS path into its component AS numbers and reports path length. It is useful when reviewing CLI output, route-server data or incident notes.
How to use it
- Paste an AS path such as 64512 64496 64497.
- Parse the path.
- Review the sequence and count, then compare it with expected routing policy or neighboring paths.
Example: 64512 64496 64497
The path contains three AS numbers. From the receiving router’s perspective, 64512 is the closest listed AS and 64497 is the originating end of this simple sequence.
Engineering notes
- BGP best-path selection considers more than AS_PATH length. Local preference, weight, origin, MED, eBGP/iBGP status and other attributes can change the winner depending on platform and policy.
- AS prepending intentionally repeats an ASN to make a path appear longer to external networks, but its effect depends on the remote network’s policies.
Frequently asked questions
Does the shortest AS path always win?
No. AS_PATH length is one step in the decision process and can be overridden by earlier attributes such as local preference.
What is AS prepending?
It is the deliberate repetition of your ASN in outbound advertisements to make a path look longer and potentially less attractive.
Why does BGP reject a path containing its own ASN?
That is a primary loop-prevention mechanism. Seeing the local ASN in AS_PATH normally means the route has already passed through that AS.