04-Loopback Interface and Null Interface Commands
Chapters Download (42.17 KB)
Table of Contents
1 Logical Interface Configuration Commands
Logical Interface Configuration Commands
Syntax
description text
undo description
View
Loopback 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 loopback interface Loopback 1 as loopback1.
<Sysname> system-view
[Sysname] interface loopback 1
[Sysname- loopback1] description loopback1
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 interface-number argument, this command will display the information about all the existing Loopback interfaces.
Related commands: interface loopback.
Examples
# Display 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 clearing of counters: Never
Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 drops
0 packets output, 0 bytes, 0 drops
Table 1-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 clearing of counters |
Time when statistics on the logical interface were last cleared |
Last 300 seconds input: 0 bytes/sec 0 bits/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 bits/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 |
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 display 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
# Display information about null interface Null 0.
<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 in the display interface null command output.
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 63.
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]
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]
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/subinterface.
Before collecting traffic statistics within a specific period of time on a logical interface, you need to clear the existing statistics.
l If neither the interface type nor the interface number is specified, this command clears the statistics on all interfaces in the system.
l If only the interface type is specified, this command clears the statistics on logical interfaces of the specified interface type.
l If both the interface type and interface number are specified, this command clears the statistics on the specified logical interface.
Examples
# Clear the statistics of Loopback interface Loopback 5.
<Sysname> reset counters interface loopback 5
Syntax
shutdown
undo shutdown
View
Loopback interface view
Default Level
2: System level
Parameters
None
Description
Use the shutdown command to shut down the current loopback interface.
Use the undo shutdown command to bring up the current loopback interface.
By default, a loopback interface is up.
Examples
# Shut down loopback interface Loopback 1.
<Sysname> system-view
[Sysname] interface loopback 1
[Sysname-Loopback1] shutdown