The peer next-hop-invariable command has the following functions:
- When the BGP speaker advertises routes to EBGP peers, the BGP speaker does not change the Next_Hop.
- When the BGP speaker advertises labeled routes to IBGP peers, the BGP speaker does not change the Next_Hop.
- When the BGP speaker advertises imported IGP routes to IBGP peers, the BGP speaker changes the Next_Hop to the Next_Hops of the IGP routes.
The undo peer next-hop-invariable command restores the default configuration.
By default:
Usage Scenario
In an inter-AS VPN Option C scenario where an VPNv4 Route Reflector (RR) is used, the peer next-hop-invariable command needs to be run on the RR to prevent the RR from modifying the Next_Hops of routes before advertising the routes to EBGP peers. This ensures that the remote PE recurses routes to the LSP destined for the local PE during traffic transmission.
Prerequisites
The peer as-number command has been used to create a peer.
Precautions
The peer next-hop-invariable command takes effect only for received routes. However, the configuration does not take effect for received IPv4 routes that do not carry labels.
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.<HUAWEI> system-view [~HUAWEI] bgp 100 [*HUAWEI-bgp] peer 1.1.1.1 as-number 100 [*HUAWEI-bgp] ipv4-family labeled-unicast [*HUAWEI-bgp-af-ipv4-labeled] peer 1.1.1.1 enable [*HUAWEI-bgp-af-ipv4-labeled] peer 1.1.1.1 next-hop-invariable