Hi there, all!
This post explains the procedure for BGP AS number override. Please read the below-displayed information.
BACKGROUND
If the AS_Path attribute of a route to be advertised to a peer contains the number of the AS where the peer resides, the local router substitutes the AS number of the peer with the local AS number before advertising the route. On a BGP network, two devices have the same AS number and the same EBGP peer. After one of the two devices learns a route of the other device from the EBGP peer, the route is discarded because it carries an AS number that is the same as the local one. To address this problem, run the peer substitute-as command on the EBGP peer.
In case of a customer has several sites, it belong to the same agency, it all of them using the same AS number. If there not substitute the AS number, the CE will drop the packet which have its own AS number.
Below is an example of a customer with two sites with the same AS number (AS65101):
PROCEDURE
The configuration template is as per below:
# bgp 65001 ipv4-family { vpn-instance vpn-instance-name | unicast } peer { ipv4-address | group-name } substitute-as # |
Note:
1. This command is only configured on the PE side.
2. You can send the BGP Community from the CE to PE to prevent the route back to the same site.