peer next-hop-invariable
Use peer next-hop-invariable to configure the device to not change the next hop of routes advertised to peers.
Use undo peer next-hop-invariable to configure the device to use its address as the next hop of routes advertised to peers.
Syntax
peer { group-name | ip-address [ mask-length ] } next-hop-invariable
undo peer { group-name | ip-address [ mask-length ] } next-hop-invariable
Default
The device uses its address as the next hop of routes advertised to peers.
Views
BGP VPNv4 address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters.
ip-address: Specifies a peer by its IP address.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ip-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, the device does not change the next hop of routes advertised to the dynamic peers in the subnet.
Usage guidelines
On an RR in an inter-AS option C scenario, you must configure next-hop-invariable to not change the next hop of VPNv4 routes advertised to BGP peers and RR clients.
This command is exclusive with the peer next-hop-local command.
Examples
# Configure the device to not change the next hop of routes advertised to peer 1.1.1.1.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp-default] address-family vpnv4 [Sysname-bgp-default-af-vpnv4] peer 1.1.1.1 next-hop-invariable
Related commands
peer next-hop-local (Layer 3—IP Routing Command Reference)