- Table of Contents
-
- 01-Access Volume
- 01-CPOS Interface Commands
- 02-POS Interface Commands
- 03-Ethernet Interface Commands
- 04-WAN Interface Commands
- 05-Frame Relay Commands
- 06-HDLC Commands
- 07-PPP Commands
- 08-Logical Interface Commands
- 09-Modem Management Commands
- 10-ATM Interface Commands
- 11-ATM Commands
- 12-E-CPOS Interface Commands
- 13-VLAN Termination Commands
- 14-Port Mirroring Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
08-Logical Interface Commands | 73.14 KB |
Table of Contents
1 Logical Interface Configuration Commands
Logical Interface Configuration Commands
Logical Interface Configuration Commands
description
Syntax
description text
undo description
View
Loopback interface view, tunnel interface view, Null 0 interface view
Default Level
2: System level
Parameters
text: Description of the interface, a string of 1 to 80 characters. Currently, the device supports the following types of characters or symbols: Standard English characters (numbers and case-sensitive letters), special English characters, spaces, and other characters or symbols that conform to the Unicode standard.
l A port description can be the mixture of English characters and other Unicode characters. The mixed description cannot exceed the specified length.
l To use a type of Unicode characters or symbols in a port description, you need to install the corresponding Input Method Editor (IME) and log in to the device through remote login software that supports this character type.
l Each Unicode character or symbol (non-English characters) takes the space of two regular characters. When the length of a description string reaches or exceeds the maximum line width on the terminal software, the software starts a new line, possibly breaking a Unicode character into two parts. As a result, garbled characters may be displayed at the end of a line.
Description
Use the description command to set a description for the current interface.
Use the undo description command to restore the default.
By default, the description of an interface is the interface name followed by the word interface.
Related commands: display interface.
Examples
# Configure the description of tunnel interface Tunnel 1 as tunnel1.
<Sysname> system-view
[Sysname] interface tunnel 1
[Sysname-Tunnel1] description tunnel1
# Configure the description of loopback interface Loopback 1 as loopback1.
<Sysname> system-view
[Sysname] interface loopback 1
[Sysname- loopback1] description loopback1
display interface loopback
display interface loopback [ interface-number]
View
Any view
Default Level
1: Monitor level
Parameters
interface-number: Loopback interface number, which can be the number of any existing Loopback interface.
Description
Use the display interface loopback command to display the information about a Loopback interface. If you do not specify the number argument, this command will display the information about all the existing Loopback interfaces.
Related commands: interface loopback.
Examples
# View the information about Loopback 12 interface.
<Sysname> display interface loopback 12
LoopBack12 current state: UP
Line protocol current state: UP (spoofing)
Description: LoopBack12 Interface
The Maximum Transmit Unit is 1536
Internet protocol processing : disabled
Physical is Loopback
Last 300 seconds input: 0 bytes/sec 0 packets/sec
Last 300 seconds output: 0 bytes/sec 0 packets/sec
0 packets input, 0 bytes, 0 drops
0 packets output, 0 bytes, 0 drops
Table 1-1 display interface loopback command output description
Field |
Description |
current state |
Physical state of the interface (up or administratively down) |
Line protocol current state |
State of the data link layer protocol: up |
Description |
Description string of the interface |
The Maximum Transmit Unit |
Maximum transmit unit (MTU) of the interface |
Internet protocol processing |
State of the network layer protocol (enabled or disabled) |
Physical |
Physical type of the interface |
Last 300 seconds input: 0 bytes/sec 0 packets/sec |
Average input rate over the last 300 seconds, where: l packets/sec indicates the average number of packets received per second. l bytes/sec indicates the average number of bytes received per second. l bits/sec indicates the average number of bits received per second. |
Last 300 seconds output: 0 bytes/sec 0 packets/sec |
Average output rate over the last 300 seconds, where: l packets/sec indicates the average number of packets sent per second. l bytes/sec indicates the average number of bytes sent per second. l bits/sec indicates the average number of bits sent per second. |
0 packets input, 0 bytes, 0 drops |
Total number and size (in bytes) of the input packets of the interface and the number of the dropped packets |
0 packets output, 0 bytes, 0 drops |
Total number and size (in bytes) of the output packets of the interface and the number of the dropped packets |
display interface null
Syntax
display interface null [ 0 ]
View
Any view
Default Level
1: Monitor level
Parameters
0: Specifies the Null interface. This null interface number is fixed to 0.
Description
Use the display interface null command to view the information about the null interface. As Null 0 interface is the only null interface on a device, this command displays the information about Null 0 interface even if you do not specify the 0 keyword.
Related commands: interface null.
Examples
# View the information about Null 0 interface.
<Sysname> display interface null 0
NULL0 current state :UP
Line protocol current state :UP (spoofing)
Description : NULL0 Interface
The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
Physical is NULL DEV
Last 300 seconds input: 0 bytes/sec 0 packets/sec
Last 300 seconds output: 0 bytes/sec 0 packets/sec
0 packets input, 0 bytes, 0 drops
0 packets output, 0 bytes, 0 drops
Refer to Table 1-1 for the description on the fields of the display interface null command.
display interface tunnel
Syntax
display interface tunnel [ number ]
View
Any view
Default Level
1: Monitor level
Parameters
number: Tunnel interface number.
Description
Use the display interface tunnel command to display information about the specified tunnel interface, including the source IP address, destination IP address, and encapsulation mode. If no tunnel interface number is specified, this command displays information about all tunnel interfaces.
Related commands: interface tunnel, source, destination, tunnel-protocol.
Examples
# Display information about tunnel 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 keepalive disable
Tunnel protocol/transport GRE/IP
GRE key disabled
Checksumming of GRE packets disabled
Output queue : (Urgent queuing : Size/Length/Discards) 0/100/0
Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0
Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0
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-2 display interface tunnel command output description
Field |
Description |
Tunnel0 current state: UP |
The physical state of the tunnel interface is up |
Line protocol current state: UP |
The link layer state of the tunnel interface is up |
Description |
Description of the tunnel interface |
Tunnel0 Interface |
Tunnel interface number |
Maximum Transmit Unit |
MTU allowed on the tunnel interface |
Encapsulation is TUNNEL |
The encapsulation protocol is tunnel |
service-loopback-group ID |
ID of the service loopback group referenced by the tunnel. If your device supports the configuration of service loopback groups, this field shows the ID of the service loopback group created on the tunnel interface; otherwise, this field shows as service-loopback-group ID not set |
Tunnel source |
Source address of the tunnel |
destination |
Destination address of the tunnel |
Tunnel keepalive disable |
GRE keepalive is disabled, in which case, the system does not detect the state of the tunnel interface |
Tunnel protocol/transport |
Tunnel protocol and transmission protocol |
GRE key disabled |
GRE tunnel interface key is not set |
Checksumming of GRE packets disabled |
GRE packet checksum function is not enabled |
Output queue : (Urgent queuing : Size/Length/Discards) |
Statistics about the packets in the urgent output queue |
Output queue : (Protocol queuing : Size/Length/Discards) |
Statistics about the packets in the protocol output queue |
Output queue : (FIFO queuing : Size/Length/Discards) |
Statistics about the packets in the FIFO output queue |
Last 300 seconds input: 0 bytes/sec 0 packets/sec |
Average input rate over the last 300 seconds, where: l packets/sec indicates the average number of packets received per second. l bytes/sec indicates the average number of bytes received per second. l bits/sec indicates the average number of bits received per second. |
Last 300 seconds output: 0 bytes/sec 0 packets/sec |
Average output rate over the last 300 seconds, where: l packets/sec indicates the average number of packets sent per second. l bytes/sec indicates the average number of bytes sent per second. l bits/sec indicates the average number of bits sent per second. |
packets input |
Total number of input packets |
input error |
Total number of input error packets |
packets output |
Total number of output packets |
output error |
Total number of output error packets |
display ipv6 interface tunnel
Syntax
display ipv6 interface tunnel [ number ] [ verbose ]
View
Any view
Default Level
1: Monitor level
Parameters
number: Tunnel interface number.
verbose: Displays detailed information of a tunnel interface and IPv6 packet statistics on the interface.
Description
Use the display ipv6 interface null command to display IPv6 information of a tunnel interface.
If no tunnel interface number is specified, this command displays IPv6 information of all tunnel interfaces. If the verbose keyword is not provided, this command displays summary IPv6 information of every tunnel interface.
Examples
# Display detailed IPv6 information of tunnel 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::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 1-3 display ipv6 interface tunnel command output description
Field |
Description |
Tunnel0 current state: UP |
The physical state of the tunnel interface is up. |
Line protocol current state: UP |
The link layer state of the tunnel interface is up. |
IPv6 is enabled |
IPv6 forwarding state on the tunnel interface, disabled in this example. |
link-local address |
Link-local address of the tunnel interface. |
Global unicast address(es) |
Global unicast addresses of the tunnel interface. |
Joined group address(es) |
Multicast addresses of the tunnel interface. |
MTU is 1500 bytes |
Maximum transmission unit of the tunnel interface, 1500 bytes in this example. |
ND reachable time |
Interval during which the neighbor is considered reachable. |
ND retransmit interval |
Neighbor discovery packet retransmission interval. |
Hosts use stateless autoconfig for addresses |
The hosts use the stateless auto-configuration mode to acquire IPv6 addresses. |
InReceives |
All IPv6 packets received by the tunnel interface, including error packets. |
InTooShorts |
Too-short packets received on the tunnel interface, for example, packets smaller than 40 bytes. |
InTruncatedPkts |
Truncated packets received on the tunnel interface. A truncated packet is a packet whose actual length is shorter than the length value carried in the packet. |
InHopLimitExceeds |
IPv6 packets received on the tunnel interface with their hop counts exceeding the hop limit. |
InBadHeaders |
IPv6 packets received on the tunnel interface with an incorrect basic header format. |
InBadOptions |
IPv6 packets received on the tunnel interface with an incorrect extended header format. |
ReasmReqds |
IPv6 fragments received on the tunnel interface. |
ReasmOKs |
IPv6 reassembled packets received on the tunnel interface. |
InFragDrops |
Incoming IPv6 fragments dropped due to packet errors on the tunnel interface. |
InFragTimeouts |
IPv6 fragments received on the tunnel interface and dropped due to staying in the buffer for too long. |
OutFragFails |
Outgoing IPv6 packets that failed to be fragmented on the tunnel interface. |
InUnknownProtos |
Unrecognizable or unsupported IPv6 packets received on the tunnel interface. |
InDelivers |
IPv6 packets received on the tunnel interface, and then submitted to the IPv6 user protocols such as ICMPv6, TCP and UDP. |
OutRequests |
Outgoing local IPv6 packets, that is, packets that the IPv6 user protocols requested IPv6 to send out. |
OutForwDatagrams |
Packets forwarded out the tunnel interface. |
InNoRoutes |
Incoming IPv6 packets dropped on the tunnel interface because no matching route was found for them. |
InTooBigErrors |
IPv6 packets that are dropped on the tunnel interface in forwarding process because their sizes exceed the MTU. |
OutFragOKs |
Outgoing IPv6 packets successfully fragmented on the tunnel interface. |
OutFragCreates |
Outgoing fragments on the tunnel interface. |
InMcastPkts |
IPv6 multicast packets received on the tunnel interface. |
InMcastNotMembers |
Incoming IPv6 multicast packets dropped on the tunnel interface because the tunnel interface is not in the multicast group. |
OutMcastPkts |
Outgoing IPv6 multicast packets on the tunnel interface. |
InAddrErrors |
Incoming IPv6 packets dropped on the tunnel interface because their destination addresses were illegal. |
InDiscards |
Incoming IPv6 packets dropped on the tunnel interface because of exhaustion of resources rather than packet contents. |
OutDiscards |
Outgoing IPv6 packets dropped on the tunnel interface because of exhaustion of resources rather than packet contents. |
# Display summary IPv6 information of tunnel 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 1-4 display ipv6 interface tunnel command output description
Field |
Description |
*down |
The tunnel interface has been administratively shut down, that is, shut down manually with the shut down command. |
(s) |
Spoofing attribute of the tunnel interface. It indicates that an interface whose link layer protocol is displayed as up may have no link present or the link is set up only on demand. |
Interface |
Tunnel interface name. |
Physical |
Tunnel interface’s physical state. |
Protocol |
Tunnel interface’s link layer protocol state. |
IPv6 Address |
Tunnel interface’s IPv6 address. Only the first IPv6 address configured is displayed. If no IPv6 address is configured, Unassigned is displayed here. |
interface loopback
Syntax
interface loopback interface-number
undo interface loopback interface-number
System view
Default Level
2: System level
Parameters
interface-number: Loopback interface number, ranging from 0 to 1023.
Description
Use the interface loopback command to create a Loopback interface or enter Loopback interface view.
Use the undo interface loopback command to remove a Loopback interface.
Related commands: display interface loopback.
Examples
# Create Loopback 5 interface.
<Sysname> system-view
[Sysname] interface loopback 5
[Sysname-LoopBack5]
interface tunnel
Syntax
interface tunnel number
undo interface tunnel number
View
System view
Default Level
2: System level
Parameters
number: Tunnel interface number. The value range varies by devices. The actual number of tunnels that can be created depends on the total number of tunnel interfaces and the system memory.
Description
Use the interface tunnel command to create a tunnel interface and enter tunnel interface view. If the specified tunnel interface already exists, you enter its view directly.
Use the undo interface tunnel command to remove a tunnel interface.
By default, no tunnel interface exists on a device.
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, source, destination, tunnel-protocol.
Examples
# Create tunnel interface Tunnel 3.
<Sysname> system-view
[Sysname] interface tunnel 3
[Sysname-Tunnel3]
interface null
Syntax
interface null 0
System view
Default Level
2: System level
Parameters
0: Specifies the null interface number.
Description
Use the interface null command to enter null interface view.
A device has only one null interface, the Null 0 interface. Null 0 interface is always up and cannot be removed.
Related commands: display interface null.
Examples
# Enter Null 0 interface view.
<Sysname> system-view
[Sysname] interface null 0
[Sysname-NULL0]
mtu (tunnel interface view)
Syntax
mtu mtu-size
undo mtu
View
Tunnel interface view
Default Level
2: System level
Parameters
mtu-size: MTU size (in bytes) of a tunnel interface. The value range for this argument is 100 to 1580.
Description
Use the mtu command to set the MTU of a tunnel interface.
Use the undo mtu command to restore the default.
Examples
# Set the MTU of tunnel interface Tunnel 3 to 1000 bytes.
<Sysname> system-view
[Sysname] interface tunnel 3
[Sysname-Tunnel3] mtu 1000
reset counters interface
Syntax
reset counters interface [ interface-type [ interface-number ]
View
User view
Default Level
2: System level
Parameters
interface-type: Logical interface type.
interface-number: Logical interface number.
Description
Use the reset counters interface command to clear the statistics of a logical interface.
Before collecting traffic statistics within a specific period of time on a logical interface, you need to clear the existing statistics.
l If neither interface type nor interface number is specified, this command clears the statistics of all the interfaces.
l If only the interface type is specified, this command clears the statistics of the interfaces that are of the specified interface type.
l If both the interface type and interface number are specified, this command clears the statistics of the specified interface.
Examples
# Clear the statistics of tunnel interface Tunnel 3.
<Sysname> reset counters interface tunnel 3
shutdown
Syntax
shutdown
undo shutdown
View
Loopback interface view, tunnel interface view
Default Level
2: System level
Parameters
None
Description
Use the shutdown command to shut down the current loopback interface or tunnel interface.
Use the undo shutdown command to bring up the current loopback interface or tunnel interface.
By default, a loopback interface is up, but a tunnel interface is down.
Examples
# Shut down loopback interface Loopback 1.
<Sysname> system-view
[Sysname] interface loopback 1
[Sysname-Loopback1] shutdown
# Shut down tunnel interface Tunnel 1.
<Sysname> system-view
[Sysname] interface tunnel 1
[Sysname-Tunnel1] shutdown
service slot
Syntax
service slot slot-number
undo service slot
View
Tunnel interface view
Default Level
2: System level
Parameters
slot-number: Slot number of a card. The value range for this argument varies with device models.
Description
Use the service slot command to specify the service processing card used to forward traffic of the current tunnel interface.
Use the undo service slot command to restore the default.
By default, no service processing card is specified for a tunnel interface.
Note that:
l In case you do not use the service slot command to specify the service processing card used to forward traffic for the current tunnel interface, the corresponding GRE, IPv4 over IPv4, or IPv4 over IPv6 tunnel automatically selects a service processing card for the tunnel interface. If the configured source interface is a virtual interface (loopback or VT interface for example), or no source interface is specified and the outgoing interface of the route to the destination address is a virtual interface, the corresponding GRE, IPv4 over IPv4, or IPv4 over IPv6 tunnel selects the main control board as the service processing card for the tunnel interface. To avoid overload on the main control board, you are recommended to use the service slot command in tunnel interface view to specify the service processing card used to forward traffic for the current tunnel interface.
l If the service processing card of a tunnel interface is pulled out, traffic of the tunnel interface will fail to be forwarded even if the tunnel is up. After you reinsert the service processing card, traffic of the tunnel interface will still be forwarded on the card.
Do not configure the service processing card of a tunnel interface as the current main control board, because doing that may cause system anomalies.
Examples
# Assign the card in slot 2 as the service processing card for Tunnel 200.
<Sysname> system-view
[Sysname] interface tunnel 200
[Sysname-Tunnel200] service slot 2
tunnel-protocol
Syntax
tunnel-protocol { gre [ ipv6 ] | ipv4-ipv4 | ipv4-ipv6 | ipv6-ipv4 [ 6to4 | auto-tunnel | isatap ] | ipv6-ipv6 | mpls te }
undo tunnel-protocol
View
Tunnel interface view
Default Level
2: System level
Parameters
gre: Indicates GRE over IPv6 tunnel mode.
ipv4-ipv4: Indicates IPv4 over IPv4 tunnel mode.
ipv4-ipv6: Indicates IPv4 over IPv6 tunnel mode.
ipv6-ipv4: Indicates IPv6 over IPv4 tunnel mode.
ipv6-ipv4 6to4: Indicates IPv6 over IPv4 6to4 tunnel mode.
ipv6-ipv4 auto-tunnel: Indicates IPv6 over IPv4 auto-tunnel mode.
ipv6-ipv4 isatap: Indicates IPv6 over IPv4 ISATAP tunnel mode.
ipv6-ipv6: Indicates IPv6 over IPv6 tunnel mode.
mpls te: Indicates MPLS TE mode.
Description
Use the tunnel-protocol command to configure the tunnel mode of the current tunnel interface.
Use the undo tunnel-protocol command to restore the default.
By default, the tunnel mode of tunnel interfaces is GRE.
Note that:
l You can choose a tunnel mode according to the network topology and application type for the tunnel to encapsulate packets appropriately. When doing that, make sure that the same tunnel mode is configured on the two ends of a tunnel. Otherwise, packets will fail to pass through the tunnel.
l You can create only one auto tunnel at a tunnel starting point.
For more information about the MPLS TE mode, refer to MPLS TE Configuration in the MPLS Volume.
Examples
# Set the tunnel mode of tunnel interface Tunnel 2 to IPv4 over IPv4.
<Sysname> system-view
[Sysname] interface tunnel 2
[Sysname-Tunnel2] tunnel-protocol ipv4-ipv4