BGP Confederations
In BGP, nodes running iBGP protocols must be interconnected forming a full mesh. Confederation solves the iBGP full-mesh network complexity and inefficiency by splitting a large autonomous system domain into smaller autonomous system domains, called member autonomous systems. Member autonomous systems can form eBGP connections among themselves, to prevent full-mesh connections among each iBGP-running node.
The bgp confederation identifier command tells the router that it is a member of a confederation and the confederation ID. The bgp confederation peers command lists the member AS to which the router is connected.
In the following example, R1, R2, and R3 are members of the same confederation with different AS numbers.
Topology
Figure 19. BGP Confederation
R1
|
#configure terminal |
Enter configure mode. |
|
(config)#router bgp 400 |
Assign the ASN value ( 400) to the router. |
|
(config-router)#bgp confederation identifier 1000 |
Specify the BGP confederation ID, the externally visible autonomous system number that identifies the BGP confederation as a whole. |
|
(config-router)#bgp confederation peers 7000 |
Specify the neighbor ASN value for confederation membership. |
|
(config-router)#neighbor 10.20.30.2 remote-as 7000 |
Specify the neighbor’s IP address ( 10.20.30.2) and the ASN value of the neighbor ( 7000). |
|
(config-router)# address-family ipv4 unicast |
Enter address-family ipv4 unicast mode |
|
(config-router-af)# neighbor 10.20.30.2 activate |
Activate the neighbor under address family mode |
|
(config-router-af)#exit-address-family |
Exit address-family mode. |
|
(config-router)#commit |
Commit the candidate configuration to the running configuration. |
R2
|
#configure terminal |
Enter configure mode. |
|
(config)#router bgp 7000 |
Assign the ASN value ( 7000) to the router. |
|
(config-router)#bgp confederation identifier 1000 |
Specify the BGP confederation ID. |
|
(config-router)#bgp confederation peers 400 90 |
Specify the neighbor ASN values for confederation membership. |
|
(config-router)#neighbor 10.20.30.1 remote-as 400 |
Specify the neighbor’s IP address ( 10.20.30.1) and the ASN value of the neighbor ( 400). |
|
(config-router)#neighbor 11.20.30.30 remote-as 90 |
Specify the neighbor’s IP address ( 11.20.30.30) and the ASN value of the neighbor ( 90). |
|
(config-router)# address-family ipv4 unicast |
Enter address-family ipv4 unicast mode |
|
(config-router-af)# neighbor 10.20.30.1 activate |
Activate the neighbor under address family mode |
|
(config-router-af)# neighbor 11.20.30.30 activate |
Activate the neighbor under address family mode |
|
(config-router-af)#exit-address-family |
Exit address-family mode. |
|
(config-router)#commit |
Commit the candidate configuration to the running configuration. |
R3
|
#configure terminal |
Enter configure mode. |
|
(config-router)#router bgp 90 |
Assign the ASN value ( 90) to the router. |
|
(config-router)#bgp confederation identifier 1000 |
Specify the BGP confederation ID. |
|
(config-router)#bgp confederation peers 7000 |
Specify the neighbor ASN value for confederation membership. |
|
(config-router)#neighbor 11.20.30.20 remote-as 7000 |
Specify the neighbor’s IP address ( 11.20.30.20) and the ASN value of the neighbor ( 7000). |
|
(config-router)# address-family ipv4 unicast |
Enter address-family ipv4 unicast mode |
|
(config-router-af)# neighbor 11.20.30.20 activate |
Exit address-family mode. |
|
(config-router-af)#exit-address-family |
Exit address-family mode. |
|
(config-router)#commit |
Commit the candidate configuration to the running configuration. |
Validation
R2
The following provides the R2 validation:
#sh ip bgp summary
BGP router identifier 192.168.52.3, local AS number 7000
BGP table version is 1
0 BGP AS-PATH entries
0 BGP community entries
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
10.20.30.1 4 400 5 5 1 0 0 00:01:36 0
11.20.30.30 4 90 2 3 1 0 0 00:00:24 0
Total number of neighbors 2
Total number of Established sessions 2
#show ip bgp neighbors
BGP neighbor is 10.20.30.1, remote AS 400, local AS 7000, external link
BGP version 4, local router ID 192.168.52.3, remote router ID 192.168.52.2
Neighbor under common administration
BGP state = Established, up for 00:01:25
Last read 00:01:25, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 4 messages, 0 notifications, 0 in queue
Sent 4 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 10.20.30.2, Local port: 35108
Foreign host: 10.20.30.1, Foreign port: 179
Nexthop: 10.20.30.2
Nexthop global: fe80::a00:27ff:fe21:7ed2
Nexthop local: ::
BGP connection: non shared network
BGP neighbor is 11.20.30.30, remote AS 90, local AS 7000, external link
BGP version 4, remote router ID 192.168.56.103
Neighbor under common administration
BGP state = Established, up for 00:00:13
Last read 00:00:13, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 2 messages, 0 notifications, 0 in queue
Sent 3 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 11.20.30.20, Local port: 179
Foreign host: 11.20.30.30, Foreign port: 33465
Nexthop: 11.20.30.20
Nexthop global: fe80::a00:27ff:fed0:57d1
Nexthop local: ::
BGP connection: non shared network
R1
The following provides the R1 validation:
#show ip bgp neighbors
BGP neighbor is 10.20.30.2, remote AS 7000, local AS 400, external link
BGP version 4, local router ID 192.168.52.2, remote router ID 192.168.52.3
Neighbor under common administration
BGP state = Established, up for 00:01:51
Last read 00:01:51, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 5 messages, 0 notifications, 0 in queue
Sent 6 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 3, neighbor version 3
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 10.20.30.1, Local port: 179
Foreign host: 10.20.30.2, Foreign port: 35108
Nexthop: 10.20.30.1
Nexthop global: fe80::a00:27ff:fe50:6a9b
Nexthop local: ::
BGP connection: non shared network
#sh ip bgp summary
BGP router identifier 192.168.52.3, local AS number 400
BGP table version is 3
1 BGP AS-PATH entries
0 BGP community entries
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
10.20.30.2 4 7000 5 6 3 0 0 00:01:57 0
Total number of neighbors 1
Total number of Established sessions 1
R3
The following provides the R3 validation:
#sh ip bgp neighbors
BGP neighbor is 11.20.30.20, remote AS 7000, local AS 90, external link
BGP version 4, local router ID 192.168.52.5, remote router ID 192.168.52.3
Neighbor under common administration
BGP state = Established, up for 00:00:04
Last read 00:00:04, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 2 messages, 0 notifications, 0 in queue
Sent 2 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 11.20.30.30, Local port: 33465
Foreign host: 11.20.30.20, Foreign port: 179
Nexthop: 11.20.30.30
Nexthop global: fe80::a00:27ff:fe24:5dc9
Nexthop local: ::
BGP connection: non shared network
#sh ip bgp summary
BGP router identifier 192.168.56.103, local AS number 90
BGP table version is 1
0 BGP AS-PATH entries
0 BGP community entries
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
11.20.30.20 4 7000 3 3 1 0 0 00:00:55 0
Total number of neighbors 1
Total number of Established sessions 1