neighbor alternate-as

Adds a range of alternate autonomous system numbers (ASNs) for BGP dynamic neighbors.

Syntax

neighbor peer-group-name alternate-as { add | remove } as-range
no neighbor peer-group-name alternate-as add

Command Default

Disabled.

Parameters

add
Adds an AS to the alternate AS range.
remove
Removes an AS from the alternate AS range.
as-range
Specifies an alternate AS value. Enter an integer from 1 through 4294967295.

Modes

BGP configuration mode

Usage Guidelines

This command is supported only on devices based on the DNX chipset family. For a list of such devices, see "Supported Hardware".

This command supports only IPv4 BGP.

The no form of the command removes configured alternate AS values.

For dynamic neighbors, the remote AS in the peer-group configuration allows the configuration of an alternate AS range, a range under which the EBGP peer can fall under for the listen range that includes the peer group.

When the device receives an OPEN message from a peer, it checks whether this AS number falls under the range configured for the peer group. Then it accepts and makes the session IBGP or BGP peer.

Examples

The following example sets an alternate AS of 100 for listen range neighbors in a peer group called “mypeergroup”.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# neighbor mypeergroup remote-as 400
device(config-bgp-router)# neighbor mypeergroup alternate-as add 100

The following example sets an alternate AS range of 200 through 300 for listen range neighbors in a peer group called “mypeergroup”.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# neighbor mypeergroup remote-as 400
device(config-bgp-router)# neighbor mypeergroup alternate-as add 200-300

The following example removes the configured alternate AS number 100 for listen range neighbors in a peer group called “mypeergroup”.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# neighbor mypeergroup alternate-as remove 100