neighbor local-as

Causes the device to prepend the local autonomous system number (ASN) automatically to routes received from an eBGP peer.
Syntax
neighbor { ip-address | ipv6-address | peer-group-name } local-as num [ no-prepend ]
no neighbor { ip-address | ipv6-address | peer-group-name } local-as num [ no-prepend ]
Parameters
ip-address
Specifies the IPv4 address of the neighbor.
ipv6-address
Specifies the IPv6 address of the neighbor.
peer-group-name
Specifies the peer group name configured by the neighbor peer-group-name command.
num
Specifies the local ASN. Range is from 1 through 4294967295.
no-prepend
Causes the device to stop prepending the selected ASN.
Modes

BGP configuration mode

Usage Guidelines

The no form of the command removes the local ASN.

Examples

The following example ensures that a device prepends the local ASN.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# neighbor 10.11.12.13 local-as 100

The following example stops the device from prepending the selected ASN.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# neighbor 10.11.12.13 local-as 100 no-prepend