.. _example_protocols_bgp_parameters_bestpath: ######## Bestpath ######## Scenario to verify BGP **bestpath** parameter configuration. The bestpath parameters control how BGP selects the best route when multiple paths exist to the same destination. This test suite verifies the following sub-commands: ``as-path ignore`` and ``compare-routerid``. **DUT0** (AS 100) receives the same route from two eBGP neighbors (**DUT1** and **DUT2**) with different attributes. The tests demonstrate how each bestpath parameter changes the route selection behavior. *********************************************************** Test eBGP - Bestpath as-path ignore changes route selection *********************************************************** Description =========== Test that ``bestpath as-path ignore`` causes BGP to ignore AS-path length when selecting the best route. **DUT0** (AS 100) receives route ``192.168.10.0/24`` from **DUT1** (AS 200, MED 100, AS-path length 1) and **DUT2** (AS 200, MED 50, AS-path length 2). Without the parameter, the shorter AS-path wins. With the parameter, AS-path is ignored and MED determines the selection. Scenario ======== .. include:: bestpath/testebgp-bestpathas-pathignorechangesrouteselection .. raw:: html
********************************************************************* Test eBGP - Bestpath compare-routerid enables deterministic selection ********************************************************************* Description =========== Test that ``bestpath compare-routerid`` uses router-id as a deterministic tie-breaker for identical eBGP paths. **DUT0** (AS 100) receives route ``192.168.10.0/24`` from **DUT1** (AS 200, router-id 10.255.255.100) and **DUT2** (AS 200, router-id 10.255.255.50). Without the parameter, the older path wins. With the parameter, the lower router-id wins. Scenario ======== .. include:: bestpath/testebgp-bestpathcompare-routeridenablesdeterministicselection .. raw:: html