.. _example_protocols_bgp_parameters_confederation: ############# Confederation ############# Scenario to verify BGP **confederation** parameter configuration. BGP confederations allow dividing an autonomous system into multiple sub-autonomous systems while presenting a single AS to external peers. The ``confederation identifier`` defines the public AS number visible to the outside, while each router runs BGP with its sub-AS number. The ``confederation peers`` command lists the other sub-AS numbers that belong to the same confederation. The scenario covers three cases by checking the neighbor link type reported by FRR in ``show ip bgp neighbors``: - **confed-internal link** — both DUTs in the same sub-AS (65001) with confederation parameters configured. - **confed-external link** — DUTs in different sub-ASes (65001 and 65002) that declare each other as ``confederation peers`` under the same identifier 100. - **internal link** — same topology without confederation, used as baseline to confirm that the ``confed-*`` results above are caused by the confederation configuration. ***************************************************************************** Test iBGP - Confederation parameters change peer link type to confed-internal ***************************************************************************** Description =========== Test that ``confederation identifier`` and ``confederation peers`` are correctly applied. **DUT0** and **DUT1** are in the same sub-AS (65001) with confederation identifier 100 and peer 65002. The test verifies that FRR reports the neighbor as ``confed-internal link`` (instead of ``internal link``), proving the confederation is active. It also verifies that routes are exchanged correctly within the confederation sub-AS. Scenario ======== .. include:: confederation/testibgp-confederationparameterschangepeerlinktypetoconfed-internal .. raw:: html
*************************************************************************************** Test BGP - Neighbor remote-as matching confederation peers reports confed-external link *************************************************************************************** Description =========== Test that a neighbor whose ``remote-as`` matches a value listed in ``parameters confederation peers`` is accepted at commit time and recognized by FRR as a peer in another sub-AS of the same confederation. **DUT0** is configured in sub-AS 65001 and **DUT1** in sub-AS 65002, with both declaring each other under confederation identifier 100. The test verifies that FRR reports the neighbor as ``confed-external link`` and that routes are exchanged between the sub-ASes. Scenario ======== .. include:: confederation/testbgp-neighborremote-asmatchingconfederationpeersreportsconfed-externallink .. raw:: html
************************************************************ Test iBGP - Without confederation peer link type is internal ************************************************************ Description =========== Test that without confederation parameters, the same iBGP topology reports the neighbor as standard ``internal link``. This serves as a baseline to confirm that the ``confed-internal link`` and ``confed-external link`` outputs in the previous tests are caused by the confederation configuration. Scenario ======== .. include:: confederation/testibgp-withoutconfederationpeerlinktypeisinternal .. raw:: html