nhrp network-id

Function

The nhrp network-id command specifies the NHRP domain for a local mGRE interface.

The undo nhrp network-id command restores the default NHRP domain of the local mGRE interface.

By default, the local mGRE interface belongs to NHRP domain 0.

Format

nhrp network-id netId

undo nhrp network-id netId

undo nhrp network-id

Parameters

Parameter Description Value
netId

Specifies an NHRP domain. This domain takes effect only on the local device.

The value is an integer ranging from 1 to 4294967295.

Views

Tunnel interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
nhrp write

Usage Guidelines

Usage Scenario

The nhrp network-id command specifies NHRP domains for mGRE interfaces to isolate various mGRE interfaces into different NHRP domains. A VPN tunnel is set up between two devices to forward NHRP packets. The network IDs of the inbound and outbound mGRE interfaces determine whether to set up a tunnel.

Prerequisites

The following operations have been performed:

  • Run the interface tunnel command to create a tunnel interface and display the tunnel interface view.
  • Run the tunnel-protocol gre p2mp command to set the tunnel encapsulation mode to mGRE.

Configuration Impact

If the inbound and outbound interfaces for NHRP packets are both mGRE interfaces, compare the network IDs of the two interfaces. The configuration impact on different types of NHRP packets is as follows:

  • NHRP Registration Request packet and NHRP Registration Reply packet

    The NHRP module does not forward NHRP Registration packets. Therefore, it has no impact on the NHRP registration process.
  • NHRP Resolution Request packet

    If the inbound and outbound mGRE interfaces for the NHRP packets have different network IDs, the NHRP module discards the packet and sends an NHRP Resolution Reply packet to the source peer device.
  • NHRP Resolution Reply packet, Purge Request packet, Purge Reply packet and Redirect packet

    If the inbound and outbound mGRE interfaces for the NHRP packets have different network IDs, the NHRP module discards the packet.

Precautions

After network IDs are changed, the NHRP peer learned by the device is not affected and the existing IPSec tunnel will not be changed.

Example

# Set the network ID of an NHRP domain to 100.
<HUAWEI> system-view
[~HUAWEI] nhrp enable
[*HUAWEI] interface tunnel 0
[*HUAWEI-Tunnel0] tunnel-protocol gre p2mp
[*HUAWEI-Tunnel0] nhrp enable
[*HUAWEI-Tunnel0] nhrp network-id 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >