.. _example_protocols_bgp_neighbor_remove-private-as: ################# Remove-Private-As ################# Test BGP **remove-private-as** functionality. When a router receives routes from a neighbor using a private AS number (64512-65534 for 16-bit or 4200000000-4294967294 for 32-bit), those private AS numbers appear in the AS-path. The remove-private-as command strips these private AS numbers from the AS-path before advertising routes to an eBGP peer. This is commonly used when a network uses private AS numbers internally (for example, with customers or branch offices) but needs to advertise routes to the internet without exposing those private AS numbers. The command only works on eBGP sessions and only affects outbound advertisements to that neighbor. .. image:: remove-private-as.svg :width: 800 ************************************************************** Test eBGP - Without remove-private-as shows private AS in path ************************************************************** Description =========== Baseline test showing default behavior where private AS numbers are visible in the AS-path. DUT1 uses private AS 65001 and originates route 192.168.100.0/24. DUT0 (AS 100) receives the route and forwards it to DUT2 (AS 200). Without remove-private-as, DUT2 should see the full AS-path including the private AS number. Scenario ======== .. include:: remove-private-as/testebgp-withoutremove-private-asshowsprivateasinpath .. raw:: html