No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

AR500, AR510, and AR530 V200R007

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
IPv6 over IPv4 Tunnel Configuration Commands

IPv6 over IPv4 Tunnel Configuration Commands

NOTE:

Among the AR500 series routers, the AR502G-L-D-H, AR502GR-L-D-H do not support the IPv6 over IPv4 tunnel function.

The AR510 series routers do not support the IPv6 over IPv4 tunnel function.

destination

Function

The destination command specifies the destination IP address of a tunnel interface.

The undo destination command deletes the destination IP address of a tunnel interface.

By default, no destination address is configured.

Format

destination [ vpn-instance vpn-instance-name ] dest-ip-address

undo destination

Parameters

Parameter Description Value
vpn-instance vpn-instance-name Specifies the name of the VPN instance that the destination address of a tunnel belongs to. When the tunnel interface uses GRE or IPSec, you can specify vpn-instance vpn-instance-name. The value is the name of an existing VPN instance.
dest-ip-address Specifies the destination IP address of a tunnel interface. The value is in dotted decimal notation.

Views

Tunnel interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When configuring a GRE, IPv4 over IPv6, IPSec, manual IPv6 over IPv4 tunnel, create a tunnel interface. After a tunnel interface is created, run the destination command to specify the destination IP address for the tunnel interface.

When using the destination command on a PE to specify the destination address of a GRE tunnel bound for a CE, you need to set vpn-instance vpn-instance-name in the command to specify the name of the VPN instance to which the destination address belongs.

Prerequisites

A tunnel interface has been created using the interface tunnel command, and the encapsulation mode is set to GRE ,IPSec, IPv4 over IPv6, or IPv6 over IPv4 of manual mode using the tunnel-protocol command.

Precautions

Two or more GRE tunnel interfaces in a system can have the same source address and same destination address. The system uses GRE keys to identify these GRE tunnel interfaces. Normally, two tunnel interfaces in a system cannot have the same encapsulation mode, source address, and destination address.

Two tunnel interfaces with the same encapsulation mode, source address, and destination address cannot be configured simultaneously.

On the IPSec, IPv6 over IPv4, IPv4 over IPv6, or GRE tunnel, the destination address of the local tunnel interface is the source address of the remote tunnel interface by the source command, and the source address of the local tunnel interface is the destination address of the remote tunnel interface.

Example

# Set the destination address of the GRE tunnel Tunnel 0/0/1 to 10.1.1.1.

<Huawei> system-view
[Huawei] interface tunnel 0/0/1
[Huawei-Tunnel0/0/1] tunnel-protocol gre
[Huawei-Tunnel0/0/1] destination 10.1.1.1

# Set the destination address of the GRE tunnel Tunnel 0/0/0 to 10.1.1.1 that belongs to vpn1.

<Huawei> system-view
[Huawei] interface tunnel 0/0/0
[Huawei-Tunnel0/0/0] tunnel-protocol gre
[Huawei-Tunnel0/0/0] destination vpn-instance vpn1 10.1.1.1

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 in the format slot ID/subcard ID/port sequence number and varies according to the device type.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To forward data packet over tunnels (for example, VPN tunnels), ensure that the tunnel has been created. The system supports the following types of tunnels:
  • IPSec

  • 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

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.

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

Example

# Create a tunnel interface.

<Huawei> system-view
[Huawei] interface tunnel 0/0/1
[Huawei-Tunnel0/0/1]

source

Function

The source command configures the source address or source interface of the tunnel.

The undo source command deletes the configured source address or source interface.

The source address and source interface of a tunnel are not specified by default.

Format

source { [ vpn-instance vpn-instance-name ] source-ip-address | interface-type interface-number }

undo source

Parameters

Parameter

Description

Value

vpn-instance vpn-instance-name Specifies the name of the VPN instance that the source address of a tunnel belongs to.
NOTE:
You can specify the parameter only when the encapsulation mode of a tunnel interface is set to IPSec or mGRE.
The value is the name of an existing VPN instance.

source-ip-address

Specifies the source address of a tunnel interface. If a tunnel interface works in IPv4-IPv6 mode, specify an IPv6 address as the source address of the tunnel interface.

The IPv4 address is in dotted decimal notation.

The IPv6 address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X.

interface-type interface-number

Specifies the type and the number of the source interface of the tunnel.

-

Views

Tunnel interface view, Tunnel-Template interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When configuring a tunnel, you must create a tunnel interface. After a tunnel interface is created, run the source command to specify the source IP address for the tunnel interface.

Prerequisites

A tunnel interface has been created using the interface tunnel command, and the encapsulation mode is set to GRE, IPSec, IPv4 over IPv6, or IPv6 over IPv4 of manual mode using the tunnel-protocol command.

Precautions

Two tunnel interfaces with the same encapsulation mode, source address, and destination address cannot be configured simultaneously.

IPv6 over IPv4, IPv4 over IPv6, and GRE tunnels are bidirectional tunnels. The source address of the local tunnel interface is the destination address of the remote tunnel interface by the destination command, and the destination address of the local tunnel interface is the source address of the remote tunnel interface.

Two or more tunnel interfaces that use the same encapsulation protocol cannot be configured with the same source and destination addresses.Two or more GRE tunnel interfaces in a system can have the same source address and same destination address. The system uses GRE keys to identify these GRE tunnel interfaces.When two or more tunnel interfaces on a P2MP tunnel are configured with the same source address, run the gre key command to set the key number of each tunnel interface.

You can also specify VPN instance parameters while specifying the source address for an IPSec tunnel or an mGRE tunnel in IPSec/mGRE over VPN scenarios.

Example

# Set the tunnel type of Tunnel0/0/1 to IPv6 over IPv4 manual tunnel and configure the source IP address of Tunnel0/0/1 as 10.1.1.1.
<Huawei> system-view
[Huawei] interface tunnel 0/0/1
[Huawei-Tunnel0/0/1] tunnel-protocol ipv6-ipv4
[Huawei-Tunnel0/0/1] source 10.1.1.1
# Configure Tunnel0/0/2 of mGRE and use Loopback0 address as the interface address.
<Huawei> system-view
[Huawei] interface loopback 0
[Huawei-LoopBack0] ip address 10.2.1.1 32
[Huawei-LoopBack0] quit
[Huawei] interface tunnel 0/0/2
[Huawei-Tunnel0/0/2] tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/2] source loopback 0

tunnel-protocol

Function

The tunnel-protocol command configures the tunnel protocol on a tunnel interface.

The undo tunnel-protocol command restores the tunnel protocol to the default configuration.

By default, no tunnel protocol is used on a tunnel interface.

Format

tunnel-protocol { gre [ p2mp ] | ipsec | ipv6-ipv4 [ 6to4 | auto-tunnel | isatap ] | ipv4-ipv6 | svpn [ p2p | p2mp ] | none }

undo tunnel-protocol

Parameters

Parameter Description Value
gre

Indicates that the GRE tunnel protocol is configured on a tunnel interface.

-
gre p2mp

Indicates that the mGRE tunnel protocol is configured on a tunnel interface. If this parameter is not used, the tunnel protocol configured on a tunnel interface is a traditional point-to-point GRE.

-
ipsec

Indicates that the IPSec tunnel protocol is configured on a tunnel interface.

-
ipv4-ipv6

Indicates that the IPv4 to IPv6 tunnel protocol is configured on a tunnel interface.

-
ipv6-ipv4

Configures the tunnel protocol of the tunnel interface as ipv6-ipv4 and uses a manual IPv6 over IPv4 tunnel.

-
ipv6-ipv4 6to4

Indicates that the IPv6 to IPv4 tunnel protocol is configured on a tunnel interface using 6to4.

-
ipv6-ipv4 auto-tunnel

Configures the tunnel protocol of the tunnel interface as ipv6-ipv4 and uses an automatic IPv6 over IPv4 tunnel.

-
ipv6-ipv4 isatap

Indicates that the IPv6 to IPv4 tunnel protocol is configured on a tunnel interface using isatap.

-
svpn [ p2p | p2mp ]

Indicates that the SVPN tunnel protocol is configured on a tunnel interface.

  • p2p: indicates the P2P SVPN tunnel protocol.
  • p2mp: indicates the P2MP SVPN tunnel protocol.
-
none

Indicates that no tunnel protocol is configured on a tunnel interface.

-

Views

Tunnel interface view, Tunnel-Template interface view

NOTE:

The tunnel template interface view supports the ipsec and none parameters only.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After creating a tunnel interface using the interface tunnel command, run the tunnel-protocol command to configure the tunnel encapsulation mode for the tunnel interface.

The following tunnel encapsulation modes are available:
  • GRE: encapsulates packets of some network layer protocols such as IP or IPX to enable these encapsulated packets to be transmitted on networks running other protocols such as IP. When the p2mp parameter is specified following gre, you can set the tunnel encapsulation mode to P2MP GRE. The destination address of a P2MP GRE tunnel does not need to be manually configured. Instead, the destination address of this tunnel can either be defined by a protocol (for example, NHRP in a DSVPN scenario) or be dynamically learned.
  • IPSec: protects the security of data transmitted on the Internet by establishing tunnels using the IPSec protocol.
  • IPv4-IPv6: creates tunnels on the IPv6 networks to connect IPv4 isolated sites so that IPv4 isolated sites can access other IPv4 networks through the IPv6 public network.
  • IPv6-IPv4: creates tunnels on the IPv4 networks to connect IPv6 isolated sites so that IPv6 packets can be transmitted on IPv4 networks.
  • SVPN: binds multiple WAN access lines to provide high bandwidth and highly reliable networks for customers.

    • When the SVPN mode is set to Hub-Spoke, specify p2p on the Spoke and p2mp on the hub when configuring a tunnel protocol.
    • When the SVPN mode is set to Lone Ranger, you must not specify p2p or p2mp.

Precautions

  • The none mode indicates the initial configuration, that is, no tunnel encapsulation mode is configured. In practice, you must select another tunnel encapsulation mode.
  • You must configure the tunnel encapsulation mode before setting the source IP address or other parameters for a tunnel interface. Changing the encapsulation mode of a tunnel interface deletes other parameters of the tunnel interface. When an SVPN proposal is bound to a tunnel interface, you cannot modify the tunnel encapsulation mode.

Example

# Set the tunnel encapsulation mode of Tunnel0/0/2 to mGRE.
<Huawei> system-view
[Huawei] interface tunnel 0/0/2
[Huawei-Tunnel0/0/2] tunnel-protocol gre p2mp
# Set the tunnel encapsulation mode of Tunnel0/0/2 to GRE.
<Huawei> system-view
[Huawei] interface tunnel 0/0/2
[Huawei-Tunnel0/0/2] tunnel-protocol gre
Related Topics
Translation
Download
Updated: 2019-02-18

Document ID: EDOC1000097293

Views: 35986

Downloads: 101

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next