How to configure BGP AS Path Prepending

Hello Helen

All attributes must be examined when determining which route is the best to be taken. The attributes are not separated into those that apply to inbound and those that apply to outbound routes. All attributes apply to determine the best route from the local router to a particular destination. In this sense, all attributes affect outbound traffic only.

What you can do however is use some particular attributes to influence incoming traffic. This is often useful when configuring the edge of your network, especially if you have multiple ISPs to which you are connecting, and you have public IP addresses on your network that you want to advertise with BGP to the internet.

Influencing incoming traffic means that you can configure an attribute on your local router, that will be shared to neighboring routers, like those in your ISP, such that the choice of their best routes to your internal prefixes can be “steered” via the link that you prefer. Remember, you are trying to influence certain attributes on the remote routers, such that they choose the preferred outgoing route to get to your prefixes. So it’s still outgoing traffic that is being affected but from the point of view of the remote router.

Remember however, that you do not have ultimate control over how your ISP’s routers will route traffic. They can always override your influence. That’s why it is a good idea to talk with your ISP about your requirements so that you can come to a mutual agreement on how to route traffic.

Now the attributes that can be used to influence incoming traffic are:

In addition to this, you can also leak more specific routes to your ISP, since BGP prefers more specific routes over less specific routes. But this may be viewed as a “hostile” act by your ISP, so make sure you speak with them first!

Beyond just remembering them, I don’t know of another way in which to keep them in mind. It might be helpful to more fully understand how they work, then you may be able to more readily remember them.

I hope this has been helpful!

Laz