The fourth BGP attribute is called AS Path:
- BGP prefers the shortest AS path to get to a destination. Less is more!
- We can manipulate this by using AS path prepending.
Let me show you an example:
In my example AS 1 wants to make sure traffic enters the autonomous system through R2. We can add our own autonomous system number multiple times, so the as-path becomes longer. Since BGP prefers a shorter AS path, we can influence our routing. This is called AS path prepending.
Configuration
Let’s see what this looks like on Cisco routers. This is the topology that I will use:
Above we have 3 routers. R1 and R3 are both in AS 1 advertising the same network (1.1.1.0/24) to R2. We can use AS Path prepending to make R2 prefer a certain path.
It was a good article but got confusing when you mixed up Jack with John.
Hi Tony,
Thanks, I just fixed it…the names are now correct.
Rene
nice explanation !!!
Hello Rene,
Thank you for yours articles, great job . I am beginner in learning of CCNP Routing so sorry for (probably) stupid question. In your articles missing the third attribute (Self-originated). Do you plan write about that? Thank you in advance.
Daniel
Great example. I do have one question: Are the prepending AS numbers arbitrary or do I have to coordinate this with my ISP. In other words, does it matter if I use random AS prepends are do they have to be reserved just as I reserved my own AS.