Cisco BGP Weight Attribute 3 Things you must know!

April 6, 2022
4 min read

OrhanErgun

Table of Contents

Quick navigation2 sections

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, 192.68.0.0/24 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 192.168.0.0/24, but the right router, only for the 192.168.0.0/24 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.

OrhanErgun

About the Author

OrhanErgun

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.

Share this Article

Related Articles

BGPJuly 18, 2026

What Is BGP? Border Gateway Protocol — The Complete Guide

Border Gateway Protocol (BGP) is the routing protocol that holds the Internet together. Every time a packet crosses from one provider's network to another — from your ISP to a...

Read Article
BGPOctober 15, 2024

Top 30 BGP Interview Questions You Need to Know in Networking

Border Gateway Protocol (BGP) is a fundamental subject for anyone diving into the networking sector, especially for those preparing for job interviews. Whether you are aiming for a role in...

Read Article
BGPOctober 15, 2024

BGP Fundamentals Explained: What You Should Understand Before Your Interview

BGP Fundamentals Explained: What You Should Understand Before Your Interview Heading into a job interview that involves discussing network technologies can be daunting. Among the various protocols you need to...

Read Article
BGPSeptember 7, 2024

Understanding BGP: What Port Does it Use and Why?

Ever wondered how the colossal network of the internet is managed? Or how data finds its way across complex networks reliably and efficiently? A significant part of the answer lies...

Read Article
BGPSeptember 7, 2024

Choosing the Right BGP Router ID: Best Practices

When managing complex network topologies, the selection of an efficient Border Gateway Protocol (BGP) Router ID becomes imperative. This decision can significantly impact the stability and performance of your network....

Read Article
BGPSeptember 7, 2024

BGP Split Horizon vs Route Poisoning: What's the Difference?

In the robust universe of network routing, understanding the mechanisms that prevent routing loops is crucial for maintaining network reliability and efficiency. Two prominent techniques used in Border Gateway Protocol...

Read Article

Subscribe for Exclusive Deals & Promotions

Stay informed about special discounts, limited-time offers, and promotional campaigns. Be the first to know when we launch new deals!