neighbor remote-as


neighbor {<IP-ADDRESS>|<PEER-GROUP-NAME>} remote-as <AS-NUMBER>

no neighbor {<IP-ADDRESS>|<PEER-GROUP-NAME>} remote-as <AS-NUMBER>


Creates a peer and initiates the connection to the peer and adds an entry to the BGP neighbor table. Specifies a neighbor with an autonomous system number that identifies the neighbor as internal to the local autonomous system. Otherwise, the neighbor is considered as external. By default, neighbors that are defined using this command, exchange only unicast address prefixes.

The no form of this command disables the peer session and deletes the peer information.

Command context




Specifies an IP address.


Specifies a peer group.

remote-as <AS-NUMBER>

Specifies a 4-byte AS number in the range 1-4294967295 in integer format or from 0.1-65535.65535 in dotted format.




  • The administrator can create a peer and set the Peer AS number with this command.

  • The configured Peer AS number is compared with the AS number received in the open message and a peer session is initiated only if both the AS numbers match.


switch(config-router)# neighbor remote-as 1
switch(config-router)# no neighbor remote-as 1
switch(config-router)# neighbor pg remote-as 1
switch(config-router)# no neighbor pg remote-as 1