BGP AS Override Feature Explained in 2022

April 22, 2022
3 min read

OrhanErgun

Table of Contents

Quick navigation1 sections

BGP AS Override needs to be understood well in order to understand the BGP loop prevention behavior, But why BGP AS Override might create a dangerous situation, and what are the alternatives of BGP AS Override will be explained in this post.

What is BGP AS Override

BGP AS Override feature is used to change the AS number or numbers in the AS Path attribute. Without BGP AS-Override, let's see what would happen.

In this topology, Customer BGP AS is AS 100. The customer has two locations. Service Provider, in the middle, let's say providing MPLS VPN service for the customer. As you can understand from the topology, Service Provider is running EBGP with the Customer, because they have different BGP Autonomous Systems.

The service provider in the above topology has BGP AS 200. Left customer router, when it advertises BGP update message to the R2, R2 sends to R3 and when R3 sends to R4, R4 wouldn't accept the BGP update, When R4 receives that update, it will check the AS-Path attribute and would see its own BGP AS number in the AS Path. Thus is by default rejected, due to EBGP loop prevention. If the router sees its own BGP AS number, anywhere (Origin AS, any mid-AS, or last AS) in the AS Path, it doesn't accept the BGP update. But what if, like in the above picture, the customer wants to, or needs to use the same BGP AS number in every location that they have.

In this case, they need to accept the BGP update, otherwise, end-to-end reachability cannot be achieved. There are two solutions to the above requirement. By the way, not accepting prefixes/BGP updates is not a problem. It is just how BGP works. One of the solutions is, that R2 receives a BGP update from R1 with AS 100, then R3 receives from R2, and in the BGP AS Path, it is still AS 100 at R3. With BGP AS Override feature, R3 can change customers' BGP AS numbers with its own BGP AS number. So, R3 during advertisement to R4 replaces BGP AS 100 with BGP AS 200.

Change the AS number with its own AS number. And finally, when R4 receives it since it won't see its own AS number in the BGP update, R4 accepted the announcements, and end-to-end connectivity is achieved. In the next post, we will look at what can be the problem if the BGP AS Override feature is used.

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!