05-Layer 3 - IP Services Command Reference

HomeSupportSwitchesH3C S7500E Switch SeriesReference GuidesCommand ReferencesH3C S7500E Switch Series Command References-Release7178-6W10005-Layer 3 - IP Services Command Reference
12-Tunneling commands
Title Size Download
12-Tunneling commands 96.02 KB

Tunneling commands

bandwidth

Use bandwidth to set the expected bandwidth for an interface.

Use undo bandwidth to restore the default.

Syntax

bandwidth bandwidth-value

undo bandwidth

Default

The expected bandwidth is 64 kbps.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

bandwidth-value: Specifies the expected bandwidth in the range of 1 to 400000000 kbps.

Usage guidelines

The expected bandwidth for an interface affects the link costs in OSPF, OSPFv3, and IS-IS. For more information, see Layer 3—IP Routing Configuration Guide.

Examples

# Set the expected bandwidth of Tunnel 1 to 100 kbps.

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] bandwidth 100

default

Use default to restore the default settings for a 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 on a live network.

This command might fail to restore the default settings for some commands for reasons such as command dependencies or system restrictions. Use the display this command in interface view to identify these commands. Use their undo forms or follow the command reference to 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 for 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, a case-sensitive string of 1 to 255 characters.

Usage guidelines

Configure descriptions for interfaces for identification and management purposes.

You can use the display interface command to display the configured interface descriptions.

Examples

# Configure the description for 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 | ipv6-address }

undo destination

Default

No tunnel destination address is configured.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

ip-address: Specifies the tunnel destination IPv4 address.

ipv6-address: Specifies the tunnel destination IPv6 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 on Sysname 1 uses the IP address 193.101.1.1 and VLAN-interface 100 on 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 on 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 on 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 | down ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

number: Specifies the 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 complete interface descriptions. If you do not specify this keyword, the command displays only the first 27 characters of interface descriptions.

down: Displays information about interfaces in the physical state of DOWN and the causes. If you do not specify this keyword, the command displays information about interfaces in all states.

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 state: UP

Description: Tunnel1 Interface

Bandwidth: 64kbps

Maximum Transmit Unit: 1476

Internet Address is 10.1.2.1/24 Primary

Tunnel source 2002::1:1 (Vlan-interface10), destination 2001::2:1

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

Tunnel TOS 0xC8, Tunnel TTL 255

Tunnel protocol/transport GRE/IPv6

    GRE key disabled

    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

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

Table 1 Command output

Field

Description

Tunnel1

Information about the tunnel interface Tunnel1.

Current state

State of the tunnel interface:

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

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

·     DOWN (Tunnel-Bundle administratively down)—The tunnel bundle interface to which the interface belongs has been shut down by using the shutdown command.

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

Line protocol state

Link layer protocol state of the tunnel interface. The value is determined by parameter negotiation on the link layer.

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

·     UP (spoofing)The link protocol state of the interface is up, but the link is temporarily set up on demand or does not exist. This attribute is available for null interfaces and loopback interfaces.

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

Description

Description for the tunnel interface.

Bandwidth

Expected bandwidth for 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 that it is the primary IP address of the interface.

Tunnel source

Source address of the tunnel. If a source interface is specified for the tunnel interface, this field also displays the source interface in parentheses.

destination

Destination address of the tunnel.

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.

This field is applicable only to GRE and EVI tunnels.

Tunnel TOS

ToS of tunneled packets.

Tunnel TTL

TTL of tunneled packets.

Tunnel protocol/transport

Tunnel mode and transport protocol:

·     CR_LSP—MPLS TE tunnel mode.

·     GRE/IPGRE/IPv4 tunnel mode.

·     GRE/IPv6GRE/IPv6 tunnel mode.

·     GRE_EVI/IP—GRE-encapsulated IPv4 EVI tunnel mode.

·     IP/IPIPv4 over IPv4 tunnel mode.

·     IPv6IPv6 tunnel mode.

·     IPv6/IPIPv6 over IPv4 manual tunnel mode.

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

·     IPv6/IP ISATAPIPv6 over IPv4 ISATAP tunnel mode.

·     UDP_VXLAN/IP—UDP-encapsulated IPv4 VXLAN tunnel mode.

GRE key disabled

No GRE tunnel interface key is configured.

Checksumming of GRE packets disabled

The GRE packet checksum feature is disabled.

Last clearing of counters

Last time when counters were cleared.

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 interface Tunnel 1.

<Sysname> display interface tunnel 1 brief

Brief information on 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 complete interface description.

<Sysname> display interface tunnel 1 brief description

Brief information on 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

# Display information about interfaces in DOWN state and the causes.

<Sysname> display interface tunnel brief down

Brief information on interface(s) under route mode:

Link: ADM - administratively down; Stby - standby

Interface            Link Cause

Tun0                  DOWN Not connected

Tun1                  DOWN Not connected

Table 2 Command output

Field

Description

Brief information on 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 bring it up, use the undo shutdown command.

·     StbyThe interface is a backup interface. To show the primary interface, use the display interface-backup state command.

Protocol: (s) - spoofing

(s) indicates that the data link layer protocol state is UP, but the link is temporarily set up on demand or does not exist. This attribute is available for null interfaces and loopback interfaces.

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

Data link layer protocol state of the interface:

·     UPThe data link protocol state of the interface is up.

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

·     UP(s)—The data link protocol state of the interface is up, but the link is temporarily set up on demand or does not exist. This attribute is available for null interfaces and loopback interfaces.

Main IP

Primary IP address of the interface.

Description

Description for the interface.

Cause

Causes for the physical state of DOWN:

·     Administratively—The link has been shut down by using the shutdown command. To bring it up, use the undo shutdown command.

·     Not connected—The tunnel is not established.

·     DOWN (Tunnel-Bundle administratively down)—The tunnel bundle interface to which the tunnel interface belongs has been shut down by using the shutdown command.

 

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 tunnel interface.

Syntax

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

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: Specifies the tunnel interface number in the range of 1 to 511.

mode evi: Specifies the IPv4 EVI tunnel mode.

mode gre: Specifies the GRE/IPv4 tunnel mode.

mode gre ipv6: Specifies the GRE/IPv6 tunnel mode.

mode ipv4-ipv4: Specifies the IPv4 over IPv4 tunnel mode.

mode ipv6: Specifies the IPv6 tunnel mode. Set this mode for IPv4 over IPv6 manual and IPv6 over IPv6 tunnels.

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

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

mode ipv6-ipv4 isatap: Specifies the ISATAP tunnel mode.

mode mpls-te: Specifies the MPLS TE tunnel mode.

mode vxlan: Specifies the VXLAN 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 the GRE/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 on a tunnel interface.

Use undo mtu to restore the default.

Syntax

mtu size

undo mtu

Default

If the tunnel interface has never been up, the tunnel interface MTU is 1500 bytes.

If the tunnel interface is up, its MTU is identical to the outgoing interface's MTU minus the length of the tunnel headers. The outgoing interface is automatically obtained through routing table lookup based on the tunnel destination address.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

size: Specifies the MTU in the range of 100 to 64000 bytes.

Usage guidelines

After you configure an MTU for a tunnel interface, the configured MTU applies regardless of the tunnel interface status (up/down) and the outgoing interface MTU.

To avoid fragmentation after tunnel encapsulation, set the tunnel interface MTU no greater than the value of the outgoing interface MTU minus the length of the tunnel headers.

Examples

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

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] mtu 10000

Related commands

display interface tunnel

reset counters interface

Use reset counters interface to clear interface statistics.

Syntax

reset counters interface [ tunnel [ number ] ]

Views

User view

Predefined user roles

network-admin

mdc-admin

Parameters

tunnel: Specifies a tunnel interface.

number: Specifies the tunnel interface number. The tunnel interface must have been created.

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 parameters, this command clears statistics for all interfaces.

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

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

Examples

# Clear statistics for interface Tunnel 1.

<Sysname> reset counters interface tunnel 1

Related commands

display interface tunnel

service

Use service to specify a card for forwarding the traffic on a tunnel interface.

Use undo service to restore the default.

Syntax

In standalone mode:

service slot slot-number

undo service slot

In IRF mode:

service chassis chassis-number slot slot-number

undo service chassis

Default

No card is specified for the tunnel interface.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

slot slot-number: Specifies a card. The slot-number argument represents the number of the slot that holds the card. (In standalone mode.)

chassis chassis-number slot slot-number: Specifies a card of an IRF member device. The chassis-number argument represents the ID of the IRF member device. The slot-number argument represents the number of the slot that holds the card. (In IRF mode.)

Usage guidelines

If no card is specified for forwarding the traffic on the tunnel interface, the traffic is processed on the cards or IRF member devices that receive the traffic.

Some features, such as IPsec anti-replay, require that traffic for the same tunnel interface be processed on the same card or IRF member device. If such a feature is configured, you must use this command to specify a card for forwarding the traffic on a tunnel interface.

If the specified card is removed, traffic on the tunnel interface cannot be forwarded even if the tunnel interface is up. When the card is reinstalled, traffic forwarding resumes on the card.

Examples

# (In standalone mode.) Specify the card in slot 2 to forward traffic for interface Tunnel 200.

<Sysname> system-view

[Sysname] interface tunnel 200

[Sysname-Tunnel200] service slot 2

# (In IRF mode.) Specify the card in slot 2 of IRF member device 2 to forward traffic for interface Tunnel 200.

<Sysname> system-view

[Sysname] interface tunnel 200

[Sysname-Tunnel200] service chassis 2 slot 2

shutdown

Use shutdown to shut down a tunnel interface.

Use undo shutdown to bring up a tunnel interface.

Syntax

shutdown

undo shutdown

Default

The 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 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 a 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: Specifies the tunnel source IPv4 address.

ipv6-address: Specifies the 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 display 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 execute this command multiple times, the most recent configuration takes effect.

Examples

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

<Sysname> system-view

[Sysname] interface tunnel 1 mode gre

[Sysname-Tunnel1] source vlan-interface 10

# Specify 192.100.1.1 as the source address of 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

tunnel dfbit enable

Use tunnel dfbit enable to set the Don't Fragment (DF) bit for tunneled packets.

Use undo tunnel dfbit enable to restore the default.

Syntax

tunnel dfbit enable

undo tunnel dfbit enable

Default

The DF bit is not set for tunneled packets.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

To avoid fragmentation and delay, set the DF bit for tunneled packets. Make sure the path MTU is larger than tunneled packets. Otherwise, do not set the DF bit to avoid discarding tunneled packets larger than the path MTU.

This command is supported on a GRE/IPv4 tunnel interface, an IPv4 over IPv4 tunnel interface, an IPv6 over IPv4 manual tunnel interface, a 6to4 tunnel interface, or an ISATAP tunnel interface.

Examples

# Set the DF bit for tunneled packets on interface Tunnel 1.

<Sysname> system-view

[Sysname] interface tunnel 1 mode gre

[Sysname-Tunnel1] tunnel dfbit enable

tunnel discard ipv4-compatible-packet

Use tunnel discard ipv4-compatible-packet to enable dropping IPv6 packets that use IPv4-compatible IPv6 addresses.

Use undo tunnel discard ipv4-compatible-packet to restore the default.

Syntax

tunnel discard ipv4-compatible-packet

undo tunnel discard ipv4-compatible-packet

Default

IPv6 packets that use IPv4-compatible IPv6 addresses are not dropped.

Views

System view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

This command enables the device to check the source and destination IPv6 addresses of the de-encapsulated IPv6 packets from a tunnel. If a packet uses an IPv4-compatible IPv6 address as the source or destination address, the device discards the packet.

Examples

# Enable dropping IPv6 packets that use IPv4-compatible IPv6 addresses.

<Sysname> system-view

[Sysname] tunnel discard ipv4-compatible-packet

tunnel tos

Use tunnel tos to set the ToS of tunneled packets.

Use undo tunnel tos to restore the default.

Syntax

tunnel tos tos-value

undo tunnel tos

Default

The ToS of tunneled packets is the same as the ToS of the original packets.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

tos-value: Specifies the ToS of tunneled packets, in the range of 0 to 255.

Usage guidelines

After you configure this command, all the tunneled packets of different services sent on the tunnel interface will use the same configured ToS. For more information about ToS, see ACL and QoS Configuration Guide.

This command is not supported on a VXLAN tunnel interface, an IPv4 EVI tunnel interface, and an MPLS TE tunnel interface.

Examples

# Set the ToS of tunneled packets on interface Tunnel 1 to 20.

<Sysname> system-view

[Sysname] interface tunnel 1 mode gre

[Sysname-Tunnel1] tunnel tos 20

Related commands

display interface tunnel

tunnel ttl

Use tunnel ttl to set the Time to Live (TTL) of tunneled packets.

Use undo tunnel ttl to restore the default.

Syntax

tunnel ttl ttl-value

undo tunnel ttl

Default

The TTL of tunneled packets is 255.

Views

Tunnel interface view

Predefined user roles

network-admin

mdc-admin

Parameters

ttl-value: Specifies the TTL of tunneled packets, in the range of 1 to 255.

Usage guidelines

The TTL determines the maximum number of hops that the tunneled packets can pass. When the TTL expires, the tunneled packets are discarded to avoid loops.

This command is not supported on a VXLAN tunnel interface, an IPv4 EVI tunnel interface, and an MPLS TE tunnel interface.

Examples

# Set the TTL of tunneled packets to 100 on interface Tunnel 1.

<Sysname> system-view

[Sysname] interface tunnel 1 mode gre

[Sysname-Tunnel1] tunnel ttl 100

Related commands

display interface tunnel

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