Troubleshooting guide

Example Configurations
61200860L1-29.4E Copyright © 2012 ADTRAN, Inc. 37
Example 2: Exchanging Routes between Peers with the Same AS Number
Some MPLS providers assign the same AS to every remote location in a customers network. This type of
assignment is problematic because eBGP has a built-in loop avoidance mechanism that prevents the
protocol from adding any routes that include its own configured AS from the router bgp command in the
AS path list. The issue can be avoided by using the local-as command from BGP Neighbor Configuration
mode in AOS. This command alters the AS path attribute to replace the AS number specified in the router
bgp command with the AS number specified in the local-as command. In this case, the specified AS
number is the one the MPLS provider has assigned to multiple remote locations (65001). As a result, each
remote site can have a true AS configured globally using the router bgp command, but will transmit
routing advertisements to the MPLS provider that appear to be sourced from the AS number specified in
the local-as command. In other words, the local-as command replaces the true AS number (the number
configured globally with the router bgp command), making it appear that the path to the network is
through the local AS. Configuring a router in this manner allows routing updates from the far-end
customer site to overcome the AS path check because the true AS configured on the router will not match
any of the AS numbers listed in the AS path of the routing update.
The following example illustrates the use of the local-as command such that routing updates can be
exchanged between peers that have been assigned the same AS number by the MPLS provider. The
provider has allocated AS 65001 to both customer sites (see
Figure 4 on page 38). Routes from the
customer must be sent from AS 65001 to be able to peer with the provider routers. However, the remote
locations will not be able to exchange routing information with each other if they are both configured in
AS 65001 using the global router bgp command. Therefore, instead of using the provider assigned AS of
65001, an arbitrary AS is chosen. The router at Site A is configured with an AS of 65002, and the router at
Site B is configured with an AS of 65003 using the router bgp command. The AS from which the provider
expects to see routing advertisements (65001) is configured into the routers at both Site A and Site B using
the local-as command in BGP Neighbor Configuration mode. This command alters BGP routing
advertisements sent from each router to be sourced from AS 65001, which satisfies the providers
requirements.
In addition to altering the AS path of transmitted BGP routing advertisements to a given neighbor, the
messages received from a neighbor are altered as well. The AS configured with the local-as command is
inserted as the more recent path for prefixes that it learns from that neighbor in addition to routing
advertisements to that neighbor. This extra prepended AS on incoming routing advertisements is
considered to be iBGP, which prevents the loop avoidance check from failing even though the same AS
might be seen twice in a show ip bgp command.
For illustrative purposes, it is beneficial to investigate what the AS path will look like in the advertisements
for this example. Both sites will essentially see the same AS path on incoming routes: local-as command
of local router, service provider AS, local-as command of remote router. BGP routing advertisements sent
to Site A from Site B contain an AS path of 65001, 65000, 65001. This path will not cause an AS path loop
because Site A is configured with an AS of 65002, which does not exist in the AS path of the received
message. Similarly, advertisements sent to Site B from Site A will contain an AS path of 65001, 65000,
65001. This will not cause an AS path loop as Site B is configured with an AS of 65003. In each case, an
extra 65001 is prepended to incoming routes, but is not factored in the loop avoidance check.