The peer next-hop-invariable command enables a BGP EVPN speaker to keep the next hops of routes unchanged when the speaker advertises these routes to EBGP EVPN peers and to apply the original next hops of locally imported routes when the speaker advertises these routes to IBGP EVPN peers.
The undo peer next-hop-invariable command restores the default configuration.
By default, the function of keeping the next hops of routes unchanged is not enabled.
Usage Scenario
By default:
A BGP EVPN speaker changes the next hops of routes to the interface that it uses to establish EBGP EVPN peer relationships before advertising these routes to EBGP EVPN peers. A BGP EVPN speaker changes the next hops of routes imported from EBGP EVPN to the interface that it uses to establish IBGP EVPN peer relationships before advertising these routes to IBGP EVPN peers. An RR does not change the next hops of routes imported from IBGP EVPN when advertising these routes to IBGP EVPN peers. A BGP EVPN speaker changes the next hops of routes to the interface that it uses to establish IBGP EVPN peer relationships before advertising these routes to IBGP EVPN peers.In an inter-AS scenario where an EVPN 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.
In a VXLAN scenario, when an EBGP EVPN peer relationship is established between VTEPs, to ensure that EVPN routes can be correctly sent, run the peer next-hop-invariable command on the VTEPs.Prerequisites
The specified peer has been enabled in the BGP-EVPN address family view.
Precautions
If a device needs to advertise routes to its IBGP peer, 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 2001:db8:1::1 as-number 200 [*HUAWEI-bgp] l2vpn-family evpn [*HUAWEI-bgp-af-evpn] peer 2001:db8:1::1 enable [*HUAWEI-bgp-af-evpn] peer 2001:db8:1::1 next-hop-invariable