configure bgp neighbor dont-allowas-in

configure bgp neighbor [all | remoteaddr] {address-family [ipv4-unicast | ipv4-multicast |ipv6-unicast | ipv6-multicast |vpnv4]} dont-allowas-in


Disables EBGP from receiving and accepting a looped EBGP route from the specified neighbor, provided the number of occurrences of local AS number in AS-Path is less than or equal to the value of as-count.

Syntax Description

all Specifies that the configuration change applies to all neighbors in the specified address family. If no address family is specified or if an IPv4 address is specified, the configuration change applies to all IPv4 neighbors. If an IPv6 address family is specified, the configuration change applies to all IPv6 neighbors.
remoteaddr Specifies the IPv4 or IPv6 address of a BGP neighbor. The switch uses the IP address format to determine if the address is an IPv4 or IPv6 address.
ipv4-unicast Specifies the IPv4 unicast address family.
ipv4-multicast Specifies an IPv4 multicast address family.
ipv6-unicast Specifies the IPv6 unicast address family.
ipv6-multicast Specifies an IPv6 multicast address family.
vpnv4 Specifies the VPNv4 address family for Layer 3 VPN support.


This feature is disabled by default.

If no as-count is specified, the as-count defaults to 3.

If no address family is specified and an IPv4 address is detected, IPv4 unicast is the default address family.

Usage Guidelines

In a hub and spoke configuration, it becomes necessary to accept an inbound EBGP route even though the route's AS-Path contains the receiver's own AS-number. In such network topologies, this feature can be enabled.



A looped AS path is always allowed for IBGP, irrespective of the BGP configuration.

All EBGP routes with looped AS-Path are silently discarded by default.

This command applies to the current VR or VRF context.

If you do not specify an address family, this command applies to the IPv4 unicast address family. To apply this command to an address family other than the IPv4 unicast address family, you must specify the address family.



For an IPv6 peer, an IPv6 address family must be specified, because an IPv6 peer does not support IPv4 address families. If no address family is specified for an IPv6 peer, the default, the IPv4 unicast address family, applies and the command fails. Similarly an IPv4 peer only supports IPv4 address families and the command fails if an IPv6 address family is specified.

To configure this feature on Layer 3 VPNs, you must configure this feature in the context of the MPLS-enabled VR; this feature is not supported for BGP neighbors on the CE (VRF) side of the PE router.


This command was first available in ExtremeXOS 12.1.

Support for IPv6 was added in ExtremeXOS 12.6 BGP.

Support for Layer 3 VPNs was added in ExtremeXOS 15.3.

Platform Availability

This command is available on platforms that support the appropriate license. For complete information about software licensing, including how to obtain and upgrade your license and which licenses support the BGP feature, see the ExtremeXOS and Switch Engine 31.7 Feature License Requirements document.