Module 2: Scaling iBGP·Lesson 2.2 (2 of 3 in this module)·5 of 11 in the Advanced BGP course
BGP confederations
Splitting one AS into sub-ASes to avoid a full mesh.
Advanced · 20 min read
You'll learn to explain how a confederation presents one AS to the outside, configure sub-ASes, and read the confederation segment in an AS path.
Smaller meshes inside one AS
A confederation divides a large AS into member sub-ASes. Inside each sub-AS the routers run ordinary iBGP and need a full mesh among themselves. Between sub-ASes they run a special form of eBGP. To the rest of the internet the whole thing is one AS, announced by the confederation identifier.
Full mesh against confederation
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Between sub-ASes the routers behave much like eBGP, but inside the confederation attributes are kept.
One AS presented as several sub-ASes
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Sub-AS numbers are private and hidden from the outside. AS_PATH carries them in a special confederation segment that does not count toward path length.
A1, a router in sub-AS 65001. The router bgp number is the sub-AS. The identifier is the AS the outside sees. bgp confederation peers lists the other sub-ASes. The loopback eBGP session between sub-ASes needs ebgp-multihop.
Neighbours inside the same sub-AS use their sub-AS number as remote-as. Neighbours in another sub-AS use that sub-AS number and are listed under confederation peers. Neighbours outside the confederation use their real AS number.
Reading a confederation path
Illustrative Cisco IOS XE output written for this lesson, not a router capture
B1#show ip bgp 203.0.113.0
BGP routing table entry for 203.0.113.0/24, version 5
Paths: (1 available, best #1, table default)
(65001) 64501
10.255.0.1 from 10.255.1.1 (10.255.1.1)
Origin IGP, metric 0, localpref 100, valid, confed-external, best
The number in parentheses is the confederation segment: the route passed through sub-AS 65001 inside the confederation. The word confed-external tells you the session crosses a sub-AS boundary. The segment is removed before the route is sent outside.
On small screens, swipe sideways or focus the diagram and use the arrow keys.
The confederation identifier is the only AS number outside peers see.
Following a route across sub-ASes
The path changes at every sub-AS boundary in a way that does not show on the internet. Follow one route from AS 64501 through three sub-ASes to AS 64502.
The AS path across a confederation
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Sub-AS numbers prevent loops inside the confederation but do not count towards the AS path length. Outside peers see one AS, 64500.
Inside the confederation, each sub-AS prepends its own number to a special segment of the path, written in parentheses. A router that finds its own sub-AS number in that segment rejects the route, so loops between sub-ASes are prevented the way AS_PATH prevents them between real ASes. When the route is sent to a true eBGP neighbour, the segment is dropped and the confederation identifier is added.
What is kept across a sub-AS boundary
The session between sub-ASes is a form of eBGP, but the confederation is still one AS in policy terms, so several attributes behave like iBGP instead of like normal eBGP.
Behaviour at a confederation boundary
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Treating the whole confederation as one AS is the point: policy set at the edge applies throughout.
Migrating an AS to a confederation
A safe order for a migration
On small screens, swipe sideways or focus the diagram and use the arrow keys.
On IOS XE the BGP process number cannot be changed in place, so each router BGP configuration is rebuilt under the sub-AS number. Plan a maintenance window for each sub-AS.
Confederations and route reflectors
Both reduce the iBGP mesh. A reflector keeps one AS and relays routes by rule. A confederation splits the AS and adds a layer of sub-AS numbers, which is more disruptive to introduce but gives policy boundaries.
Choosing between the two
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Many networks combine them: reflectors inside each sub-AS.
Check your understanding
Predict · scenario 1
What does an outside network see in the AS path of a route from a confederation?
Predict · scenario 2
Which command identifies the AS the outside world sees?
Predict · scenario 3
Why does a confederation reduce sessions?
FAQ
Why use a confederation instead of route reflectors?
Both reduce the mesh. Confederations also let different parts of a large network run separate policy, and they are common after company mergers. Route reflectors are simpler to deploy and are the usual first choice.
What do outside networks see?
Only the confederation identifier, AS 64500 in this lesson. The sub-AS numbers are removed when a route leaves.
Which attributes survive between sub-ASes?
Next hop, MED and local preference are kept when a route crosses a confederation boundary, so policy stays consistent across the whole AS.