neighbor next-hop-self
Syntax
neighbor { | } next-hop-self no neighbor { | } 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.
Theno
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
-
-
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. -
-
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.
这个命令是有用的在non-meshed网络在哪儿e 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-selfswitch(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-selfswitch(config-bgp-ipv6-uc)#no neighbor 2001:0db8:85a3::8a2e:0370:7334 next-hop-self
switch(config-bgp-ipv4-uc)#neighbor pg next-hop-selfswitch(config-bgp-ipv4-uc)#no neighbor pg next-hop-self