IBGP requires that BGP speakers within an AS be fully meshed. You can reduce the IBGP mesh inside an AS by subdividing the AS into a confederation of sub-ASs. Each sub-AS must be fully meshed internally, but the sub-ASs do not have to be fully meshed with each other. Confederations are most useful when the number of IBGP speakers within an AS increases to the point that each router has about 100 peering sessions.
Figure 41 shows a simpler topology. AS 29 consists of 10 fully meshed IBGP peers (for clarity, only the BGP sessions are shown). Border router Salem has an EBGP session with a neighbor in AS 325. Border router Boston has an EBGP session with a neighbor in AS 413.
Figure 41: A Fully Meshed Autonomous System

Figure 42 illustrates how you can create three sub-ASs within AS 29 to greatly reduce the number of peering sessions. According to common practice, use a number from the private range of AS numbers—from 64512 to 65535—to identify each sub-AS. AS 29 is now a confederation of three sub-ASs: AS 64720, AS 64721, and AS 64722. Each sub-AS consists of fully meshed IBGP peers. A slightly modified version of EBGP runs between the sub-ASs: It acts like IBGP within an AS because the local-pref, MED, and next-hop attributes are preserved across the sub-AS boundaries. To the external neighbors, AS 29 appears the same as it ever was.
Figure 42: A Confederation of Subautonomous Systems

The following commands partially configure router Salem:
- host1(config)#router bgp 64720
- host1(config-router)#bgp confederation identifier
29
- host1(config-router)#bgp confederation peers
64721 64722
- host1(config-router)#neighbor 10.2.25.4 remote-as
64720
- host1(config-router)#neighbor 10.2.25.8 remote-as
64721
- host1(config-router)#neighbor 10.2.25.2 remote-as
325
The bgp confederation identifier command establishes router Salem as a member of Confederation 29. The bgp confederation peers command specifies that sub-AS 64721 and sub-AS 64722 are members of the same confederation as the sub-AS that includes router Salem. The neighbor remote-as commands specify the IBGP connection with a neighbor in sub-AS 64720 and the EBGP connections with neighbors in sub-AS 64721 and outside the confederation in AS 325.
Similarly, the following commands partially configure router Harvard:
- host2(config)#router bgp 64721
- host2(config-router)#bgp confederation identifier
29
- host2(config-router)#bgp confederation peers
64720 64722
- host2(config-router)#neighbor 10.2.25.7 remote-as
64720
From router Newport’s perspective, router Salem is simply a member of AS 29:
- host3(config)#router bgp 325
- host3(config-router)#neighbor 10.2.25.6 remote-as
29
From router Mason’s perspective, router Boston is simply a member of AS 29:
- host4(config)#router bgp 413
- host4(config-router)#neighbor 10.3.3.2 remote-as
29
bgp confederation identifier
To force sessions that are already up to use the new confederation identifier, you must use the clear ip bgp command to perform a hard clear.
bgp confederation peers
ip bgp-confed-as-set new-format
- host1(config)#ip bgp-confed-as-set new-format