Information about BGP Replace ASNs
This document describes how using the BGP policy, any of the configured Autonomous System Numbers (ASNs) are replaced with its own ASN. You can replace one or many ASNs using the AS_PATH attribute.
Loop prevention in BGP is based on the verification of AS numbers in the AS Path. If the receiving router sees its own AS number in the AS Path of the received BGP packet, the packet is dropped. However, this may cause issue in an inter-AS Hub and Spoke, such as a central Firewall location which must advertise more specific prefixes back to the spokes so the inter-AS crossing can happen twice (back and forth). The existing set as-path command under route-map provides functionality to prepend to the as-path and set tag. This solution expands the set as-path command to allow replace a sequence of ASNs to own or local AS.