BGP Confederation Explained 2024

Rashmi Bhardwaj | Blog,Config & Troubleshoot,Protocol,Routing & Switching
Advertisements

There are two ways that help us to mitigate the BGPs full-mesh requirement in a network:

  • Using BGP route-reflectors
  • Using BGP confederation

What is BGP Confederation & How it Works?

In this post, we will understand how BGP confederation works and will also configure as simple topology explaining how to configure the same.

BGP confederations allow us to divide a single AS into one or more ASs and assign the whole group to a single AS. Each smaller AS will need to have a full mesh inside its own AS.

Advertisements

Related – BGP Interview Questions

Even though this ASs will have EBGP peers to ASs within the confederation, they exchange routing as if they were using IBGP; next hop, metric and local preference information is preserved.

To the outside world, the confederation (the group of ASs) will look like a single AS.

We will use the below topology to configure the BGP confederation:

bgp confederation explained
bgp confederation explained
  • In the above topology routers R2, R3, R4 & R5 are part of the same AS 100.
  • We have divided AS 100 into two smaller AS 10 and 20 with two routers each.
  • R2 & R3 will form an IBGP neighbor ship in AS 10.
  • R4 & R5 will form an IBGP neighbor ship in AS 20.
  • R3 and R4 will form EBGP neighbor ship.

Related – BGP Local Preference Cisco

Configuration –

R1:

interface Loopback0

ip address 1.1.1.1 255.255.255.255

!

interface FastEthernet0/0

ip address 9.9.12.1 255.255.255.0

!

router bgp 200

bgp log-neighbor-changes

network 1.1.1.1 mask 255.255.255.255

neighbor 9.9.12.2 remote-as 100

R2:

interface Loopback0

ip address 9.9.0.2 255.255.255.255

ip ospf 1 area 0

!

interface FastEthernet0/0

ip address 9.9.12.2 255.255.255.0

!

interface FastEthernet1/0

ip address 9.9.23.2 255.255.255.0

ip ospf 1 area 0

!

router bgp 10

bgp log-neighbor-changes

bgp confederation identifier 100

bgp confederation peers 20

neighbor 9.9.0.3 remote-as 10

neighbor 9.9.0.3 update-source Loopback0

neighbor 9.9.12.1 remote-as 200

R3:

interface Loopback0

ip address 9.9.0.3 255.255.255.255

ip ospf 1 area 0

!

interface FastEthernet0/0

ip address 9.9.23.3 255.255.255.0

ip ospf 1 area 0

!

interface FastEthernet1/0

ip address 9.9.34.3 255.255.255.0

ip ospf 1 area 0

!

router bgp 10

bgp log-neighbor-changes

bgp confederation identifier 100

bgp confederation peers 20

neighbor 9.9.0.2 remote-as 10

neighbor 9.9.0.2 update-source Loopback0

neighbor 9.9.0.4 remote-as 20

neighbor 9.9.0.4 ebgp-multihop 2 # Uses EBGP multihop as R4 is treated as a EBGP neighbor inside a confederation and Loopback of R4 is one hop away from R3.

neighbor 9.9.0.4 update-source Loopback0

R4:

interface Loopback0

ip address 9.9.0.4 255.255.255.255

ip ospf 1 area 0

!

interface FastEthernet0/0

ip address 9.9.34.4 255.255.255.0

ip ospf 1 area 0

!

interface FastEthernet1/0

ip address 9.9.45.4 255.255.255.0

ip ospf 1 area 0

!

router bgp 20

bgp log-neighbor-changes

bgp confederation identifier 100

bgp confederation peers 10

neighbor 9.9.0.3 remote-as 10

neighbor 9.9.0.3 ebgp-multihop 2

neighbor 9.9.0.3 update-source Loopback0

neighbor 9.9.0.5 remote-as 20

neighbor 9.9.0.5 update-source Loopback0

R5:

interface Loopback0

ip address 9.9.0.5 255.255.255.255

ip ospf 1 area 0

!

interface FastEthernet0/0

ip address 9.9.45.5 255.255.255.0

ip ospf 1 area 0

!

interface FastEthernet1/0

ip address 9.9.56.5 255.255.255.0

!

router bgp 20

bgp log-neighbor-changes

bgp confederation identifier 100

bgp confederation peers 10

neighbor 9.9.0.4 remote-as 20

neighbor 9.9.0.4 update-source Loopback0

neighbor 9.9.56.6 remote-as 200

R6:

interface Loopback0

ip address 6.6.6.6 255.255.255.255

!

interface FastEthernet0/0

ip address 9.9.56.6 255.255.255.0

!

router bgp 200

bgp log-neighbor-changes

network 6.6.6.6 mask 255.255.255.255

neighbor 9.9.56.5 remote-as 100

Logs

R3 forms IBGP with R2 and EBGP with R4:

R3#sh ip bgp summary

BGP router identifier 9.9.0.3, local AS number 10

BGP table version is 1, main routing table version 1

1 network entries using 144 bytes of memory

1 path entries using 80 bytes of memory

1/0 BGP path/bestpath attribute entries using 136 bytes of memory

1 BGP AS-PATH entries using 24 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 384 total bytes of memory

BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor        V     AS       MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down   State/PfxRcd

9.9.0.2         4           10       5               4                1              0     0          00:01:15     1

9.9.0.4         4           20       4              4                1              0     0           00:01:07    0

And Similarly R4 forms IBGP with R5 and EBGP with R3:

R4#sh ip bgp summary

BGP router identifier 9.9.0.4, local AS number 20

BGP table version is 1, main routing table version 1

1 network entries using 144 bytes of memory

1 path entries using 80 bytes of memory

1/0 BGP path/bestpath attribute entries using 136 bytes of memory

1 BGP AS-PATH entries using 24 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 384 total bytes of memory

BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor        V     AS    MsgRcvd  MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

9.9.0.3         4       10      5                  4                 1              0    0         00:01:42        0

9.9.0.5         4        20     6                 4                  1             0    0          00:01:50        1

But for the external routers R1 and R6, the remote AS will be seen as a single AS 100 and they form neighbor ship with R2 and R5 respectively.

R1#sh ip bgp summary

BGP router identifier 1.1.1.1, local AS number 200

BGP table version is 2, main routing table version 2

1 network entries using 144 bytes of memory

1 path entries using 80 bytes of memory

1/1 BGP path/bestpath attribute entries using 136 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 360 total bytes of memory

BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor        V       AS      MsgRcvd  MsgSent   TblVer  InQ OutQ Up/Down        State/PfxRcd

9.9.12.2           4       100     5                 7                  2            0     0         00:03:02        0

R6#sh ip bgp summary

BGP router identifier 6.6.6.6, local AS number 200

BGP table version is 2, main routing table version 2

1 network entries using 144 bytes of memory

1 path entries using 80 bytes of memory

1/1 BGP path/bestpath attribute entries using 136 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 360 total bytes of memory

BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor        V      AS         MsgRcvd    MsgSent   TblVer  InQ OutQ   Up/Down     State/PfxRcd

9.9.56.5        4          100       6                  7                  2            0      0          00:03:09        0

Hope you would have understood all about BGP Confederation.

Continue Reading:

BGP States

BGP Allowas-in

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart