Dear Ahammad,
You have to configure this on all routers within the sub-AS otherwise they won’t consider themselves part of the confederation. They will be able to establish BGP peerings but they’ll consider other routers in the confederation as regular “external” or “internal” neighbors. They will also drop routes when they see a confederation path in it.
I tested this, here is the output of some show commands when I removed “bgp confederation identifier 2” on R3, R4 and R5:
R3#show ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 19
Paths: (1 available, best #1, table default)
Flag: 0x820
Advertised to update-groups: (Pending Update Generation)
3
Refresh Epoch 1
(24) 1
192.168.12.1 (metric 2) from 2.2.2.2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
R4#show ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 20
Paths: (1 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 1
1
192.168.12.1 (metric 2) from 2.2.2.2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, valid, internal, best
rx pathid: 0, tx pathid: 0x0
R5#show ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 25
Paths: (2 available, best #2, table default)
Advertised to update-groups:
1
Refresh Epoch 1
24 1
192.168.12.1 (metric 3) from 4.4.4.4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
(24) 1
192.168.12.1 (metric 3) from 3.3.3.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, internal, best
rx pathid: 0, tx pathid: 0x0
Here’s one of the errors I noticed:
R4#
%BGP-6-ASPATH: Invalid AS path 35 (24) received from 5.5.5.5: Confederation AS-path found in the middle
Hope this helps.
Rene