IT lexicon › Networking › BGP AS-path

BGP AS-path

Networking På svenska → Updated: 2026-05-29

The list of autonomous systems (AS) a BGP route has passed through on its way to you. It serves two roles: loop prevention (a router rejects a route that already contains its own AS) and path selection (a shorter AS-path is preferred, all else equal).

Mechanic: BGP is a "path vector" protocol — every time a route crosses an AS boundary, that AS number is prepended to the AS-path. Loop protection: if a router sees its own AS in a received route's path, it discards it (the route has already been here). Path selection: after local-preference, AS-path length is the second criterion in BGP's decision process — fewer AS hops wins. Manipulation: AS-path prepending means deliberately repeating your own AS several times in the advertisement to make the path "longer" and thus less attractive → a common trick to control how inbound traffic is distributed across several upstream links. One of BGP's most central attributes. Related to BGP local-pref and autonomous system number.

← Back to the lexicon