05-Layer 3 - IP Services Command Reference

HomeSupportRoutersH3C SR8800 Router SeriesReference GuidesCommand ReferencesH3C SR8800 Command Reference-Release3347-6W10305-Layer 3 - IP Services Command Reference
13-Tunneling Commands
Title Size Download
13-Tunneling Commands 141.02 KB

default

Syntax

default

View

Tunnel interface view

Default level

2: System level

Parameters

None

Description

Use the default command to restore the default settings 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. You can use the display this command in interface view to check for these commands, and perform 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 that you are fully aware of the impacts of this command when you perform it on a live network.

 

Examples

# Restore the default settings of interface tunnel 10.

<Sysname> system-view

[Sysname] interface tunnel 10

[Sysname-Tunnel10] 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: Description of an interface, a string of 1 to 80 characters.

Description

Use the description command to configure a description for the current interface.

Use the undo description command to restore the default.

By default, the description of a tunnel interface is Tunnelnumber Interface, 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: Tunnel destination IPv4 address.

Description

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

Use the undo destination command to remove the configured tunnel destination address.

By default, no tunnel destination address is configured.

Note that:

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

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

Examples

# Configure interface GigabitEthernet 2/1/1 (193.101.1.1) of Sysname 1 and interface GigabitEthernet 2/1/1 (192.100.1.1) of Sysname 2 as the source and destination interfaces of a tunnel between the two routers, respectively.

<Sysname1> system-view

[Sysname1] interface Tunnel 1

[Sysname1-Tunnel1] source 193.101.1.1

[Sysname1-Tunnel1] destination 192.100.1.1

<Sysname2> system-view

[Sysname2] interface Tunnel 2

[Sysname2-Tunnel2] source 192.100.1.1

[Sysname2-Tunnel2] destination 193.101.1.1

display interface tunnel

Syntax

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

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

View

Any view

Default level

1: Monitor level

Parameters

number: Number of a tunnel interface. With 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.

down: Displays information about interfaces in the 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 the display interface tunnel command to display information about a tunnel interface, such as 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: destination, interface tunnel, source, 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 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 Output description

Field

Description

Tunnel0 current state

Physical state of the tunnel interface, which can be:

·       DOWN (Administratively)—Indicates that the interface is administratively down; that is, the interface is shut down with the shutdown command.

·       DOWN—Indicates that the interface is administratively up but its physical state is down.

·       UP—Indicates that both the administrative and physical states of the interface are up.

Line protocol current state

Link layer state of the tunnel interface, which can be:

·       DOWN—Indicates that the protocol state of the interface is down.

·       UP—Indicates that the protocol state of the interface is up.

Description

Descriptive information of a 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

Tunnel source address.

destination

Tunnel destination address.

Tunnel bandwidth

Bandwidth of the tunnel interface.

Tunnel protocol/transport

Tunnel mode and transport protocol, which can be:

·       GRE/IP—GRE over IPv4 tunnel mode

·       IP/IP—IPv4 over IPv4 tunnel mode

·       IPv6/IP—IPv6 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

·       CR_LSPMPLS TE tunnel mode

GRE key disabled

No key is configured for the GRE tunnel interface.

Checksumming of GRE packets disabled

Disables the GRE packet checksum function.

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 error packets among all input packets.

packets output

Total number of output packets.

output error

Number of error packets in all output 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 1 in the 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 Output description

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 a backup interface. To see the primary interface, use the display standby state command (see High Availability Command Reference).

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 up.

·       DOWN—The link is down.

·       ADM—The link has been administratively shut down. To bring it up, perform 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.

Cause

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

 

display ipv6 interface tunnel

Syntax

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

View

Any view

Default level

1: Monitor level

Parameters

number: Tunnel interface number. If no interface number is specified, IPv6 information about all tunnel interfaces will be displayed.

verbose: Displays detailed IPv6 information and IPv6 packet statistics of a tunnel interface. If this keyword is not specified, brief IPv6 information of a tunnel interface is displayed.

|: 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 the display ipv6 interface tunnel command to display IPv6 information of a tunnel interface.

Examples

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

<Sysname> display ipv6 interface tunnel 0 verbose

Tunnel0 current state :UP

Line protocol current state :UP

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

  Global unicast address(es):

    3000:101:101::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 Output description

Field

Description

Tunnel0 current state

Physical state of the tunnel interface:

·       Administratively DOWN—Indicates that the interface is administratively down; that is, the interface is shut down with the shutdown command.

·       DOWN—Indicates that the interface is administratively up but its physical state is down.

·       UP—Indicates that both the administrative and physical states of the interface are up.

Line protocol current state

Link layer state of the tunnel interface:

·       DOWN—Indicates that the protocol state of the interface is down.

·       UP—Indicates that 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 is enabled on the tunnel interface in this example.

link-local address

Link-local address of a tunnel interface.

Global unicast address(es)

Aggregatable global unicast address of a tunnel interface.

Joined group address(es)

Multicast address of a tunnel interface.

MTU is 1480 bytes

Size of the MTU in a tunnel. The MTU in this example is 1480 bytes.

ND reachable time

Neighbor reachable time.

ND retransmit interval

Interval for retransmitting a neighbor discovery request message.

Hosts use stateless autoconfig for addresses

Hosts use the stateless autoconfiguration mode to acquire IPv6 addresses.

InReceives

Number of all IPv6 packets received on the tunnel interface, including error packets.

InTooShorts

Number of IPv6 packets that are too short in length received on the tunnel interface, such as a packet with a length less than 40 bytes.

InTruncatedPkts

Number of IPv6 packets received on the tunnel interface, with a length less than that specified in the packet header.

InHopLimitExceeds

Number of IPv6 packets that exceeded the hop limit received on the tunnel interface.

InBadHeaders

Number of IPv6 packets with wrong basic headers received on the tunnel interface.

InBadOptions

Number of IPv6 packets with wrong extension headers received on the tunnel interface.

ReasmReqds

Number of IPv6 fragments received on the tunnel interface.

ReasmOKs

Number of IPv6 datagrams reassembled on the tunnel interface.

InFragDrops

Number of wrong IPv6 fragments discarded on the tunnel interface.

InFragTimeouts

Number of IPv6 fragments discarded on the interface because they had stayed in the cache longer than the specified time.

OutFragFails

Number of IPv6 Packets that failed to be fragmented on the outbound tunnel interface.

InUnknownProtos

Number of IPv6 packets received on the tunnel interface, with an unknown or unsupported protocol type.

InDelivers

Number of IPv6 packets delivered to the upper-layer IPv6 protocols (such as ICMPv6, TCP, or UDP) from the tunnel interface.

OutRequests

Number of local IPv6 packets from the upper-layer IPv6 protocols.

OutForwDatagrams

Number of IPv6 packets forwarded by the outbound tunnel interface.

InNoRoutes

Number of IPv6 packets discarded on the interface because no matching route is found.

InTooBigErrors

Number of IPv6 packets discarded on the interface due to exceeding the MTU value.

OutFragOKs

Number of packets that are successfully fragmented on the outbound interface.

OutFragCreates

Number of fragments on the outbound interface.

InMcastPkts

Number of IPv6 multicast packets received on the interface.

InMcastNotMembers

Number of IPv6 multicast packets discarded on the interface because the interface does not belong to the corresponding multicast groups.

OutMcastPkts

Number of IPv6 multicast packets sent on the interface.

InAddrErrors

Number of IPv6 packets discarded on the interface due to illegal destination addresses.

InDiscards

Number of IPv6 packets received but then discarded on the interface due to resource problems rather than packet content errors

OutDiscards

Number of IPv6 packets sent on the interface but then discarded due to resource problems rather than packet content errors.

 

# Display brief IPv6 information of interface Tunnel 0.

<Sysname> display ipv6 interface tunnel 0

*down: administratively down

(s): spoofing

Interface                                Physical   Protocol   IPv6 Address

Tunnel0                                up         up       3000::1

Table 4 Output description

Field

Description

*down

The tunnel interface is in administrative down state, meaning the interface is shut down using the shutdown command.

(s)

Spoofing feature of the tunnel interface. That is, although the link-layer protocol state of the interface is up, no such link exists, or the link is not a permanent one and can only be established as needed.

Interface

Name of the tunnel interface.

Physical

Physical state of the tunnel interface:

·       *down—Indicates that the interface is administratively down; that is, the interface is shut down with the shutdown command.

·       down—Indicates that the interface is administratively up but its physical state is down.

·       up—Indicates that both the administrative and physical states of the interface are up.

Protocol

Link-layer protocol state of the tunnel interface:

·       down—Indicates that the protocol state of the interface is down.

·       up—Indicates that the protocol state of the interface is up.

IPv6 Address

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

 

interface tunnel

Syntax

interface tunnel number

undo interface tunnel number

View

System view

Default level

2: System level

Parameters

number: Tunnel interface number, in the range of 0 to 1023. The number of tunnels that can be created is restricted to the total number of interfaces and the memory.

Description

Use the interface tunnel command to create a tunnel interface and enter tunnel interface view.

Use the undo interface tunnel command to remove a specified tunnel interface.

By default, there is no tunnel interface on the router.

·           Use the interface tunnel command to enter interface view of a specified tunnel. If the tunnel interface is not created, you must create it before entering its view.

·           A tunnel interface number has only local significance, and therefore, the same interface number or different interface numbers can be set at both ends of a tunnel.

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

Examples

# Create interface Tunnel 3 and enter tunnel interface view.

<Sysname> system-view

[Sysname] interface Tunnel 3

[Sysname-Tunnel3]

mtu (tunnel interface view)

Syntax

mtu mtu-size

undo mtu

View

Tunnel interface view

Default level

2: System level

Parameters

mtu-size: MTU for IPv4 packets on the interface, in bytes, in the range of 46 to 10240.

Description

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

Use the undo mtu command to restore the default.

The default MTU for IPv4 packets on an interface is 1500 bytes.

Examples

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

<Sysname> system-view

[Sysname] interface tunnel 3

[Sysname-Tunnel3] mtu 10000

reset counters interface

Syntax

reset counters interface [ tunnel [ number ] ]

View

User view

Default level

2: System level

Parameters

number: Tunnel interface number, in the range of 0 to 1023. The number of tunnels that can be created depends on the total number of interfaces and interface memory.

Description

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

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

·           If neither the tunnel keyword nor interface number is specified, this command clears the statistics of all interfaces.

·           If only the tunnel keyword is specified, this command clears the statistics of all tunnel interfaces.

·           If both the tunnel keyword and interface number are specified, this command clears the statistics of the specified tunnel interface.

Examples

# Clear the statistics of 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 the shutdown command to shut down a tunnel interface.

Use the undo shutdown command to bring up a tunnel interface.

By default, a tunnel interface is in the 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: Tunnel source IPv4 address.

interface-type interface-number: Specifies an interface.

interface-type interface-number: Specifies an interface. The interface types include Ethernet, serial, ATM, tunnel, and loopback.

Description

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

Use the undo source command to remove the configured tunnel source address.

By default, no tunnel source address is configured.

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.

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

Examples

# Set the tunnel source address to 192.100.1.1 (or VLAN-interface 10) on interface Tunnel 5.

<Sysname> system-view

[Sysname] interface tunnel 5

[Sysname-Tunnel5] source 192.100.1.1

tunnel bandwidth

Syntax

tunnel bandwidth bandwidth-value

undo tunnel bandwidth

View

Tunnel interface view

Default level

2: System level

Parameters

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

Description

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

Use the undo tunnel bandwidth command 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 discard ipv4-compatible-packet

Syntax

tunnel discard ipv4-compatible-packet

undo tunnel discard ipv4-compatible-packet

View

System view

Default level

2: System level

Parameters

None

Description

Use the tunnel discard ipv4-compatible-packet command to enable dropping of IPv6 packets using IPv4-compatible IPv6 addresses.

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

By default, IPv6 packets using IPv4-compatible IPv6 addresses are not dropped.

The tunnel discard ipv4-compatible-packet command enables the device to check the source and destination IPv6 addresses of the de-encapsulated IPv6 packets from the tunnel and discard packets that use a source or destination IPv4-compatible IPv6 address.

Examples

# Enable dropping of IPv6 packets using IPv4-compatible IPv6 addresses.

<Sysname> system-view

[Sysname] tunnel discard ipv4-compatible-packet

tunnel-protocol

Syntax

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

undo tunnel-protocol

View

Tunnel interface view

Default level

2: System level

Parameters

ipv4-ipv4: Sets the tunnel to an IPv4 over IPv4 tunnel.

gre: Specifies the GRE over IPv4 tunnel mode.

ipv6-ipv4: Sets the tunnel to an IPv6 over IPv4 tunnel.

ipv6-ipv4 6to4: Sets the tunnel to IPv6 over IPv4 6to4 tunnel.

ipv6-ipv4 auto-tunnel: Sets the tunnel to an automatic IPv4 compatible IPv6 tunnel.

ipv6-ipv4 isatap: Sets the tunnel to an IPv6 over IPv4 ISATAP tunnel.

mpls te: Sets the tunnel to an MPLS TE tunnel.

Description

Use the tunnel-protocol command to configure the tunnel type.

Use the undo tunnel-protocol to restore the default.

By default, the tunnel is a GRE tunnel.

Note that:

·           A proper tunnel type can be selected for packet encapsulation according to the network topology and application. The same tunnel type must be configured at both ends of the tunnel. Otherwise, packet delivery will fail.

·           Only one automatic tunnel can be configured at the same tunnel source.

For more information about MPLS TE tunnels, see MPLS TE Configuration Guide.

 

 

NOTE:

The router does not support IPv4 over IPv4 tunnels when working in hybrid or SPC mode. For more information about the system working modes, see Fundamentals Configuration Guide.

 

Examples

# Specify the tunnel type as GRE tunnel for a tunnel interface.

<Sysname> system-view

[Sysname] interface tunnel 4

[Sysname-Tunnel4] tunnel-protocol gre

 

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