neighbor next-hop-self

Syntax

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

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

Description

This command 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-bgp-ipv4-uc

or

config-bgp-ipv6-uc

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 nonmeshed networks where BGP neighbors may not have direct access to all other neighbors on the same IP subnet.

Examples

switch(config-bgp-ipv4-uc)# neighbor 1.1.1.1 next-hop-self
switch(config-bgp-ipv4-uc)# no neighbor 1.1.1.1 next-hop-self
switch(config-bgp-ipv6-uc)# neighbor 2001:0db8:85a3::8a2e:0370:7334 next-hop-self
switch(config-bgp-ipv6-uc)# no neighbor 2001:0db8:85a3::8a2e:0370:7334 next-hop-self
switch(config-bgp-ipv4-uc)# neighbor pg next-hop-self
switch(config-bgp-ipv4-uc)# no neighbor pg next-hop-self