How To Decide Which BGP Attributes To Use For Your Network

Having a strong understanding of Border Gateway Protocol (BGP) attributes is essential for any network administrator. In this blog post, we will discuss how to decide which BGP attributes to use for your network. We’ll cover the basics of what each attribute does, as well as best practices for configuring them. By the end of this post, you will have the knowledge and tools to make decisions about how to best configure BGP attributes to suit your network needs.

The Three Main BGP Attributes
When it comes to configuring the BGP routing protocol, one of the most important decisions is choosing which BGP attributes to use. There are three main attributes that must be considered when making this decision: local preference, AS path, and MED. Each of these attributes will affect how traffic flows through your network and can help optimize performance. In this section, we’ll explain the purpose of each attribute and discuss how you can use them to customize your network.

The local preference attribute allows you to assign preference to certain routes when making routing decisions. The router with the highest local preference value will be chosen as the next hop. This is especially useful when configuring a multi-homed network where more than one router can serve as the next hop.
The AS path attribute is used to track the path that packets take through the network. This can help prevent loops and provide information on where traffic is coming from and going to. When configuring your BGP network, you can control how your own AS appears in other networks’ AS paths by setting the prepend value.
Finally, the MED (Multi Exit Discriminator) attribute allows you to indicate the preferred route between two autonomous systems. The lower the MED value, the higher priority it will be given by neighboring autonomous systems. It’s important to note that not all routers support MED values, so it’s best to check with your vendor before using this attribute in your network configuration.

The Origin Attribute

The AS_PATH Attribute
The AS_PATH is composed of two parts: an optional origin (the source of the route advertisement) and a list of AS numbers that the route advertisement passed through. The last AS number in the list is the originating AS. This information allows routers to detect and discard routing loops.
When configuring BGP, it’s important to consider which AS_PATH attributes to use for your network. Generally speaking, it’s best to have a minimal number of AS numbers in the AS_PATH as this helps to ensure that your traffic reaches its destination more quickly and reliably. Additionally, you should take into account any internal policies that you may have, such as avoiding certain AS numbers or preferring routes from specific providers.
Ultimately, the best way to decide which AS_PATH attributes to use is to conduct thorough testing and benchmarking to determine the optimal configuration for your network. By doing so, you can ensure that your network is configured correctly and maximize performance and reliability.