05-Layer 3 - IP Services Command Reference

HomeSupportSwitchesH3C S12500 Switch SeriesReference GuidesCommand ReferencesH3C S12500 Command Reference-Release7128-6W71005-Layer 3 - IP Services Command Reference
13-Tunnel commands
Title Size Download
13-Tunnel commands 108.15 KB

default

Use default to restore the default settings for the tunnel interface.

Syntax

default

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

The default command might interrupt ongoing network services. Make sure you are fully aware of the impacts of this command when you use it in a live network.

This command might fail to restore the default settings for some commands for reasons such as command dependencies and system restrictions. Use the display this command in interface view to identify these commands, and then use their undo forms or follow the command reference to individually restore their default settings. If your restoration attempt still fails, follow the error message instructions to resolve the problem.

Examples

# Restore the default settings of interface tunnel 1.

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] default

description

Use description to configure a description for a tunnel interface.

Use undo description to restore the default.

Syntax

description text

undo description

Default

The description of a tunnel interface is Tunnelnumber Interface, for example, Tunnel1 Interface.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

text: Specifies a description for the interface, a string of 1 to 80 case-sensitive characters.

Usage guidelines

Configure descriptions for different interfaces for identification and management purposes.

This command configures an interface description and has no any other function. You can use the display interface command to view the configured interface description.

Examples

# Configure the description for the interface Tunnel 1 as tunnel1.

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] description tunnel1

Related commands

display interface tunnel

destination

Use destination to specify the destination address for a tunnel interface.

Use undo destination to remove the configured tunnel destination address.

Syntax

destination ip-address

undo destination

Default

No tunnel destination address is configured.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

ip-address: Tunnel destination IPv4 address.

Usage guidelines

For a manual tunnel interface, you must configure the destination address. For an automatic tunnel interface, you do not need to configure the destination address.

The tunnel destination address must be the address of the receiving interface on the tunnel peer. It is used as the destination address of tunneled packets.

The destination address of the local tunnel interface must be the source address of the peer tunnel interface, and vice versa.

Examples

# VLAN-interface 100 of Sysname 1 uses the IP address 193.101.1.1 and VLAN-interface 100 of Sysname 2 uses the IP address 192.100.1.1. Configure the source address 193.101.1.1 and destination address 192.100.1.1 for the tunnel interface of Sysname 1.

<Sysname1> system-view

[Sysname1] interface tunnel 1 mode ipv6-ipv4

[Sysname1-Tunnel1] source 193.101.1.1

[Sysname1-Tunnel1] destination 192.100.1.1

# Configure the source address 192.100.1.1 and destination address 193.101.1.1 for the tunnel interface of Sysname 2.

<Sysname2> system-view

[Sysname2] interface tunnel 1 mode ipv6-ipv4

[Sysname2-Tunnel1] source 192.100.1.1

[Sysname2-Tunnel1] destination 193.101.1.1

Related commands

·           display interface tunnel

·           interface tunnel

·           source

display interface tunnel

Use display interface tunnel to display information about tunnel interfaces, including the source address, destination address, and tunnel mode.

Syntax

display interface [ tunnel [ number ] ] [ brief [ description ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

number: Number of a tunnel interface.

brief: Displays brief interface information. If you do not specify this keyword, the command displays detailed interface information.

description: Displays the entire user configured interface description. Without this keyword, the command can display the first 27 characters if the description string contains more than 27 characters.

Usage guidelines

If you do not specify the tunnel keyword, this command displays information about all interfaces on the device.

If you specify the tunnel keyword without the number argument, this command displays information about all existing tunnel interfaces.

Examples

# Display detailed information about interface Tunnel 1.

<Sysname> display interface tunnel 1

Tunnel1 current state: UP

Line protocol current state: UP

Description: Tunnel1 Interface

The Maximum Transmit Unit is 1456

Internet Address is 10.1.2.1/24 Primary

Tunnel source 2002::1:1, destination 2001::2:1

Tunnel bandwidth 64 (kbps)

Tunnel keepalive enabled, Period(50 s), Retries(3)

Tunnel TOS 0xC8, Tunnel TTL 255

Tunnel protocol/transport GRE/IPv6

    GRE key value is 1

    Checksumming of GRE packets disabled

Last clearing of counters:  Never

    Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

    Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

    0 packets input, 0 bytes, 0 drops

    0 packets output, 0 bytes, 0 drops

Table 1 Command output

Field

Description

Tunnel1 current state

Physical state of the tunnel interface:

·       Administratively DOWN—The interface has been shut down by the shutdown command.

·       DOWN—The interface is administratively up but its physical state is down.

·       UP—Both the administrative and physical states of the interface are up.

Line protocol current state

Link layer state of the tunnel interface:

·       DOWN—The protocol state of the interface is down.

·       UP—The protocol state of the interface is up.

Description

Description of the tunnel interface.

Maximum Transmit Unit

MTU of the tunnel interface.

Internet Address

IP address of the tunnel interface.

If no IP address is assigned to the interface, this field displays Internet protocol processing : disabled, and the tunnel interface cannot process packets.

Primary indicates it is the primary IP address of the interface.

Tunnel source

Source address of the tunnel.

destination

Destination address of the tunnel.

Tunnel bandwidth

Bandwidth of the tunnel interface.

Tunnel keepalive enabled, Period(50 s), Retries(3)

Keepalive is enabled to detect the state of the tunnel interface. In this example, keepalive packets are sent every 50 seconds, and the maximum sending times are three.

Tunnel TOS

ToS of tunneled packets.

Tunnel TTL

TTL of tunneled packets.

Tunnel protocol/transport

Tunnel mode and transport protocol:

·       GRE/IPGRE over IPv4 tunnel mode.

·       IPv6/IPIPv6 over IPv4 manual tunnel mode.

·       IPv6/IP 6to4—IPv6 over IPv4 6to4 tunnel mode.

·       IPv6/IP auto-tunnelAutomatic IPv6 over IPv4 tunnel mode.

·       IPv6/IP ISATAPIPv6 over IPv4 ISATAP tunnel mode.

GRE key value is 1

The GRE tunnel interface key is 1.

Checksumming of GRE packets disabled

The GRE packet checksum function is disabled.

Last clearing of counters

Last time of clearing counters.

Last 300 seconds input:  0 bytes/sec, 0 packets/sec

Average input rate in the last 300 seconds.

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Average output rate in the last 300 seconds.

 

# Display brief information about the interface Tunnel 1.

<Sysname> display interface tunnel 1 brief

The brief information of interface(s) under route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Main IP         Description

Tun1                 UP   UP       1.1.1.1          aaaaaaaaaaaaaaaaaaaaaaaaaaa

# Display brief information about interface Tunnel 1, including the entire interface description.

<Sysname> display interface tunnel 1 brief description

The brief information of interface(s) under route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Main IP         Description

Tun1                  UP    UP       1.1.1.1          aaaaaaaaaaaaaaaaaaaaaaaaaaaaa

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Table 2 Command output

Field

Description

The brief information of interface(s) under route mode

Brief information about Layer 3 interfaces.

Link: ADM - administratively down; Stby - standby

Link status:

·       ADMThe interface has been administratively shut down. To recover its physical state, use the undo shutdown command.

·       StbyThe interface is a backup interface. To see the primary interface, use the display standby state command.

Protocol: (s) - spoofing

(s) indicates that the network layer protocol state is UP, but the link is not available because it is an on-demand link or not present at all.

Interface

Abbreviated interface name.

Link

Physical link state of the interface:

·       UP—The link is physically up.

·       DOWN—The link is physically down.

·       ADM—The link has been administratively shut down. To bring it up, use the undo shutdown command.

·       Stby—The interface is a backup interface.

Protocol

Protocol state:

·       DOWNThe protocol is disabled.

·       UPThe protocol is enabled.

Main IP

Primary IP address of the interface.

Description

Description of the interface.

 

Related commands

·           destination

·           interface tunnel

·           source

interface tunnel

Use interface tunnel to create a tunnel interface, specify the tunnel mode, and enter tunnel interface view.

Use undo interface tunnel to delete a specific tunnel interface.

Syntax

interface tunnel number [ mode { evi [ ipv6 ] | gre | ipv6-ipv4 [ 6to4 | auto-tunnel | isatap ] } ]

undo interface tunnel number

Default

No tunnel interface is created on the device.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

number: Number of the tunnel interface, in the range of 0 to 1023.

mode evi: Specifies IPv4 EVI tunnel mode.

mode evi ipv6: Specifies IPv6 EVI tunnel mode. The device does not support this mode.

mode gre: Specifies GRE over IPv4 tunnel mode.

mode ipv6-ipv4: Specifies IPv6 over IPv4 manual tunnel mode.

mode ipv6-ipv4 6to4: Specifies 6to4 tunnel mode.

mode ipv6-ipv4 auto-tunnel: Specifies IPv4-compatible IPv6 automatic tunnel mode.

mode ipv6-ipv4 isatap: Specified ISATAP tunnel mode.

Usage guidelines

To create a new tunnel interface, you must specify the tunnel mode in this command. To enter the view of an existing tunnel interface, you do not need to specify the tunnel mode.

A tunnel interface number is locally significant. The tunnel interfaces on the two ends of a tunnel can use the same or different interface numbers.

Examples

# Create a GRE over IPv4 tunnel interface Tunnel 1 and enter tunnel interface view.

<Sysname> system-view

[Sysname] interface tunnel 1 mode gre

[Sysname-Tunnel1]

Related commands

·           destination

·           display interface tunnel

·           source

mtu

Use mtu to set the MTU for IPv4 packets on a tunnel interface.

Use undo mtu to restore the default.

Syntax

mtu mtu-size

undo mtu

Default

The MTU for IPv4 packets is 1476 bytes.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

mtu-size: MTU for IPv4 packets, in the range of 100 to 64000 bytes.

Examples

# Set the MTU for IPv4 packets on the interface Tunnel 1 to 10000 bytes.

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] mtu 10000

reset counters interface

Use reset counters interface to clear the statistics of tunnel interfaces.

Syntax

reset counters interface [ tunnel [ number ] ]

Views

User view

Predefined user roles

network-admin

mdc-admin

Parameters

number: Tunnel interface number. The value is the created Tunnel interface number.

Usage guidelines

Use this command to clear old statistics so you can observe new traffic statistics on a tunnel interface.

If you do not specify any parameter, this command clears the statistics for all interfaces.

If you specify only the tunnel keyword, this command clears the statistics for all tunnel interfaces.

If you specify both the tunnel keyword and the number argument, this command clears the statistics for the specified tunnel interface.

Examples

# Clear the statistics for the interface Tunnel 1.

<Sysname> reset counters interface tunnel 3

Related commands

display interface tunnel

shutdown

Use shutdown to shut down a tunnel interface.

Use undo shutdown to bring up a tunnel interface.

Syntax

shutdown

undo shutdown

Default

A tunnel interface is up.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

This command disconnects all links set up on the interface. Make sure you fully understand the impact of the command on your network.

Examples

# Shut down the interface Tunnel 1.

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] shutdown

Related commands

display interface tunnel

source

Use source to specify the source address or source interface for the tunnel interface.

Use undo source to restore the default.

Syntax

source { ip-address | ipv6-address | interface-type interface-number }

undo source

Default

No source address or source interface is specified for the tunnel interface.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

ip-address: Tunnel source IPv4 address.

ipv6-address: Tunnel source IPv6 address.

interface-type interface-number: Specifies the source interface. The interface must be up and must have an IP address.

Usage guidelines

The specified source address or the address of the specified source interface is used as the source address of tunneled packets. To view the configured tunnel source address, use the display interface tunnel command.

The source address of the local tunnel interface must be the destination address of the peer tunnel interface, and vice versa.

If you use this command multiple times, the most recent configuration takes effect.

Examples

# Set VLAN-interface 10 as the source interface of the interface Tunnel 1.

<Sysname> system-view

[Sysname] interface tunnel 1 mode gre

[Sysname-Tunnel1] source vlan-interface 10

# Set 192.100.1.1 as the source address of the interface Tunnel 1.

<Sysname> system-view

[Sysname] interface tunnel 1 mode gre

[Sysname-Tunnel1] source 192.100.1.1

Related commands

·           destination

·           display interface tunnel

·           interface tunnel

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网