peer next-hop-invariable (BGP-VPNv4 address family view) (IPv6)

Function

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:

  • A device sets its interface IP address as the Next_Hops of routes when advertising these routes to EBGP peers.
  • A device does not modify the Next_Hops of non-labeled routes if the routes are learned from EBGP peers and are to be advertised to IBGP peers; the device sets its interface IP address as the Next_Hops of labeled routes if the routes are learned from EBGP peers and are to be advertised to IBGP peers.
  • A device does not change the Next_Hops of routes if the routes are learned from an IBGP peer and are to be advertised to another IBGP peer.
  • A device sets its interface IP address as the Next_Hops of routes when advertising imported IGP routes to IBGP peers.
  • A device modifies the Next_Hop of imported static routes to the local interface's IP address when advertising the routes to IBGP peers.

Format

peer ipv6-address next-hop-invariable

undo peer ipv6-address next-hop-invariable

Parameters

Parameter Description Value
ipv6-address

Specifies the IPv6 address of a peer.

The prefix is in the format of X:X:X:X:X:X:X:X.

Views

BGP-VPNv4 address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

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.

Example

# Enable a device to keep the next hop of routes unchanged when advertising these routes to an EBGP peer.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 2001:DB8:1::1 as-number 200
[*HUAWEI-bgp] ipv4-family vpnv4
[*HUAWEI-bgp-af-vpnv4] peer 2001:DB8:1::1 enable
[*HUAWEI-bgp-af-vpnv4] peer 2001:DB8:1::1 next-hop-invariable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >