Advertising Prefixes with Duplicate AS Numbers
When a BGP speaker receives a route that has the speaker’s AS number in its AS
path, the speaker declares that route to be a loop and discards it. However, in some
circumstances, as in the implementation of a hub-and-spoke VPN topology, this is
not the desired behavior. You want the BGP speaker (hub) to accept such routes. You
can use the neighbor allowas-in command to specify the number of times that a
route’s AS path can contain the BGP speaker’s AS number.
The behavior is different within the VPNv4 address family than it is in other address
families. For other address families, you must configure the feature on all the peers.
In contrast, IBGP peers within the VPNv4 address family always accept routes
containing their own AS number by default. Issuing this command in the VRF for
such a peer has no effect on the behavior of IBGP peers in this address family. This
behavior reduces the provisioning overhead for VPNv4 IBGP peers.
However, you must configure the feature on the peer router at the hub. Consider the
hub-and-spoke topology shown in Figure 98 on page 451. PE 1, PE 2, and PE 3 are
peers in the VPNv4 address family. Routes received from CE 1 may contain the AS
number (777) local to the PE routers. You must issue the neighbor allowas-in
command for VRF A on PE 1.
Figure 98: Allowing Local AS in VPNv4 Address Family
neighbor allowas-in â– Use to enable the acceptance of all routes whose AS path contains the BGP
speaker’s AS number up to the specified number of times.
■If the AS path of a route contains the speaker’s AS number more than the
specified number of times, the route is determined to be a loop and is discarded.
â– New policy values are applied to all routes that are sent (outbound policy) or
received (inbound policy) after you issue the command.
Configuring BGP VPN Services â– 451
Chapter 5: Configuring BGP-MPLS Applications