Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 46

iBGP Confederation Configuration and Verification

Recommended resources

Hello! Welcome to the next lesson in your CCNP ENCOR journey.

In our previous session, we addressed the scalability challenges of iBGP by configuring route reflectors. We saw how an RR can relax the iBGP split-horizon rule, allowing a hierarchical design that eliminates the need for a full mesh of peerings.

Today, we will explore the other primary method for scaling large iBGP networks. This lesson covers the learning outcome: Configure and verify iBGP confederations as an alternative scalability solution.

As a solutions engineer, you know that there's rarely a single "best" solution for a design problem. Confederations offer a different set of trade-offs compared to route reflectors, particularly suited for very large or logically segmented autonomous systems. We will dive into the concept, explore how routes propagate, learn the configuration, and then compare it to the route reflector design we've already mastered.

1. The Concept of a BGP Confederation

A BGP confederation addresses the iBGP full-mesh problem by dividing a single, large Autonomous System (AS) into multiple smaller, more manageable sub-autonomous systems (sub-ASes).

From the perspective of the outside world (any external BGP peer), this entire collection of sub-ASes appears as a single AS, identified by a "confederation identifier." Internally, however, the network operates as a group of distinct ASes.

Think of it like a large corporation (the confederation) made up of several divisions (the sub-ASes). External partners only need to know how to interact with the corporation as a whole. Internally, the divisions have their own structure but communicate with each other following specific corporate protocols.

BGP Confederation Diagram
This diagram illustrates a BGP confederation. A large public AS (100) is broken into smaller private sub-ASes (65001, 65002). To the external AS 200 and AS 300, all routes appear to originate from AS 100. Peering *between* sub-ASes is a special form of eBGP, while peering *within* a sub-AS is standard iBGP.

Let's watch a video that introduces this concept and contrasts it with the iBGP full-mesh and route reflector solutions.

1101 BGP Confederations

This video from Sikandar Shaik explains the fundamental idea behind BGP confederations—splitting one large AS into multiple sub-ASes to reduce the iBGP peering mesh.

Watch from the beginning until 04:14. Focus on how a confederation is structured and the distinction between the main confederation AS and the internal sub-ASes.


2. Peering and Route Propagation in a Confederation

The key to understanding confederations is knowing how peering and BGP attributes are handled.

  • Peering within a sub-AS: This is standard iBGP. This means all routers within the same sub-AS must be fully meshed or, more practically, use route reflectors inside that sub-AS.
  • Peering between sub-ASes: This is technically an eBGP session because the peers are in different AS numbers. However, the router is configured to know these peers are part of the same confederation. This "confederation eBGP" behaves much like an iBGP session: attributes like Next Hop, Local Preference, and MED are preserved as the route crosses from one sub-AS to another. This is a crucial difference from a standard eBGP peering.

To understand this special behavior and how routes propagate, let's continue with the video.

1101 BGP Confederations

This segment of the video details how BGP path attributes are handled within a confederation, particularly the AS_PATH. It also summarizes the key design principles.

Watch from 04:14 to the end (12:05). Pay close attention to how the AS_PATH is modified to include sub-AS numbers in parentheses () and how this information is stripped when the route leaves the confederation. Also, note the recommendation to use private AS numbers for the sub-ASes.

AS_PATH Handling

As the video explained, the AS_PATH is treated specially:

  1. When a route is advertised from one sub-AS to another, the sending sub-AS number is added to a confederation sequence in the AS_PATH, typically shown in parentheses: (65002 65001). This sequence is used for loop prevention within the confederation.
  2. When the route is advertised outside the confederation entirely, this entire parenthesized sequence is removed and replaced by the single public confederation AS number. The outside world remains unaware of the internal sub-AS structure.

To reinforce these core concepts, let's review the official Cisco documentation.

IP Routing Configuration Guide, Cisco IOS XE 17.x

This document from Cisco's IP Routing Configuration Guide provides a concise, authoritative summary of how BGP confederations work.

Read the section titled 'BGP Routing Domain Confederation'. Focus on the statement that confirms how next hop, MED, and local preference are preserved between sub-ASes.


3. Configuration and Verification

Configuring a confederation involves three key commands within the BGP routing process. All commands are applied on routers that are part of the confederation.

  1. router bgp <sub-as-number>: A router's BGP process is initiated using its local sub-AS number, not the main confederation number.
  2. bgp confederation identifier <main-as-number>: This command tells the router the public-facing AS number of the entire confederation. This AS number will be presented to all true eBGP peers outside the confederation.
  3. bgp confederation peers <list-of-other-sub-as-numbers>: This command lists all other sub-AS numbers that are part of the same confederation. This is what enables the special "confederation eBGP" behavior for peerings with routers in those ASes.

Let's look at the official documentation for the command syntax and a complete configuration example.

IP Routing Configuration Guide, Cisco IOS XE 17.x

This part of the Cisco guide provides the exact command syntax and a practical example showing how to configure a confederation across multiple routers.

First, review the commands under the heading 'Configuring a Routing Domain Confederation.' Then, carefully study the multi-router example under 'Example: BGP Confederation' (the second example in that section). Note how each router is configured with its own sub-AS (router bgp 6001, 6002, 6003) but shares the same confederation identifier (bgp confederation identifier 500) and lists its confederation peers.

Verification

After configuration, you verify a confederation primarily using the show ip bgp command. When you inspect a route that has traversed the confederation, you will see the sub-AS path in parentheses.

For example, on a router in sub-AS 6003 from the example you just read, a route originating from an external AS (e.g., 777) and passing through sub-AS 6001 would show an AS_PATH like (6001) 777. This confirms the confederation is working and the path is being tracked correctly for internal loop prevention. If that same route were then advertised to an external peer, the (6001) part would be removed and replaced with 500, the confederation identifier.

Test your understanding!

You are configuring a router, R1, which resides in sub-AS 65010. This sub-AS is part of a larger confederation identified by the public AS 100. R1 needs to peer with R2 in sub-AS 65020 and R3 in sub-AS 65030. Which set of commands is correct for the BGP process on R1?

A)

router bgp 100
 bgp confederation identifier 65010
 bgp confederation peers 65020 65030

B)

router bgp 65010
 bgp confederation identifier 100
 bgp confederation peers 65020 65030

C)

router bgp 65010
 bgp confederation identifier 100
 neighbor 192.168.1.2 remote-as 100
 neighbor 192.168.1.3 remote-as 100

D)

router bgp 100
 bgp confederation peers 65010 65020 65030
Show answer

The correct answer is B.

  • router bgp 65010: The BGP process must be started with the router's local sub-AS number.
  • bgp confederation identifier 100: This defines the public-facing AS number for the entire confederation.
  • bgp confederation peers 65020 65030: This identifies the other sub-ASes that are part of the confederation, enabling the special eBGP behavior.
  • The neighbor statements (not shown in option B but implied) would then use the actual sub-AS numbers of the peers (e.g., neighbor <R2_IP> remote-as 65020).

4. Confederations vs. Route Reflectors

You now have two powerful tools for scaling iBGP. Choosing between them is a key design decision.

Feature Route Reflectors Confederations
Complexity Simpler to configure and deploy, less disruptive to an existing network. More complex initial design and planning. Requires assigning sub-AS numbers.
Hierarchy Creates a "soft" hierarchy based on RR clusters. Less rigid. Creates a "hard," logical boundary between sub-ASes, much like separate routing domains.
Loop Prevention Uses non-transitive BGP attributes: Originator ID and Cluster-list. Uses the standard BGP AS_PATH mechanism, with the sub-AS numbers forming a confederation path.
Policy Control Policies are often applied centrally or can become complex to manage. Excellent for delegating administrative control and applying distinct policies per sub-AS.
Best For Scaling small to medium-sized iBGP deployments quickly and simply. Scaling very large networks (e.g., service providers) or networks requiring strong logical/policy separation between internal segments.

In many large networks, you may even see a hybrid approach: a confederation is used to break the AS into large sub-ASes, and route reflectors are used within each sub-AS to manage the internal iBGP mesh.


Conclusion

In this lesson, we added BGP confederations to your network design toolkit. It is a powerful, if more complex, alternative to route reflectors for solving the iBGP full-mesh scalability problem.

Key Takeaways:

  • A confederation logically divides a single AS into multiple sub-ASes.
  • Externally, the confederation appears as a single AS via the bgp confederation identifier.
  • Peering between sub-ASes is a special form of eBGP that preserves iBGP attributes like Local Preference, Next Hop, and MED.
  • The bgp confederation peers command identifies which ASes are part of the confederation.
  • Loop prevention is handled by adding sub-AS numbers to the AS_PATH in a parenthesized list, which is stripped before being advertised to external peers.
  • Confederations provide strong administrative and policy boundaries, making them ideal for very large or complex autonomous systems.

Preview of the Next Lesson:

Having mastered the two primary methods for scaling iBGP inside your autonomous system (route reflectors and confederations), our focus will now shift outward. In the next lesson, we will apply BGP for enterprise multihoming scenarios, connecting your enterprise network to one or more Internet Service Providers for redundancy and performance.