Concepts / BGP

BGP

AS path

Also called prepending, as-path prepend

The list of autonomous systems a BGP route crossed: used to choose paths and to prevent loops.

A router ignores routes whose path already holds its own AS number. Shorter paths win, so an AS can make one entrance less attractive by prepending its own number several times on what it announces there. Each AS chooses its own way out, so traffic there and back often cross different ASes.

One conversation, two ways
One conversation, two ways

Your own router picks the way out, and other networks pick the way back, so prepending is a request to them rather than an order. From the BGP policies: steering traffic and refusing bad routes lab.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab