neighbor port


neighbor {<IP-ADDR>|<PEER-GROUP-NAME>} port <NUMBER>

no neighbor {<IP-ADDR>|<PEER-GROUP-NAME>} port


Sets a custom TCP port on which to communicate with the BGP neighbor.

When this configuration is applied for peer-group, all the neighbors that are part of peer-group will inherit this setting. Though the neighbor inherits the configuration from the peer-group, the neighbor-specific command, if configured, takes precedence.

This setting only takes effect after a hard reset of the session.

The no form of this command allows a random TCP port to be selected for the communication with the BGP neighbor.

Command context




Specifies an IP address.


Specifies a peer group.

port <NUMBER>

Specifies a TCP port number. Range: 0 to 65535.


Administrators or local user group members with execution rights for this command.


switch(config-bgp)# neighbor port 1500
switch(config-bgp)# no neighbor port
switch(config-bgp)# neighbor PG port 1500
switch(config-bgp)# no neighbor PG port