[Contents]
[Prev]
[Next]
[Index]
[Report an Error]
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. 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.
- To apply the new policy to routes that are already present
in the BGP routing table, you must use the clear ip bgp command to perform a soft clear or hard clear of the current BGP
session.
- Behavior is different for outbound policies configured
for peer groups for which you have enabled Adj-RIBs-Out. If you change
the outbound policy for such a peer group and want to fill the Adj-RIBs-Out
table for that peer group with the results of the new policy, you
must use the clear ip bgp peer-group command
to perform a hard clear or outbound soft clear of the peer group.
You cannot merely perform a hard clear or outbound soft clear for
individual peer group members because that causes BGP to resend only
the contents of the Adj-RIBs-Out table.
- Example
- host1(config-router)#neighbor allowas-in
- Use the no version to prevent
the acceptance of these routes, resulting in the BGP speaker’s
discarding the routes.
- See neighbor allowas-in.
[Contents]
[Prev]
[Next]
[Index]
[Report an Error]