peer next-hop-invariable (BGP-IPv6 unicast 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 peer next-hop-invariable include-static-route command configures a BGP speaker to retain the original Next_Hop of imported static routes when advertising the routes to an IBGP peer.

The peer next-hop-invariable include-unicast-route command configures the BGP speaker to retain the original Next_Hop when advertising to an EBGP peer the unicast routes learned from another peer.

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 peerIpv6Addr next-hop-invariable [ include-static-route | include-unicast-route ] *

undo peer peerIpv6Addr next-hop-invariable

Parameters

Parameter Description Value
peerIpv6Addr

Specifies an IPv6 peer address.

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

include-static-route

Configures the BGP speaker to retain the original Next_Hop of static routes when advertising the routes to the peer.

-

include-unicast-route

Configures the device to retain the original next hop of the unicast routes learned from peers when advertising the routes.

-

Views

BGP-IPv6 unicast 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 a VPNv4 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 peers. This ensures that the remote PE recurses routes to the LSP destined for the local PE during traffic transmission.

If the peer next-hop-invariable include-static-route command is run, the BGP speaker retains the original next hop address of an imported public network static route when advertising the route to an IBGP peer under the condition that the original next hop address is valid; if the original next hop address of the static route is invalid, the public network static route recurses to a VPN route, or the public network static route is imported from a VPN instance, the BGP speaker uses its interface address as the next hop of the route.

After the peer next-hop-invariable include-unicast-route command is run, the BGP speaker retains the original Next_Hop when advertising to an EBGP peer the unicast routes learned from another peer.

Prerequisites

The peer as-number command has been used to create a peer.

Precautions

The peer next-hop-invariable command is valid only for received routes. In the IPv4 unicast address family view, this command is valid only for the received labeled IPv4 unicast routes, and is invalid for the routes that do not carry labels.

After the peer next-hop-invariable include-static-route command is run, you can run the undo peer next-hop-invariable command to restore the default configuration or run the peer next-hop-invariable [ include-unicast-route ] command to override the previous configuration.

After the peer next-hop-invariable include-unicast-route command is run, you can run the undo peer next-hop-invariable command to restore the default configuration or run the peer next-hop-invariable [ include-static-route ] command to override the previous configuration.

When routes are advertised to IBGP peers, the peer next-hop-invariable and peer next-hop-local commands are mutually exclusive.

Example

# Configure the BGP speaker to retain the original Next_Hop of routes when advertising the routes to an IBGP peer.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 2001:DB8:1::1 as-number 100
[*HUAWEI-bgp] ipv6-family unicast
[~HUAWEI-bgp-af-ipv6] peer 2001:DB8:1::1 enable
[*HUAWEI-bgp-af-ipv6] peer 2001:DB8:1::1 next-hop-invariable
# Configure the BGP speaker to retain the original Next_Hop of imported static routes when advertising the routes to an IBGP peer.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 10:1::12:2 as-number 100
[*HUAWEI-bgp] ipv6-family unicast
[*HUAWEI-bgp-af-ipv6] peer 10:1::12:2 enable
[*HUAWEI-bgp-af-ipv6] peer 10:1::12:2 next-hop-invariable include-static-route
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >