neighbor next-hop-self

Syntax

neighbor {<IP-ADDRESS>|<PEER-GROUP-NAME>} next-hop-self [all]

no neighbor {<IP-ADDRESS>|<PEER-GROUP-NAME>} next-hop-self [all]

Description

Configures the router as the next hop for BGP-speaking neighbor or peer group and enables BGP to send itself as the next hop for advertised routes.

The no form of this command resets the peer nexthop-self status to default. The next hop will be generated based on the IP.

Command context

config-router

Parameters

<IP-ADDRESS>

Specifies an IP address.

<PEER-GROUP-NAME>

Specifies a peer group.

all

Applies the configuration to all route-reflector clients.

Authority

Administrators

Usage

  • An Administrator uses this command to make BGP speaker fill its address when advertising routes to the BGP peer.

  • This command is useful in non-meshed networks where BGP neighbors may not have direct access to all other neighbors on the same IP subnet.

Examples

switch(config-router)# neighbor 1.1.1.1 next-hop-self
switch(config-router)# no neighbor 1.1.1.1 next-hop-self
switch(config-router)# neighbor pg next-hop-self
switch(config-router)# no neighbor pg next-hop-self