Home

ASpath

ASPath is a Border Gateway Protocol (BGP) path attribute that records the autonomous systems (AS) through which a route has traversed from its origin to the current advertising edge. It is an optional transitive attribute carried in BGP UPDATE messages. The value is a sequence of AS numbers. When a route is originated in an AS, the origin AS is listed at the end of the path; as the route is advertised to neighboring ASes, each forwarding AS prepends its own AS number to the left of the path. For example, a route originated in AS 65001 and learned by AS 65002 and then by AS 65003 might appear as 65003 65002 65001 on its way to a downstream peer.

ASPath serves several purposes in routing. It provides a mechanism for loop detection: if the local AS

The AS_PATH attribute is not a comprehensive security measure. While origin validation (for example via RPKI)

number
appears
anywhere
in
the
path,
the
route
is
rejected
to
prevent
routing
loops.
It
is
also
a
key
factor
in
BGP
route
selection,
where
shorter
AS_PATH
length
is
typically
preferred,
subject
to
other
attributes
and
policies
such
as
LOCAL_PREF,
MED,
and
route
filtering.
Operators
use
AS_PATH
manipulation,
or
prepending,
to
influence
upstream
path
selection
for
traffic
engineering
purposes.
can
verify
the
origin
AS
for
a
prefix,
AS_PATH
content
itself
is
not
always
authenticated
and
can
be
manipulated
or
misrepresented
by
misconfigurations
or
intentional
policies.
Understanding
ASPath
helps
network
operators
analyze
routing
behavior
and
implement
policies
across
multiple
autonomous
systems.