How does AS remove and prepend work?
7237
Created On 08/12/22 20:00 PM - Last Modified 05/08/25 22:26 PM
Question
How does AS remove and prepend work?
Environment
- Palo Alto Firewall
- Supported PAN-OS
- BGP
Answer
- In any BGP policy, both match and set action are exclusive (GUI: Network > Virtual Router > (name) > BGP > (import or export) > Add )
- For a BGP export policy "Match" is used to select the prefixes from the BGP local-rib table and then the "Action" is applied to it.
- For the Autonomous System (AS) "remove and prepend", removes the specified number of latest AS numbers added to the prefix and prepends the firewall's AS the same number of times. (GUI: Network > Virtual Router > (name) > BGP > Export > Add > Action
- When the configuration has "Aggregator AS" checked, the aggregator AS is always appended to the prefix.
Additional Information
Here are some additional articles in regards to the topic:
- Using Regex to prepend AS numbers to BGP AS_PATH attribute
- Using regex to remove AS numbers from BGP AS-PATH attribute