06-Layer 3 - IP Services Command Reference

HomeSupportSwitchesH3C S9500E Switch SeriesReference GuidesCommand ReferencesH3C S9500E Command References-Release1828P04-6W18206-Layer 3 - IP Services Command Reference
13-Tunneling Commands
Title Size Download
13-Tunneling Commands 141.03 KB

default

Syntax

default

View

Tunnel interface view

Default level

2: System level

Parameters

None

Description

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

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 to resolve the problem.

 

CAUTION

CAUTION:

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

 

Examples

# Restore the default setting of interface Tunnel 1.

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] default

This command will restore the default settings. Continue? [Y/N]:y

description

Syntax

description text

undo description

View

Tunnel interface view

Default level

2: System level

Parameters

text: Specifies the description of an interface, a string of 1 to 80 characters.

Description

Use description to configure a description for the current interface.

Use undo description to restore the default.

By default, the description of an interface is the interface name followed by the Interface string, for example, Tunnel1 Interface.

Related commands: display interface tunnel.

Examples

# Configure the description of interface Tunnel 1 as tunnel1.

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] description tunnel1

destination

Syntax

destination ip-address

undo destination

View

Tunnel interface view

Default level

2: System level

Parameters

ip-address: Specifies the tunnel destination IPv4 address.

Description

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

Use undo destination to remove the configured tunnel destination address.

By default, no tunnel destination address is configured.

The tunnel destination address is the address of the peer interface receiving packets and should be configured as the source address of the peer tunnel interface.

Automatic tunnel interfaces using the same encapsulation protocol must have different source addresses. Two or more tunnel interfaces using the same encapsulation protocol must have different source and destination addresses.

Related commands: source, interface tunnel, display interface tunnel, and display ipv6 interface tunnel.

Examples

# Set the interface VLAN-interface 100 (193.101.1.1) of Sysname 1 and the interface VLAN-interface 100 (192.100.1.1) of Sysname 2 as the source and destination interfaces of a tunnel between the two switches, respectively.

<Sysname1> system-view

[Sysname1] interface Tunnel 0

[Sysname1-Tunnel0] source 193.101.1.1

[Sysname1-Tunnel0] destination 192.100.1.1

<Sysname2> system-view

[Sysname2] interface Tunnel 0

[Sysname2-Tunnel0] source 192.100.1.1

[Sysname2-Tunnel0] destination 193.101.1.1

display interface tunnel

Syntax

display interface [ tunnel ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ]

display interface [ tunnel [ number ] ] [ brief [ description ] ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

number: Sets the number of a tunnel interface. If you specify this argument, the command displays information about the specified 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 25 characters of interface descriptions.

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

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

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

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.

Related commands: interface tunnel, source, destination, and tunnel-protocol.

Examples

# Display detailed information about interface Tunnel 0.

<Sysname> display interface tunnel 0

Tunnel0 current state: UP

Line protocol current state: UP

Description: Tunnel0 Interface

The Maximum Transmit Unit is 1476

Internet Address is 10.1.2.1/24 Primary

Encapsulation is TUNNEL, service-loopback-group ID not set

Tunnel source 192.13.2.1, destination 192.13.2.2

Tunnel bandwidth 64 (kbps)

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

Tunnel protocol/transport GRE/IP

    GRE key disabled

    Checksumming of GRE packets disabled

Last clearing of counters:  Never

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

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

    361 packets input,  9953388 bytes

    0 input error

    361 packets output,  30324 bytes

    0 output error

Table 1 Command output

Field

Description

Tunnel0 current state

Physical state of the tunnel interface:

·     DOWN (Administratively)—The interface is administratively down. That is, the interface is shut down with 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

Maximum transmit unit allowed on the tunnel interface.

Internet Address

IP address of the tunnel interface.

If no IP address is assigned to the interface, Internet protocol processing : disabled will be displayed, which means that packets cannot be processed.

Primary indicates the primary IP address of the interface. Sub indicates a secondary IP address of the interface.

Encapsulation is TUNNEL

The encapsulation protocol is tunnel.

service-loopback-group ID

ID of the service loopback group referenced by the tunnel.

If service loopback group is not supported or not specified, service-loopback-group ID not set will be displayed.

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)

GRE keepalive is enabled to detect the state of the tunnel interface. In this example, keepalive packets are sent every 50 seconds and can be sent up to three times.

Tunnel protocol/transport

Tunnel mode and transport protocol:

·     GRE/IPGRE over IPv4 tunnel mode.

·     IPv6/IPIPv6 over IPv4 manual tunnel mode.

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

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

·     IPv6/IP ISATAPIPv6 over IPv4 ISATAP tunnel mode.

·     CR_LSPMPLS TE tunnel mode.

GRE key disabled

The tunnel interface key option of GRE is not configured.

Checksumming of GRE packets disabled

The GRE packet checksum function is disabled.

Last clearing of counters

Last time of clearing of counters.

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

Average input rate in the last 300 seconds in bytes/sec or packets/sec.

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

Average output rate in the last 300 seconds in bytes/sec or packets/sec.

packets input

Total number of input packets.

input error

Number of input error packets.

packets output

Total number of output packets.

output error

Number of output error packets.

 

# Display brief information about interface Tunnel 0.

<Sysname> display interface tunnel 0 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

Tun0                   UP   UP       1.1.1.1

# Display brief information about interface Tunnel 0, including the complete interface description.

<Sysname> display interface tunnel 0 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

Tun0                   UP   UP       1.1.1.1         123456789012345678901234567

890123456789012345679

# Display brief information about interface Tunnel 1 in DOWN state.

<Sysname> display interface tunnel brief down

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

Link: ADM - administratively down; Stby - standby

Interface              Link Cause

Tun1                   DOWN Not connected

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, perform the undo shutdown command.

·     StbyThe interface is operating as a backup interface. To see the primary interface, use the display standby state command (High Availability Command Reference).

Protocol: (s) - spoofing

If the network layer protocol state of an interface is shown as UP, but its link is an on-demand link or not present at all, its protocol attribute includes the spoofing flag (an s in parentheses).

Interface

Abbreviated interface name.

Link

Physical link state of the interface:

·     UPThe link is up.

·     DOWNThe link is down.

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

·     StbyThe interface operates as a backup interface.

Protocol

Protocol connection state of the interface:

·     DOWNProtocol connection is disabled on the interface.

·     UPProtocol connection is enabled.

Main IP

Main IP address of the interface.

Description

Description of the interface.

Cause

Cause of a DOWN physical link. If the port has been shut down with the shutdown command, this field displays Administratively. To restore the physical state of the interface, use the undo shutdown command.

 

display ipv6 interface tunnel

Syntax

display ipv6 interface tunnel [ number ] [ brief ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

number: Displays IPv6 information on a specific tunnel interface. If you do not specify an interface number, this command displays IPv6 information about all tunnel interfaces.

brief: Displays brief information and IPv6 packet statistics for tunnel interfaces. If you do not specify this keyword, the command displays detailed IPv6 information about tunnel interfaces.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display ipv6 interface tunnel to display IPv6 information about tunnel interfaces.

Examples

# Display detailed IPv6 information and IPv6 packet statistics for interface Tunnel 0.

<Sysname> display ipv6 interface tunnel 0

Tunnel0 current state :UP

Line protocol current state :UP

IPv6 is enabled, link-local address is FE80::202:201

  Global unicast address(es):

    3000::1, subnet is 3000::/64

  Joined group address(es):

    FF02::1:FF02:201

    FF02::1:FF00:1

    FF02::1:FF00:0

    FF02::2

    FF02::1

  MTU is 1480 bytes

  ND reachable time is 30000 milliseconds

  ND retransmit interval is 1000 milliseconds

  Hosts use stateless autoconfig for addresses

IPv6 Packet statistics:

  InReceives:                    45

  InTooShorts:                   0

  InTruncatedPkts:               0

  InHopLimitExceeds:             0

  InBadHeaders:                  0

  InBadOptions:                  0

  ReasmReqds:                    0

  ReasmOKs:                      0

  InFragDrops:                   0

  InFragTimeouts:                0

  OutFragFails:                  0

  InUnknownProtos:               0

  InDelivers:                    45

  OutRequests:                   45

  OutForwDatagrams:              0

  InNoRoutes:                    0

  InTooBigErrors:                0

  OutFragOKs:                    0

  OutFragCreates:                0

  InMcastPkts:                   0

  InMcastNotMembers:             0

  OutMcastPkts:                  0

  InAddrErrors:                  0

  InDiscards:                    0

  OutDiscards:                   0

Table 3 Command output

Field

Description

Tunnel0 current state

Physical state of the tunnel interface:

·     Administratively DOWN—The interface is administratively down. That is, the interface is shut down with 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.

IPv6 is enabled

IPv6 packet forwarding state of the tunnel interface. IPv6 packet forwarding is automatically enabled after an IPv6 address is assigned to the interface. IPv6 packet forwarding is enabled in the example.

link-local address

Link-local address configured for the tunnel interface.

Global unicast address(es)

Global unicast addresses configured for the tunnel interface.

Joined group address(es)

Multicast addresses of the tunnel interface.

MTU is 1480 bytes

Maximum transmission unit of the tunnel interface. It is 1480 bytes in the example.

ND reachable time

Neighbor reachable time.

ND retransmit interval

Interval for retransmitting a neighbor solicitation message.

Hosts use stateless autoconfig for addresses

Hosts use stateless autoconfiguration mode to acquire IPv6 addresses.

InReceives

All IPv6 packets received by the tunnel interface, including types of error packets.

InTooShorts

Received IPv6 packets that are too short, with a length less than 40 bytes, for example.

InTruncatedPkts

Received IPv6 packets with a length less than that specified in the packets.

InHopLimitExceeds

Received IPv6 packets with a hop count exceeding the limit.

InBadHeaders

Received IPv6 packets with bad basic headers.

InBadOptions

Received IPv6 packets with bad extension headers.

ReasmReqds

Received IPv6 fragments.

ReasmOKs

Number of packets after reassembly rather than the number of fragments.

InFragDrops

IPv6 fragments discarded due to certain errors.

InFragTimeouts

IPv6 fragments discarded because the interval for which they had stayed in the system buffer exceeded the specified period.

OutFragFails

Packets failed in fragmentation on the outbound interface.

InUnknownProtos

Received IPv6 packets with unknown or unsupported protocol type.

InDelivers

Received IPv6 packets that were delivered to application layer protocols (such as ICMPv6, TCP, and UDP).

OutRequests

Local IPv6 packets sent by IPv6 application protocols.

OutForwDatagrams

Packets forwarded by the outbound interface.

InNoRoutes

IPv6 packets that were discarded because no matched route can be found.

InTooBigErrors

IPv6 packets that were discarded because they exceeded the PMTU.

OutFragOKs

Packets that were fragmented on the outbound interface.

OutFragCreates

Number of packet fragments after fragmentation on the outbound interface.

InMcastPkts

IPv6 multicast packets received on the interface.

InMcastNotMembers

Incoming IPv6 multicast packets that were discarded because the interface did not belong to the corresponding multicast groups.

OutMcastPkts

IPv6 multicast packets sent by the interface.

InAddrErrors

IPv6 packets that were discarded due to invalid destination addresses.

InDiscards

Received IPv6 packets that were discarded due to resource problems rather than packet content errors.

OutDiscards

Sent packets that were discarded due to resource problems rather than packet content errors.

 

# Display brief IPv6 information about interface Tunnel 0.

<Sysname> display ipv6 interface tunnel 0 brief

*down: administratively down

(s): spoofing

Interface                                Physical   Protocol   IPv6 Address

Tunnel0                                    up         up       3000::1

Table 4 Command output

Field

Description

*down

The tunnel interface is administratively down, that is, the interface is closed by using the shutdown command.

(s)

Spoofing attribute of the tunnel interface, that is, the link protocol state of the tunnel interface is up, but the link does not exist, or the link is established on demand, instead of being permanent.

Interface

Name of the tunnel interface.

Physical

Physical state of the tunnel interface:

·     *down—The interface is administratively down. That is, the interface is shut down with 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.

Protocol

Link layer protocol state of the tunnel interface:

·     down—The protocol state of the interface is down, which is usually because that no IPv6 address is assigned to the interface.

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

IPv6 Address

IPv6 address of the tunnel interface. Only the first of configured IPv6 addresses is displayed. (If no address is configured for the interface, Unassigned will be displayed.)

 

interface tunnel

Syntax

interface tunnel number

undo interface tunnel number

View

System view

Default level

2: System level

Parameters

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

Description

Use interface tunnel to create a tunnel interface and enter its view. If the specified tunnel interface already exists, this command places you to tunnel interface view.

Use undo interface tunnel to delete a tunnel interface.

By default, no tunnel interface is created on the switch.

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

Related commands: display interface tunnel, display ipv6 interface tunnel, source, destination, and tunnel-protocol.

Examples

# Create interface Tunnel 3 and enter its view.

<Sysname> system-view

[Sysname] interface tunnel 3

[Sysname-Tunnel3]

mtu

Syntax

mtu mtu-size

undo mtu

View

Tunnel interface view

Default level

2: System level

Parameters

mtu-size: Specifies the MTU for IPv4 packets on the interface, in bytes, in the range of 64 to 9174.

Description

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

Use undo mtu to restore the default.

The default MTU for IPv4 packets is 1500.

Examples

# Set the MTU for IPv4 packets on interface Tunnel 3 to 2000 bytes.

<Sysname> system-view

[Sysname] interface tunnel 3

[Sysname-Tunnel3] mtu 2000

ipv6 mtu

Syntax

ipv6 mtu mtu-size

undo ipv6 mtu

View

Tunnel interface view

Default level

2: System level

Parameters

mtu-size: Specifies the IPv6 MTU of the tunnel interface, in the range of 1280 to 9174 bytes.

Description

Use ipv6 mtu to set the IPv6 MTU on the tunnel interface.

Use undo ipv6 mtu to restore the default MTU.

By default, the IPv6 MTU on the GRE tunnel interface is 1476, and the IPv6 MTU on other tunnels is 1480 bytes.

Examples

# Set the MTU of IPv6 packets on interface Tunnel 0 to 1280 bytes.

<Sysname> system-view

[Sysname] interface tunnel 0

[Sysname-Tunnel0] ipv6 mtu 1280

reset counters interface

Syntax

reset counters interface [ tunnel [ number ] ]

View

User view

Default level

2: System level

Parameters

number: Specifies the tunnel interface number.

Description

Use reset counters interface to clear tunnel interface statistics.

Before sampling network traffic within a specific period of time on an interface, you need to clear the existing statistics.

If you do not specify the tunnel keyword or interface number, 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 interface number, this command clears statistics for the specified tunnel interface.

Examples

# Clear statistics for Tunnel 3.

<Sysname> reset counters interface tunnel 3

shutdown

Syntax

shutdown

undo shutdown

View

Tunnel interface view

Default level

2: System level

Parameters

None

Description

Use shutdown to shut down a tunnel interface.

Use undo shutdown to bring up a tunnel interface.

By default, a tunnel interface is in up state.

Examples

# Shut down interface Tunnel 1.

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] shutdown

source

Syntax

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

undo source

View

Tunnel interface view

Default level

2: System level

Parameters

ip-address: Specifies the tunnel source IPv4 address.

interface-type interface-number: Specifies a tunnel interface by its type and number. The interface types include tunnel and VLAN interface.

Description

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

Use undo source to remove the configured source address or interface of the tunnel interface.

By default, no source address or interface is specified for the tunnel interface.

The tunnel source address is the address of the interface sending packets and should be configured as the destination address of the peer tunnel interface.

Automatic tunnel interfaces using the same encapsulation protocol must have different source addresses. Manual tunnel interfaces using the same encapsulation protocol must have different source and destination addresses.

Related commands: destination, interface tunnel, display interface tunnel, and display ipv6 interface tunnel.

Examples

# Set the tunnel source address to 192.100.1.1 on Tunnel 0.

<Sysname> system-view

[Sysname] interface tunnel 0

[Sysname-Tunnel0] source 192.100.1.1

Or set the tunnel source interface to VLAN-interface 100.

<Sysname> system-view

[Sysname] interface tunnel 0

[Sysname-Tunnel0] source vlan-interface 100

tunnel bandwidth

Syntax

tunnel bandwidth bandwidth-value

undo tunnel bandwidth

View

Tunnel interface view

Default level

2: System level

Parameters

bandwidth-value: Specifies the bandwidth value of the tunnel interface in kbps, in the range of 1 to 10000000.

Description

Use tunnel bandwidth to set the bandwidth value of the tunnel interface.

Use undo tunnel bandwidth to restore the default.

By default, the bandwidth of the tunnel interface is 64 kbps.

The tunnel interface bandwidth set with the tunnel bandwidth command is for dynamical routing protocols to calculate the cost of a tunnel path, rather than changes the bandwidth of the tunnel interface. Refer to the bandwidth of the output interface of the packet when you set the bandwidth of the tunnel interface.

Examples

# Configure the bandwidth of Tunnel 0 as 100 kbps.

<Sysname> system-view

[Sysname] interface tunnel 0

[Sysname-Tunnel0] tunnel bandwidth 100

tunnel-protocol

Syntax

tunnel-protocol [ ipv6-ipv4 [ 6to4 | auto-tunnel | isatap ] | gre | mpls te ]

undo tunnel-protocol

View

Tunnel interface view

Default level

2: System level

Parameters

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

6to4: Specifies the 6to4 tunnel mode.

auto-tunnel: Specifies the automatic tunnel mode.

isatap: Specifies the ISATAP tunnel mode.

gre: Specifies the GRE over IPv4 tunnel mode.

mpls te: Specifies the MPLS TE tunnel mode.

Description

Use tunnel-protocol to specify the tunnel mode for the tunnel interface.

Use undo tunnel-protocol to restore the default.

By default, the GRE over IPv4 tunnel mode is used.

You can select a tunnel mode according to the actual network topology and application. The two ends of a tunnel must have the same tunnel mode specified, or traffic transmission might fail.

Only one automatic tunnel can be created at the start point of a tunnel.

Examples

# Specify the IPv6 over IPv4 tunnel mode for interface Tunnel 1.

<Sysname> system-view

[Sysname] interface tunnel 1

[Sysname-Tunnel1] tunnel-protocol ipv6-ipv4

  • 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 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
新华三官网