AS Override vs. Allowas-in: Controlling BGP Routing
Large enterprises with multiple site offices connected via MPLS service providers often face challenges in managing BGP routing. When using the same AS Number for all sites, BGP's default behavior leads to dropped routes due to the AS Number match in the received packets. This article explores two methods, "AS-Override" and "Allowas-in," to address and mitigate this issue.
Understanding the Default Behavior:
In a typical scenario, Router "CE-A" at Site A advertises network 1.1.1.1/32, and the service provider receives the route with AS path "200 I." Router "PE2" then advertises the same route to Site-B's Router "CE-B." However, Router "CE-B" recognizes its own AS Number, "200," in the received AS path and adheres to BGP's standard behavior, resulting in route dropping.
The Role of AS-Override and Allowas-in:
To circumvent or mitigate this default BGP behavior, enterprises can utilize two approaches: "AS-Override" and "Allowas-in."
1. AS-Override:
"AS-Override" is implemented at the service provider's end. It allows the provider's PE (Provider Edge) router to modify the AS Number in the AS Path before advertising the route. As a result, the receiving CE (Customer Edge) router, such as "CE-B," will not encounter its own AS Number in the path and will accept the route.
2. Allowas-in:
"Allowas-in" is configured at the CE device on the customer's site. This method introduces an exception in BGP's AS path loop prevention mechanism. By enabling "Allowas-in," the CE device can accept routes that contain its own AS Number in the AS Path, effectively preventing route drops.
Differences between AS-Override and Allowas-in:
One crucial distinction between the two approaches lies in their implementation locations:
a. AS-Override:
- Configuration: Provisioned at the service provider's end.
- Function: Modifies the AS Number in the AS Path before route advertisement to prevent route drops.
- Advantage: Allows the customer to maintain minimal configuration at their CE side while letting the provider handle BGP routing control.
b. Allowas-in:
- Configuration: Set up at the CE device on the customer's site.
- Function: Permits the CE device to accept routes containing its own AS Number, bypassing the default AS path loop prevention mechanism.
- Advantage: Gives the customer more control over the BGP routing process within their network.
Conclusion:
For large enterprises facing BGP route dropping issues due to using the same AS Number across multiple sites, "AS-Override" and "Allowas-in" are valuable tools to address this problem. The choice between the two depends on whether the enterprise prefers the service provider or the customer to handle BGP routing control. Both approaches offer effective solutions to optimize BGP routing in complex network environments.