< Home

interface tunnel

Function

The interface tunnel command creates a tunnel interface.

The undo interface tunnel command deletes the configured tunnel interface.

By default, no tunnel interface is configured.

Format

interface tunnel interface-number

undo interface tunnel interface-number

Parameters

Parameter

Description

Value

interface-number

Specifies the number of the tunnel interface.

The value is an integer that ranges from 0 to

2047

.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To forward data over a tunnel, ensure that the tunnel has been created. The system supports the following types of tunnels:
  • LSP (Static LSP, BGP LSP, LDP LSP)

  • MPLS TE

  • GRE

  • IPv6 over IPv4

  • IPv4 over IPv6

You must use the interface tunnel command to create a tunnel interface when creating a tunnel except for LSP tunnels.

Precautions

Tunnel interface numbers are valid on the local device only. You can configure different numbers for the tunnel interfaces on the two ends.

Follow-up Procedure

After a tunnel interface is created, you need to configure an IP address and encapsulation type for the tunnel interface.

To save IP addresses, run the ip address unnumbered command to configure the tunnel interface to borrow an IP address of another interface.

The tunnel-protocol command configures an encapsulation protocol for the tunnel interface. Then basic configurations are performed based on the encapsulation protocol:
  • On an MPLS TE tunnel, run the destination, mpls te tunnel-id, mpls te signal-protocol, and mpls te commit commands.
  • On the GRE, IPv4 over IPv6 tunnel or manual IPv6 over IPv4 tunnel, run the source and destination commands.

Example

# Create a tunnel interface.

<HUAWEI> system-view
[HUAWEI] interface tunnel 1
[HUAWEI-Tunnel1]
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >