FRR states:
Specify an alternate AS for this BGP process when interacting with the specified peer. With no modifiers, the specified local-as is prepended to the received AS_PATH when receiving routing updates from the peer, and prepended to the outgoing AS_PATH (after the process local AS) when transmitting local routes to the peer.
If the no-prepend attribute is specified, then the supplied local-as is not prepended to the received AS_PATH.
If the replace-as attribute is specified, then only the supplied local-as is prepended to the AS_PATH when transmitting local-route updates to this peer.
Note that replace-as can only be specified if no-prepend is.This command is only allowed for eBGP peers.
VyOS CLI:
set protocols bgp local-as 100 set protocols bgp neighbor 192.0.2.1 local-as 300 replace-as set protocols bgp peer-group foo local-as 303 replace-as
The no-prepend option is already supported.