The undo peer next-hop-invariable command restores the default configuration.
By default:
peer { ipv4-address | group-name } next-hop-invariable
undo peer { ipv4-address | group-name } next-hop-invariable
| Parameter | Description | Value |
|---|---|---|
ipv4-address |
Specifies the IPv4 address of a peer. |
It is in dotted decimal notation. |
group-name |
Specifies the name of the peer group. |
The name is a string of 1 to 47 characters without any space. It is case-sensitive. |
Usage Scenario
In the inter-AS VPN option C networking where an RR is used, the peer next-hop-invariable command needs to be run to configure the RR not to change the next-hop address of a route when advertising the route to a peer. This ensures that the remote PE iterates a route to the label switched path (LSP) destined for the local PE during traffic transmission.
Prerequisites
The peer as-number command has been used to create a peer or peer group.
Configuration Impact
After the peer next-hop-invariable command is used on a device, the device does not change the next hop of an imported IGP route when advertising it to its IBGP peers, and does not change the next hop of a route when advertising it to its EBGP peers.
Precautions
The peer next-hop-invariable command configured on EBGP peers takes effect only for VPNv4 and VPNv6 routes.
If a device needs to advertise routes to its IBGP peer or peer group, the peer next-hop-invariable and peer next-hop-local commands are mutually exclusive on the device.
<sysname> system-view
[sysname] bgp 100
[sysname-bgp] peer 1.1.1.2 as-number 200
[sysname-bgp] ipv4-family vpnv4
[sysname-bgp-af-vpnv4] peer 1.1.1.2 enable
[sysname-bgp-af-vpnv4] peer 1.1.1.2 next-hop-invariable
# Use the next hop of an IGP route when advertising the IGP route to IBGP peers.
<sysname> system-view
[sysname] bgp 100
[sysname-bgp] peer 1.1.1.2 as-number 100
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] peer 1.1.1.2 next-hop-invariable