neighbor next-hop-self
Syntax
neighbor {<IP-ADDR>|<PEER-GROUP-NAME>} next-hop-self
no neighbor {<IP-ADDR>|<PEER-GROUP-NAME>} next-hop-self
Description
Configures the router as the next hop for a 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
config-bgp-ipv6-uc
Parameters
<IP-ADDR>
Specifies the neighbor's IP address in IPv4 format (
x.x.x.x
), wherex
is a decimal number from 0 to 255, or IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
), wherex
is a hexadecimal number from 0 to F.<PEER-GROUP-NAME>
Specifies a peer group.
all
Applies the configuration to all route-reflector clients.
Authority
Administrators or local user group members with execution rights for this command.
Usage
An administrator uses this command to make a BGP speaker fill its address when advertising routes to a 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-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