BGP Confederation


I’ll show you how BGP confederations work in this tutorial. As networks grow, managing a full mesh of iBGP connections just to adhere to the BGP split horizion rule can get complicated. For just 4 routers I’ll need 6 iBGP peerings which would look like this: 

You can calculate how many peerings are required for 4 routers by using this formula where N is the number of routers: N(N-1)/2

4(4-1=3)/2 = 6

That comes out to 6 iBGP peerings. Imagine an AS with 10 routers or even 50! Thankfully there’s two features we can implement that have the same goal of reducing the full mesh requirement. There’s BGP route reflectors and BGP confederations. 

BGP confederations reduce the full mesh iBGP requirement by splitting the AS into smaller Sub-AS’s. Here’s what the same 4 router topology would like with confederations in place:

We took our main AS of 1234 which is known as our “confederation” and split it into two smaller sub AS’s. Instead of having a centralized router that everyone peers with like a route reflector, the network is divided into smaller sub-autonomous systems and we’re able to peer based on the physical topology. Now there’s only 3 peerings instead of 6. Between the sub AS’s its called a confederation eBGP peering instead of a regular eBGP peering.

BGP confederations hide the details from other routers that are outside of the network. The sub AS number will get removed from the AS path when the prefix is sent to a true eBGP peer like an ISP for example. From the outside world the confederation appears as a single AS.

Keep in mind if you have more than 2 routers within a sub AS, you’ll still need to fully mesh them.

Attributes like the next-hop, Local preference and MED are not changed when going across Sub AS eBGP peerings.

Now that you have a general idea of what BGP confederations are. It’s time get them configured. I’ll use the topology below where the main confederation AS is 1234 and is split with two sub AS’s, AS12 with R1 and R2 and AS34 with R3 and R4. Lastly there is R5 in AS5 which is a true eBGP peer with R1. We’ll advertise networks from R5 and from R4 to see how the prefixes are seen within the confederation and external peers.