Table of Contents

BGP Training

22:46:48 Hours
22 Lectures


Cisco CCNP ENCOR 350 - 401 Training

41:36:12 Hours
137 Lectures


Routing Protocols Design and Deployment Course

47:00:55 Hours
51 Lectures


Cisco BGP Weight Attribute 3 Things you must know!

BGP Weight Attribute is used in Cisco routers. In this post, with the below topology, we will look at why the BGP weight attribute is used, why it BGP weight shouldn't be used, advantages and disadvantages of the BGP weight attribute.

Cisco BGP Weight Attribute

Let's first define what is BGP Weight attribute. BGP selects the best path based on the BGP path attributes. Weight is considered a very important tie-breaker in BGP's best-path selection. When there are two paths to any BGP destination prefix, the BGP Weight attribute is compared before BGP Local Preference and many other BGP Path attributes. Since this is not BGP's best path selection post, and assuming you already know the process, please note, Weight attribute is compared before even BGP Local Preference. But, let's have a look at the below topology to understand it better.  

In the above topology, we want to use the left path for the prefixes in AS1, thus we have a higher BGP Local preference value. As the BGP Local preference value is exchanged internally between all IBGP neighbors, both left and right routers in AS65000, use the left exit point, which is Local Pref 100 to reach the prefixes in AS1.

Because on the other link BGP Local preference value is lower, 50. Why in the BGP Weight post, I am explaining BGP Local preference you might be asking. Because with that explanation, you will understand the reason for the BGP Weight attribute better. In the above topology, let's say we set the local preference value higher on the left link for all the prefixes in AS1, thus left link is used for those prefixes.So, if traffic arrives at a right router, it will send the traffic to the left router for the left router's uplink to be used.

But let's say, for the specific prefix, subnet, we want to use the right router's uplink if the traffic arrives at the right router.This is done with the BGP Weight attribute. So, the left router for all the prefixes continues to use its uplink, including, but the right router, only for the uses its own uplink, but the rest of the prefixes traffic is still sent to the left router. Because the BGP Weight attribute is local to the router, which means, it is not exchanged between the routers in the IBGP network, the BGP policy with the BGP Weight attribute just stays locally on the router.

BGP Weight Attribute might create a Routing Loop!

With the BGP Weight attribute if you push the traffic to be sent towards the neighbor and if the neighbor with the Weight or another policy sends the traffic towards you, it created a permanent Routing loop. So be careful. You may have heard Micro loop if you have been following our blog posts but note that there can't be a micro loop with the distance vector protocols such as EIGRP and BGP.
Last but not least, as you can understand, BGP Weight attribute can be used for the Output path maniplautaion, also known as BGP Outbound Traffic Engineering.

Created by
Orhan Ergun

Orhan Ergun, CCIE/CCDE Trainer, Author of Many Networking Books, Network Design Advisor, and Cisco Champion 2019/2020/2021

He created OrhanErgun.Net 10 years ago and has been serving the IT industry with his renowned and awarded training.

Wrote many books, mostly on Network Design, joined many IETF RFCs, gave Public talks at many Forums, and mentored thousands of his students.  

Today, with his carefully selected instructors, OrhanErgun.Net is providing IT courses to tens of thousands of IT engineers. 

View profile