The set protocols bgp neighbor next-hop-self command 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 delete protocols bgp neighbor next-hop-self command resets the peer nexthop-self status to default. The next hop will be generated based on the IP.
Command Syntax
set protocols bgp [vrf <vrf-name>] [ipv4 unicast|ipv4 labeled-unicast|ipv6 unicast|ipv6 labeled-unicast] neighbor <bgppeer> next-hop-self [force]
delete protocols bgp [vrf <vrf-name>] [ipv4 unicast|ipv4 labeled-unicast|ipv6 unicast|ipv6 labeled-unicast] neighbor <bgppeer> next-hop-self [force]
Parameter
Parameter | Description |
vrf <vrf-name> | Optional. Specifies a VRF name. The value is a string. It’s a user-defined VRF set by the command set ip vrf <vrf-name> [description <string>]. |
neighbor <bgppeer> | Specifies the IP address of a peer or a Peer-Group. |
Example
• This example 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.
admin@XorPlus# set protocols bgp neighbor 2.2.2.2 next-hop-self admin@XorPlus# commit