What is a BGP confederation, and how does it compare with route reflection?
Show the answer
Say this first
A confederation (RFC 5065) splits one AS into sub-ASes, usually with private numbers. Inside each sub-AS you run normal iBGP. Between sub-ASes you run confederation eBGP: loop prevention works like eBGP, with sub-AS numbers recorded in the AS_CONFED_SEQUENCE, but NEXT_HOP, LOCAL_PREF and MED are kept as in iBGP. Outside peers see one AS. Route reflectors are far more common; confederations appear in very large networks and after mergers.
Go deeper
Config
R1 sits in sub-AS 65001 of confederation 64500 and peers with R4 in sub-AS 65002:
router bgp 65001
bgp confederation identifier 64500
bgp confederation peers 65002
neighbor 10.255.0.2 remote-as 65001
neighbor 10.255.0.2 update-source Loopback0
neighbor 10.255.0.4 remote-as 65002
neighbor 10.255.0.4 update-source Loopback0
neighbor 10.255.0.4 ebgp-multihop 2External neighbors configure remote-as 64500 and never see 65001 or 65002.
Details interviewers probe
- The sub-AS path shows in parentheses, for example
(65002) 64496 i. Confederation segments do not count toward AS path length. - Peer type order: eBGP beats confederation eBGP, which beats iBGP.
- Confederation eBGP sessions use TTL 1 like real eBGP, so loopback peering needs
ebgp-multihop.
Route reflectors versus confederations
| Route reflectors | Confederations | |
|---|---|---|
| Routers to reconfigure | Only the RRs | Every router (new router bgp number) |
| Migration effort | Low | High |
| Policy between parts | Limited | eBGP-style policy between sub-ASes |
| Seen today | Almost everywhere | Large ISPs, merged networks |
They will ask next
Can you use both together?
Yes. Large confederations often run route reflectors inside each sub-AS.
Why might a merger use a confederation?
Two companies with different ASNs can join under one external AS while keeping their internal BGP structure, then clean up later.
Traps
- Thinking outside peers see the sub-AS numbers. The confederation segments are removed at the edge.