.. _example_protocols_bgp_peer-group_local-as: ######## Local-As ######## .. sidebar:: Contents .. contents:: :depth: 2 :local: Scenario to verify BGP **peer-group local-as** inheritance. When ``local-as`` is configured on a peer-group, members use an alternate ASN for the BGP session instead of the process ASN. Options ``no-prepend`` and ``replace-as`` control how the alternate ASN appears in the AS-path. .. image:: local-as.svg :width: 400 *********************************************************************** Test eBGP - Peer-group local-as uses alternate ASN and modifies AS-path *********************************************************************** Description =========== Test that ``local-as`` configured on a peer-group allows members to use an alternate ASN. DUT0 (AS 50) uses local-as 10 via peer-group MYGROUP for DUT1. DUT1 (AS 20) advertises 192.168.100.0/24. DUT2 (AS 30) receives the route. By default, AS-path includes both local-as and real ASN: ``10 50 10 20``. With ``no-prepend``, local-as is not prepended on receive: ``10 50 20``. With ``replace-as`` on DUT2's neighbor, real ASN is hidden on export: ``10 20``. Scenario ======== .. include:: local-as/testebgp-peer-grouplocal-asusesalternateasnandmodifiesas-path .. raw:: html