- Table of Contents
-
- 02-Layer 2-LAN Switching Command Reference
- 00-Preface
- 01-Ethernet interface configuration commands
- 02-Loopback and null interface configuration commands
- 03-Bulk interface configuration commands
- 04-MAC address table configuration commands
- 05-Ethernet link aggregation configuration commands
- 06-Port isolation configuration commands
- 07-Spanning tree configuration commands
- 08-BPDU tunneling configuration commands
- 09-VLAN configuration commands
- 10-GVRP configuration commands
- 11-LLDP configuration commands
- 12-Service loopback group configuration commands
- 13-MVRP commands
- Related Documents
-
Title | Size | Download |
---|---|---|
01-Ethernet interface configuration commands | 233.46 KB |
Ethernet interface configuration commands
General Ethernet interface configuration commands
Layer 2 Ethernet interface configuration commands
loopback-detection control enable
loopback-detection interval-time
loopback-detection multi-port-mode enable
General Ethernet interface configuration commands
default
Use default to restore the default settings for an Ethernet interface.
Syntax
default
Views
Ethernet interface view
Default command level
2: System level
Usage guidelines
|
CAUTION: The default command might interrupt ongoing network services. Make sure you are fully aware of the impacts of this command when you use it in a live network. |
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 instructions to resolve the problem.
Examples
# Restore the default settings for interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] default
This command will restore the default settings. Continue? [Y/N]:y
description
Use description to change the description of the interface.
Use undo description to restore the default.
Syntax
description text
undo description
Default
The default description of an interface is the interface name plus Interface. For example, GigabitEthernet 1/0/1 Interface.
Views
Ethernet interface view
Default command level
2: System level
Parameters
text: Specifies the interface description, a string of 1 to 80 characters. The string can include case-sensitive letters, digits, special characters such as tilde (~), exclamation point (!), at sign (@), pound sign (#), dollar sign ($), percent sign (%), caret (^), ampersand sign (&), asterisk (*), left brace({), right brace (}), left parenthesis ((), right parenthesis ()), left bracket ([), right bracket (]), left angle bracket (<), right angle bracket (>), hyphen (-), underscore(_), plus sign (+), equal sign (=), vertical bar (|), back slash (\), colon (:), semi-colon (;), quotation marks ("), apostrophe ('), comma (,), dot (.), and slash (/), spaces, and other Unicode characters and symbols.
When you specify a description, follow these guidelines:
· Each Unicode character takes the space of two regular characters.
· To use Unicode characters or symbols in an interface description, install the specific input method editor and log in to the device through remote login software that supports the character type.
· 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 in half. This might result in garbled characters at the end of a line.
Examples
# Change the description of interface GigabitEthernet 1/0/1 to lanswitch-interface.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] description lanswitch-interface
display interface
display counters
Use display counters to display traffic statistics for interfaces.
Syntax
display counters { inbound | outbound } interface [ interface-type ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
inbound: Displays inbound traffic statistics.
outbound: Displays outbound traffic statistics.
interface-type: Specifies an interface type.
|: 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.
Usage guidelines
If an interface type is specified, this command displays traffic statistics for all interfaces of the specified type.
If no interface type is specified, this command displays traffic statistics for all interfaces that have traffic counters.
Examples
# Display inbound traffic statistics for all GigabitEthernet interfaces.
<Sysname> display counters inbound interface gigabitethernet
Interface Total(pkts) Broadcast(pkts) Multicast(pkts) Err(pkts)
Interface Total(pkts) Broadcast(pkts) Multicast(pkts) Err(pkts)
GE1/0/1 7134 1803 2824 0
GE1/0/2 0 0 0 0
GE1/0/3 0 0 0 0
GE1/0/4 0 0 0 0
GE1/0/5 0 0 0 0
GE1/0/6 0 0 0 0
GE1/0/7 0 0 0 0
GE1/0/8 0 0 0 0
GE1/0/9 0 0 0 0
GE1/0/10 0 0 0 0
GE1/0/11 0 0 0 0
GE1/0/12 0 0 0 0
GE1/0/13 0 0 0 0
GE1/0/14 0 0 0 0
GE1/0/15 0 0 0 0
GE1/0/16 0 0 0 0
GE1/0/17 0 0 0 0
GE1/0/18 0 0 0 0
GE1/0/19 0 0 0 0
GE1/0/20 0 0 0 0
GE1/0/21 0 0 0 0
GE1/0/22 0 0 0 0
GE1/0/23 0 0 0 0
GE1/0/24 0 0 0 0
GE1/0/33 0 0 0 0
Overflow: more than 14 decimal digits(7 digits for column "Err").
--: not supported.
Table 1 Command output
Field |
Description |
Interface |
Abbreviated interface name. |
Total (pkts) |
Total number of packets received or sent through the interface. |
Broadcast (pkts) |
Total number of broadcast packets received or sent through the interface. |
Multicast (pkts) |
Total number of multicast packets received or sent through the interface. |
Err (pkts) |
Total number of error packets received or sent through the interface. |
Overflow: more than 14 decimal digits(7 digits for column "Err"). |
The command displays Overflow if any of the following applies: · The data length of an error statistic is greater than 7 decimal digits. · The data length of a non-error statistic is greater than 14 decimal digits. |
--: not supported. |
The statistical item is not supported. |
display counters rate
Use display counters rate to display traffic rate statistics over the last statistics polling interval.
Syntax
display counters rate { inbound | outbound } interface [ interface-type ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
inbound: Displays inbound traffic rate statistics.
outbound: Displays outbound traffic rate statistics.
interface-type: Specifies an interface type.
|: 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.
Usage guidelines
The statistics cover only interfaces in up state. If an interface type is specified, the command displays traffic rate statistics for all up interfaces of the specified type. If no interface type is specified, the command displays traffic rate statistics for all up interfaces that have traffic counters.
You can use the flow-interval command to set the statistics polling interval, which is five minutes by default.
Examples
# Display the inbound traffic rate statistics for all GigabitEthernet interfaces.
<Sysname> display counters rate inbound interface gigabitethernet
Interface Total(pkts/sec) Broadcast(pkts/sec) Multicast(pkts/sec)
GE1/0/1 200 100 100
GE1/0/2 300 200 100
GE1/0/3 300 200 100
Overflow: more than 14 decimal digits.
--: not supported.
Table 2 Command output
Field |
Description |
Interface |
Abbreviated interface name. |
Total (pkts/sec) |
Average rate (in pps) of receiving or sending packets during the statistics polling interval. |
Broadcast (pkts/sec) |
Average rate (in pps) of receiving or sending broadcast packets during the statistics polling interval. |
Multicast (pkts/sec) |
Average rate (in pps) of receiving or sending multicast packets during the statistics polling interval. |
Overflow: more than 14 decimal digits. |
The command displays Overflow if any of the following applies: · The data length of an error statistic is greater than 7 decimal digits. · The data length of a non-error statistic is greater than 14 decimal digits. |
--: not supported. |
The statistical item is not supported. |
flow-interval
display interface
Use display interface to display Ethernet interface information.
Syntax
display interface [ interface-type ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ]
display interface interface-type interface-number [ brief ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface-type: Specifies an interface type.
interface-number: Specifies an interface number.
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.
Usage guidelines
If no interface type is specified, this command displays information about all interfaces.
If an interface type is specified but no interface number is specified, this command displays information about all interfaces of the specified type.
Examples
# Display detailed information about Layer 2 interface GigabitEthernet 1/0/1.
<Sysname> display interface gigabitethernet 1/0/1
GigabitEthernet1/0/1 current state: DOWN
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 00e0-fc00-5826
Description: GigabitEthernet1/0/1 Interface
Loopback is not set
Media type is twisted pair
Port hardware type is 1000_BASE_T
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
The Maximum Frame Length is 10000
Broadcast MAX-ratio: 100%
Unicast MAX-ratio: 100%
Multicast MAX-ratio: 100%
Allow jumbo frame to pass
PVID: 1
Mdi type: auto
Port link-type: access
Tagged VLAN ID : none
Untagged VLAN ID : 1
Port priority: 0
Last clearing of counters: Never
Peak value of input: 0 bytes/sec, at 2013-04-26 13:25:19
Peak value of output: 0 bytes/sec, at 2013-04-26 13:25:19
Last 300 seconds input: 0 packets/sec 0 bytes/sec -%
Last 300 seconds output: 0 packets/sec 0 bytes/sec -%
Input (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Input (normal): 0 packets, - bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Input: 0 input errors, 0 runts, 0 giants, 0 throttles
0 CRC, 0 frame, - overruns, 0 aborts
- ignored, - parity errors
Output (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output (normal): 0 packets, - bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
0 lost carrier, - no carrier
Field |
Description |
GigabitEthernet1/0/1 current state |
Physical state of the Ethernet interface. For more information, see Table 4. |
IP Packet Frame Type |
Ethernet framing format on the interface. |
Loopback |
Loopback testing status of the interface. |
100Mbps-speed mode |
The interface is operating at 100 Mbps. This field displays Unknown-speed mode when the interface is disconnected from the peer that it will automatically negotiate a port speed with. |
half-duplex mode |
The interface is operating in half-duplex mode. This field displays link duplex type is force link when the duplex mode of the interface is fixed and not configurable. |
Link speed type is autonegotiation |
The interface will negotiate a speed with its peer. |
link duplex type is autonegotiation |
The interface will negotiate a duplex mode with its peer. |
The Maximum Frame Length |
Maximum Ethernet frame length allowed on the interface. |
Broadcast MAX-ratio |
Broadcast suppression threshold as a percentage of the maximum interface rate. When the threshold is exceeded, the interface drops broadcast packets. |
Unicast MAX-ratio |
Unknown unicast suppression threshold as a percentage of the maximum interface rate. When the threshold is exceeded, the interface drops unknown unicast packets. |
Multicast MAX-ratio |
Multicast suppression threshold as a percentage of the maximum interface rate. When the threshold is exceeded, the interface drops multicast packets. |
Allow jumbo frame to pass |
Jumbo frames are allowed to pass through the interface. |
PVID |
Port VLAN ID. |
Mdi type |
Cable type. |
Port link-type |
Link type of the interface: · access. · trunk. · hybrid. |
Tagged VLAN ID |
VLANs for which the interface sends packets without removing VLAN tags. |
Untagged VLAN ID |
VLANs for which the interface sends packets after removing VLAN tags. |
Last clearing of counters: Never |
Time when the reset counters interface command was last used to clear statistics on the interface. Never indicates that the reset counters interface command was never used after the device was started. |
Peak value of input |
Peak value of inbound traffic, in Bps. |
Peak value of output |
Peak value of outbound traffic, in Bps. |
Last 300 seconds input: 0 packets/sec 0 bytes/sec -% Last 300 seconds output: 0 packets/sec 0 bytes/sec -% |
Average rate of input and output traffic in the last 300 seconds, in pps and Bps. The statistics polling interval, 300 seconds in this example, can be configured by using the flow-interval command. |
Input (total): 0 packets, 0 bytes 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses |
Inbound traffic statistics (in packets and bytes) for the interface. All inbound normal and abnormal packets (including unicast, broadcast, and multicast), and pause frames were counted. |
Input (normal): 0 packets, - bytes 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses |
Inbound normal traffic (including unicast, broadcast, and multicast) and pause frame statistics (in packets and bytes) for the interface. |
input errors |
Inbound packets with errors. |
runts |
Inbound frames that are shorter than 64 bytes, that are in correct format, and that contain valid CRCs. |
giants |
Inbound frames larger than the maximum frame length supported on the interface. · For an Ethernet interface that does not permit jumbo frames, giants refer to frames larger than 1536 bytes (without VLAN tags) or 1540 bytes (with VLAN tags). · For an Ethernet interface that permits jumbo frames, giants refer to frames larger than the maximum size of Ethernet frames that are allowed to pass through, which is configured when you configure jumbo frame support on the interface. |
- throttles |
Number of times that the port shut down because of buffer or CPU overload. |
CRC |
Total number of inbound frames that had a normal length, but contained checksum errors. |
frame |
Total number of inbound frames that contained checksum errors and a non-integer number of bytes. |
- overruns |
Number of packets dropped because the input rate of the port exceeded the queuing capability. |
aborts |
Total number of illegal inbound packets: · Fragment frames—CRC error frames shorter than 64 bytes. The length can be an integer or non-integer value. · Jabber frames—CRC error frames greater than the maximum frame length supported on the Ethernet interface (with an integer or non-integer length). For an Ethernet interface that does not permit jumbo frames, jabber frames refer to CRC error frames greater than 1518 bytes (without VLAN tags) or 1522 bytes (with VLAN tags). For an Ethernet interface that permits jumbo frames, jabber frames refer to CRC error frames greater than the maximum size of Ethernet frames that are allowed to pass through the interface (which is configured when you configure jumbo frame support on the interface). · Symbol error frames—Frames that contained at least one undefined symbol. · Unknown operation code frames—Non-pause MAC control frames. · Length error frames—Frames whose 802.3 length fields did not accord with the actual frame length (46 to 1500 bytes). |
ignored |
Number of inbound frames dropped because the receive buffer of the port ran low. |
- parity errors |
Total number of frames with parity errors. |
Output (total): 0 packets, 0 bytes 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses |
Outbound traffic statistics (in packets and bytes) for the port. All outbound normal and abnormal packets (including unicast, broadcast, and multicast), and pause frames were counted. |
Output (normal): 0 packets, - bytes 0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses |
Outbound normal traffic (including unicast, broadcast, and multicast) and pause frame statistics (in packets and bytes) for the interface. |
output errors |
Outbound packets with errors. |
- underruns |
Number of packets dropped because the output rate of the interface exceeded the output queuing capability. This is a low-probability hardware anomaly. |
- buffer failures |
Number of packets dropped because the transmit buffer of the interface ran low. |
aborts |
Number of packets that failed to be transmitted, for example, because of Ethernet collisions. |
deferred |
Number of frames that the interface deferred to transmit because of detected collisions. |
collisions |
Number of frames that the interface stopped transmitting because Ethernet collisions were detected during transmission. |
late collisions |
Number of frames that the interface deferred to transmit after transmitting their first 512 bits, because of detected collisions. |
lost carrier |
Number of carrier losses during transmission. This counter applies to serial WAN interfaces. |
- no carrier |
Number of times that the port failed to detect the carrier when attempting to send frames. This counter applies to serial WAN interfaces. |
|
NOTE: If an output field is not available, a hyphen (-) is displayed. |
Table 4 Description on the possible physical states of a Layer 2 Ethernet interface
Field |
Description |
UP |
The interface is physically up. |
DOWN |
The interface is physically down, because no physical connection exists (possibly because the network cable is disconnected or faulty). |
DOWN ( Administratively ) |
The interface is physically down because it was shut down with the shutdown command. To restore its physical state, use the undo shutdown command. |
DOWN ( Link-Aggregation interface down ) |
The interface is physically down, because the aggregate interface corresponding to the aggregation group to which it belongs was shut down with the shutdown command. |
DOWN ( OAM connection failure ) |
The interface is physically down, because an OAM connection failed to be established on it or the OAM connection is disconnected. |
DOWN ( DLDP connection failure ) |
The interface is physically down, because a DLDP connection failed to be established on it or the DLDP connection is disconnected. |
DOWN ( Loopback detection-protected ) |
The interface is shut down because a loop is detected on it. |
DOWN ( BPDU-protected ) |
The interface is shut down by the BPDU guard function. |
DOWN ( Monitor-Link uplink down ) |
The interface is physically down because the uplink of the monitor link group to which it belongs is down. |
# Display brief information about all interfaces.
<Sysname> display interface brief
Link: ADM - administratively down; Stby - standby
Speed or Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
BAGG1 UP 40G(a) F(a) A 1
GE1/0/1 UP 100M(a) F(a) A 1
GE1/0/2 DOWN auto A A 1
GE1/0/3 DOWN auto A A 1
GE1/0/4 DOWN auto A A 1
GE1/0/5 DOWN auto A A 1
GE1/0/6 DOWN auto A A 1
GE1/0/7 DOWN auto A A 1
GE1/0/8 DOWN auto A A 1
GE1/0/9 DOWN auto A A 1
GE1/0/10 DOWN auto A A 1
GE1/0/11 DOWN auto A A 1
GE1/0/12 DOWN auto A A 1
GE1/0/13 DOWN auto A A 1
GE1/0/14 DOWN auto A A 1
GE1/0/15 DOWN auto A A 1
GE1/0/16 DOWN auto A A 1
GE1/0/17 DOWN auto A A 1
GE1/0/18 DOWN auto A A 1
GE1/0/19 DOWN auto A A 1
GE1/0/20 DOWN auto A A 1
GE1/0/21 DOWN auto A A 1
GE1/0/22 DOWN auto A A 1
GE1/0/23 DOWN auto A A 1
GE1/0/24 DOWN auto A A 1
GE1/0/33 ADM auto A A 1
XGE1/0/25 DOWN auto A A 1
XGE1/0/26 DOWN auto A A 1
XGE1/0/27 DOWN auto A A 1
XGE1/0/28 DOWN auto A A 1
XGE1/0/29 UP 10G(a) F(a) A 1
XGE1/0/30 UP 10G(a) F(a) A 1
XGE1/0/31 UP 10G(a) F(a) A 1
XGE1/0/32 UP 10G(a) F(a) A 1
# Filter the brief interface information to display the line starting with the (s) string and all subsequent lines.
<Sysname> display interface brief | begin (s)
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Main IP Description
NULL0 UP UP(s) --
Vlan1 UP UP 192.168.11.55
The brief information of interface(s) under bridge mode:
Link: ADM - administratively down; Stby - standby
Speed or Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
BAGG1 UP 40G(a) F(a) A 1
GE1/0/1 UP 100M(a) F(a) A 1
GE1/0/2 DOWN auto A A 1
GE1/0/3 DOWN auto A A 1
GE1/0/4 DOWN auto A A 1
GE1/0/5 DOWN auto A A 1
GE1/0/6 DOWN auto A A 1
GE1/0/7 DOWN auto A A 1
GE1/0/8 DOWN auto A A 1
GE1/0/9 DOWN auto A A 1
GE1/0/10 DOWN auto A A 1
GE1/0/11 DOWN auto A A 1
GE1/0/12 DOWN auto A A 1
GE1/0/13 DOWN auto A A 1
GE1/0/14 DOWN auto A A 1
GE1/0/15 DOWN auto A A 1
GE1/0/16 DOWN auto A A 1
GE1/0/17 DOWN auto A A 1
GE1/0/18 DOWN auto A A 1
GE1/0/19 DOWN auto A A 1
GE1/0/20 DOWN auto A A 1
GE1/0/21 DOWN auto A A 1
GE1/0/22 DOWN auto A A 1
GE1/0/23 DOWN auto A A 1
GE1/0/24 DOWN auto A A 1
GE1/0/33 ADM auto A A 1
XGE1/0/25 DOWN auto A A 1
XGE1/0/26 DOWN auto A A 1
XGE1/0/27 DOWN auto A A 1
XGE1/0/28 DOWN auto A A 1
XGE1/0/29 UP 10G(a) F(a) A 1
XGE1/0/30 UP 10G(a) F(a) A 1
XGE1/0/31 UP 10G(a) F(a) A 1
XGE1/0/32 UP 10G(a) F(a) A 1
# Display information about interfaces in the down state and the relevant causes.
<Sysname> display interface brief down
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Interface Link Cause
Vlan10 DOWN Not connected
The brief information of interface(s) under bridge mode:
Link: ADM - administratively down; Stby - standby
Interface Link Cause
GE1/0/2 DOWN Not connected
GE1/0/3 DOWN Not connected
GE1/0/4 DOWN Not connected
GE1/0/5 DOWN Not connected
GE1/0/6 DOWN Not connected
GE1/0/7 DOWN Not connected
GE1/0/8 DOWN Not connected
GE1/0/9 DOWN Not connected
GE1/0/10 DOWN Not connected
GE1/0/11 DOWN Not connected
GE1/0/12 DOWN Not connected
GE1/0/13 DOWN Not connected
GE1/0/14 DOWN Not connected
GE1/0/15 DOWN Not connected
GE1/0/16 DOWN Not connected
GE1/0/17 DOWN Not connected
GE1/0/18 DOWN Not connected
GE1/0/19 DOWN Not connected
GE1/0/20 DOWN Not connected
GE1/0/21 DOWN Not connected
GE1/0/22 DOWN Not connected
GE1/0/23 DOWN Not connected
GE1/0/24 DOWN Not connected
GE1/0/33 ADM Administratively
XGE1/0/25 DOWN Not connected
XGE1/0/26 DOWN Not connected
XGE1/0/27 DOWN Not connected
XGE1/0/28 DOWN Not connected
Table 5 Command output
Field |
Description |
The brief information of interface(s) under route mode: |
The command displays brief information about Layer 3 interfaces. |
Link: ADM - administratively down; Stby - standby |
Link layer state of the interface: · ADM—The interface has been shut down by the network administrator. To recover its physical layer state, use the undo shutdown command. · Stby—The interface is a standby interface. |
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 letter "s" in parentheses). This attribute is typical of interface Null 0 and loopback interfaces. |
Interface |
Interface name. |
Link |
Physical link state of the interface: · UP—The link is up. · DOWN—The link is physically down. · ADM—The link has been administratively shut down. To recover its physical state, use the undo shutdown command. · Stby—The interface is a standby interface. |
Protocol |
Protocol connection state of the interface: · UP. · DOWN. · UP(s). |
Description |
Interface description. Information displayed in this field is restricted by space. To view the complete interface description, use the display interface command without specifying the brief keyword. |
The brief information of interface(s) under bridge mode: |
Brief information about Layer 2 interfaces. |
Speed or Duplex: (a)/A - auto; H - half; F - full |
If the speed of an interface is automatically negotiated, its speed attribute includes the autonegotiation flag, letter a in parentheses. If the duplex mode of an interface is automatically negotiated, its duplex mode attribute includes the following options: · (a)/A—Auto negotiation. · H—Half negotiation. · F—Full negotiation. |
Type: A - access; T - trunk; H - hybrid |
Link type options for Ethernet interfaces. |
Speed |
Interface rate, in bps. |
Duplex |
Duplex mode of the interface: · A—Auto negotiation. · F—Full duplex. · F(a)—Auto-negotiated full duplex. · H—Half duplex. · H(a)—Auto-negotiated half duplex. |
Type |
Link type of the interface: · A—Access. · H—Hybrid. · T—Trunk. |
PVID |
Port VLAN ID. |
Cause |
Reasons for the physical state of an interface to be DOWN. For more information, see Table 6. |
Table 6 Reasons for the physical state of an interface to be DOWN
Field |
Description |
Not connected |
No physical connection exists (possibly because the network cable is disconnected or faulty). |
Administratively |
The port was shut down with the shutdown command. To restore the physical state of the interface, use the undo shutdown command. |
Link-Aggregation interface down |
The aggregate interface corresponding to the aggregation group to which the interface belongs was shut down with the shutdown command. |
OAM connection failure |
The OAM connection failed (possibly because the connection failed to be established or the connection is disconnected). |
DLDP connection failure |
The DLDP connection failed (possibly because the connection failed to be established or the connection is disconnected). |
Loopback detection-protected |
The interface is shut down because a loop was detected on it. |
BPDU-protected |
The interface is shut down by the BPDU guard function. |
Monitor-Link uplink down |
The uplink of the monitor link group to which the interface belongs is down. |
interface
display packet-drop interface
Use display packet-drop interface to display information about packets dropped on an interface or multiple interfaces.
Syntax
display packet-drop interface [ interface-type [ interface-number ] ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface-type: Specifies an interface type.
interface-number: Specifies an interface number.
|: 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.
Usage guidelines
If you do not specify an interface type, this command displays information about dropped packets on all interfaces on the device.
If you only specify an interface type, this command displays information about dropped packets on the specified type of interface.
If you specify both the interface type and interface number, this command displays information about dropped packets on the specified interface.
Examples
# Display information about dropped packets on GigabitEthernet 1/0/1.
<Sysname> display packet-drop interface gigabitethernet 1/0/1
GigabitEthernet1/0/1:
Packets dropped by GBP full or insufficient bandwidth: 301
Packets dropped by FFP: 261
Packets dropped by STP non-forwarding state: 321
Field |
Description |
Packets dropped by GBP full or insufficient bandwidth |
Packets that are dropped because of insufficient buffer or bandwidth.. |
Packets dropped by FFP |
Packets that are filtered out. |
Packets dropped by STP non-forwarding state |
Packets that are dropped because STP is in the non-forwarding state. |
display packet-drop summary
Use display packet-drop summary to display summary information about dropped packets on all interfaces.
Syntax
display packet-drop summary [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: 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.
Examples
# Display information about dropped packets on all interfaces.
<Sysname> display packet-drop summary
All interfaces:
Packets dropped by GBP full or insufficient bandwidth: 301
Packets dropped by FFP: 261
Packets dropped by STP non-forwarding state: 321
For the description of some fields in the output, see Table 7.
duplex
Use duplex to set the duplex mode for an Ethernet interface.
Use undo duplex to restore the default duplex mode of the Ethernet interface.
Syntax
duplex { auto | full | half }
undo duplex
Default
Ethernet interfaces operate in autonegotiation mode.
Views
Ethernet interface view
Default command level
2: System level
Parameters
auto: Sets the interface to operate in autonegotiation mode.
full: Sets the interface to operate in full duplex mode.
half: Sets the interface to operate in half-duplex mode.
Usage guidelines
Fiber ports and GE copper ports do not support the half keyword.
Examples
# Configure interface GigabitEthernet 1/0/1 to operate in full duplex mode.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] duplex full
flow-control
Use flow-control to enable TxRx mode generic flow control on an Ethernet interface.
Use undo flow-control to disable generic flow control on the Ethernet interface.
Syntax
flow-control
undo flow-control
Default
Generic flow control on an Ethernet interface is disabled.
Views
Ethernet interface view
Default command level
2: System level
Usage guidelines
TxRx mode flow control allows an Ethernet interface to receive common pause frames from its peer, and send common pause frames to notify its peer of congestion.
With the flow-control command configured, an interface can both send and receive flow control frames:
· When congested, the interface sends a flow control frame to its peer.
· Upon receiving a flow control frame from its peer, the interface suspends sending packets.
To implement flow control on a link, enable the generic flow control function at both ends of the link.
Examples
# Enable TxRx mode generic flow control on the interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] flow-control
flow-control receive enable
Use flow-control receive enable to enable Rx mode generic flow control on an Ethernet port.
Use undo flow-control to disable generic flow control on the Ethernet interface.
Syntax
flow-control receive enable
undo flow-control
Default
Rx flow control is disabled on Ethernet interfaces.
Views
Ethernet interface view
Default command level
2: System level
Usage guidelines
Rx mode generic flow control allows an Ethernet interface to receive and process common pause frames from its peer. The interface does not send common pause frames when it is congested.
With the flow-control receive enable command configured, an interface can receive, but not send, flow control frames. When the interface receives a flow control frame from its peer, it suspends sending packets to the peer. When traffic congestion occurs on the interface, it cannot send flow control frames to its peer.
To handle unidirectional traffic congestion on a link, configure the flow-control receive enable command at one end, and the flow-control command at the other. To enable both ends of the link to handle traffic congestion, configure the flow-control command at both ends.
Examples
# Enable Rx mode generic flow control on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] flow-control receive enable
flow-interval
Use flow-interval to set the interface statistics polling interval.
Use undo flow-interval to restore the default interval.
Syntax
flow-interval interval
undo flow-interval
Default
The interface statistics polling interval is 300 seconds.
Views
Ethernet interface view
Default command level
2: System level
Parameters
interval: Sets the statistics polling interval, in seconds. It ranges from 5 to 300 and must be a multiple of 5.
Examples
# Set the statistics polling interval to 100 seconds on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] flow-interval 100
interface
Use interface to enter interface view.
Syntax
interface interface-type interface-number
Views
System view
Default command level
2: System level
Parameters
interface-type: Specifies an interface type.
interface-number: Specifies an interface number.
Examples
# Enter GigabitEthernet 1/0/1 interface view.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1]
jumboframe enable
Use jumboframe enable to allow jumbo frames within the specified length to pass through an Ethernet interface, a group of Ethernet interfaces, or all Ethernet interfaces.
Use undo jumboframe enable to prevent jumbo frames from passing through an Ethernet interface, a group of Ethernet interfaces, or all Ethernet interfaces.
Syntax
jumboframe enable [ value ]
undo jumboframe enable
Default
The device allows jumbo frames within 10000 bytes to pass through Ethernet interfaces.
Views
Ethernet interface view, port group view
Default command level
2: System level
Parameters
value: Sets the maximum size of Ethernet frames that are allowed to pass through. The value argument ranges from 1536 to 10000. If you set the value argument multiple times, the most recent configuration takes effect.
Usage guidelines
In Ethernet interface view, this command applies only to the Ethernet interface.
In port group view, this command applies to the Ethernet interfaces in the port group.
Examples
# Enable jumbo frames to pass through GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] jumboframe enable
link-delay
Use link-delay to set the physical state change suppression interval on an Ethernet interface.
Use undo link-delay to restore the default.
Syntax
link-delay delay-time
undo link-delay
Default
Physical state change suppression is disabled.
Views
Ethernet interface view
Default command level
2: System level
Parameters
delay-time: Sets the physical state change suppression interval on the Ethernet interface, in seconds. The delay-time argument ranges from 2 to 10.
Usage guidelines
This command does not apply to ports administratively shut down (with the shutdown command).
Do not use this command on Ethernet interfaces with RRPP, MSTP, or Smart Link enabled.
Examples
# Enable physical state change suppression on GigabitEthernet 1/0/1, setting the suppression interval to 8 seconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] link-delay 8
link-delay mode up
Use link-delay delay-time mode up to enable an Ethernet interface to suppress link-up events.
Use undo link-delay to restore the default.
Syntax
link-delay delay-time mode up
undo link-delay
Default
Link-up event suppression is disabled.
Views
Ethernet interface view
Default command level
2: System level
Parameters
delay-time: Sets the link-up event suppression interval, in seconds. The delay-time argument ranges from 2 to 10.
Usage guidelines
When the physical link of the interface goes up, the interface suppresses the link-up event and starts a timer. When the timer expires, the physical layer reports the event to the upper layers.
The link-delay mode up command and the link-delay command supersede each other. The command that is configured last takes effect.
Do not configure this command on ports with RRPP, MSTP, or Smart Link enabled.
Examples
# Enable link-up event suppression on GigabitEthernet 1/0/1, setting the suppression interval to 10 seconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] link-delay 10 mode up
loopback
Use loopback to enable loopback testing on an Ethernet interface and display the test result.
Syntax
loopback { external | internal }
Default
Loopback testing is disabled on Ethernet interfaces.
Views
Ethernet interface view
Default command level
2: System level
Parameters
external: Enables external loopback testing for all on-chip functions related to Ethernet interfaces.
internal: Enables internal loopback testing for the hardware of Ethernet interfaces.
Usage guidelines
Enable loopback testing for troubleshooting purposes, such as identifying an Ethernet problem.
During loopback testing, the Ethernet interface operates in full duplex mode. When you disable loopback testing, the port returns to its duplex setting.
Loopback testing is a one-time operation and is not recorded in the configuration file.
Examples
# Enable internal loopback testing on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback internal
reset counters interface
Use reset counters interface to clear the Ethernet interface statistics.
Syntax
reset counters interface [ interface-type [ interface-number ] ]
Views
User view
Default command level
2: System level
Parameters
interface-type: Specifies an interface type.
interface-number: Specifies an interface number.
Usage guidelines
Clear old statistics on the interface before collecting new traffic statistics for a specific period of time.
· If no interface type is specified, this command clears statistics for all interfaces on the device.
· If only the interface type is specified, this command clears statistics for all interfaces of the specified type.
· If both the interface type and number are specified, this command only clears statistics for the specified interface.
Examples
# Clear the statistics of GigabitEthernet 1/0/1.
<Sysname> reset counters interface gigabitethernet 1/0/1
reset packet-drop interface
Use reset packet-drop interface to clear statistics for dropped packets on an interface or multiple interfaces.
Syntax
reset packet-drop interface [ interface-type [ interface-number ] ]
Views
Any view
Default command level
2: System level
Parameters
interface-type: Specify an interface type.
interface-number: Specify an interface number.
Usage guidelines
Clear old statistics for the interface or interfaces before collecting new dropped packet statistics.
If you do not specify an interface type, this command clears dropped packet statistics for all interfaces on the device.
If you only specify an interface type, this command clears dropped packet statistics for all interfaces of the specified type.
If you specify both the interface type and interface number, this command only clears dropped packet statistics for the specified interface.
Examples
# Clear dropped packet statistics for GigabitEthernet 1/0/1.
<Sysname> reset packet-drop interface gigabitethernet 1/0/1
# Clear dropped packet statistics for all interfaces.
<Sysname> reset packet-drop interface
shutdown
Use shutdown to shut down an Ethernet interface.
Use undo shutdown to bring up an Ethernet interface.
Syntax
shutdown
undo shutdown
Default
Ethernet interfaces are up.
Views
Ethernet interface view, port group view
Default command level
2: System level
Usage guidelines
|
CAUTION: After you shut down an Ethernet interface with this command, it cannot forward packets, even if it is physically connected. |
You may need to shut down and then bring up an Ethernet interface to activate configuration changes such as speed or duplex mode changes.
Examples
# Shut down and then bring up GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] shutdown
[Sysname-GigabitEthernet1/0/1] undo shutdown
# Shut down all member ports in the port group named group1.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] shutdown
speed
Use speed to set the speed of an Ethernet interface.
Use undo speed to restore the default.
Syntax
speed { 10 | 100 | 1000 | 10000 | auto }
undo speed
Views
Ethernet interface view
Default
The default value of this command depends on your interface card model.
Default command level
2: System level
Parameters
10: Sets the interface speed to 10 Mbps.
100: Sets the interface speed to 100 Mbps.
1000: Sets the interface speed to 1000 Mbps.
10000: Sets the interface speed to 10000 Mbps.
auto: Enables the interface to negotiate a speed with its peer.
Usage guidelines
For an Ethernet copper port, use the speed command to set its speed to match the speed of the peer interface.
For a fiber port, use the speed command to set its speed to match the rate of a pluggable transceiver.
GE fiber ports do not support the 10 or 10000 keyword. 10-GE fiber ports do not support the 10, 100, 1000 keyword. GE copper ports do not support the 10000 keyword.
Examples
# Configure GigabitEthernet 1/0/1 to operate at 100 Mbps.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] speed 100
speed auto
Layer 2 Ethernet interface configuration commands
broadcast-suppression
Use broadcast-suppression to set the broadcast suppression threshold on an Ethernet interface, or a group of Ethernet interfaces.
Use undo broadcast-suppression to restore the default broadcast suppression threshold.
Syntax
broadcast-suppression { ratio | pps max-pps | kbps max-kbps }
undo broadcast-suppression
Default
Ethernet interfaces do not suppress broadcast traffic.
Views
Layer 2 Ethernet interface view, port group view
Default command level
2: System level
Parameters
ratio: Sets the broadcast suppression threshold as a percentage of the maximum interface rate. The smaller the percentage, the less broadcast traffic is allowed to be received. This argument ranges from 1 to 100.
pps max-pps: Specifies the maximum number of broadcast packets that the Ethernet interface can receive per second.
The value range of the max-pps argument varies by interface type as follows:
· On a GE port, the value ranges from 1 to 1488100.
· On a 10-GE port, the value ranges from 1 to 14881000.
kbps max-kbps: Specifies the maximum number of kilobits of broadcast traffic that the Ethernet interface can receive per second.
The value range of the max-kbps argument varies by interface type as follows:
· On a GE port, the value ranges from 1 to 1000000.
· On a 10-GE port, the value ranges from 1 to 10000000.
Usage guidelines
In Ethernet interface view, the configuration takes effect only on the interface. In port group view, the configuration takes effect on all the ports in the port group.
When the received broadcast traffic exceeds the broadcast suppression threshold, the interface discards broadcast packets until broadcast traffic drops below the threshold.
To configure two or all of broadcast, multicast, and unknown unicast suppression thresholds on the same port, do not use pps together with kbps or ratio.
If you set different broadcast suppression thresholds in Ethernet interface view or port group view multiple times, the one configured last takes effect.
For a particular type of traffic, configure either storm suppression or storm control, but not both. If both of them are configured, you might fail to achieve the expected storm control effect.
Examples
# Set the broadcast suppression threshold to 20% on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] broadcast-suppression 20
# Set the broadcast suppression threshold to 20% on all ports in the manual port group named group1.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/2
[Sysname-port-group-manual-group1] broadcast-suppression 20
display loopback-detection
Use display loopback-detection to display the status of the loopback detection function.
Syntax
display loopback-detection [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: 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.
Usage guidelines
If loopback detection is enabled, this command also displays the detection interval and all ports in a loop condition.
Examples
# Display information about loopback detection.
<Sysname> display loopback-detection
Loopback detection is running.
Loopback detection is in multi-port mode.
Detection interval is 30 seconds.
No port is detected with loopback.
Table 8 Command output
Field |
Description |
Loopback-detection is in multi-port mode. |
Multi-port loopback detection is enabled. |
Detection interval time is 30 seconds. |
Loopback detection interval is 30 seconds. |
No port is detected with loopback. |
No loops are detected on any port. |
display storm-constrain
Use display storm-constrain to display storm control settings and statistics.
Syntax
display storm-constrain [ broadcast | multicast | unicast ] [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
broadcast: Displays broadcast storm control settings and statistics.
multicast: Displays multicast storm control settings and statistics.
unicast: Displays unknown unicast storm control settings and statistics.
interface interface-type interface-number: Specifies an interface by its type and number with the interface-type interface-number argument.
|: 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.
Usage guidelines
If you specify no argument or keyword, this command displays all storm control settings on all storm control-enabled interfaces.
Examples
# Display the storm control settings on all storm control-enabled ports.
<Sysname> display storm-constrain
Abbreviation: BC - broadcast; MC - multicast; UC - unicast
Flow Statistic Interval: 5(second)
PortName Type LowerLimit UpperLimit CtrMode Status Trap Log SwiNum Unit
--------------------------------------------------------------------------------
GE1/0/2 BC 1500 2000 block normal off off 0 kbps
Table 9 Command output
Field |
Description |
Flow Statistic Interval |
Traffic polling interval of the storm control module. |
PortName |
Abbreviated port name. |
StormType |
Type of traffic subjected to storm control. Options include broadcast, multicast and unknown unicast. |
LowerLimit |
Lower storm control threshold, in pps, kbps, or percentage. |
UpperLimit |
Upper storm control threshold, in pps, kbps, or percentage. |
CtrMode |
Protective action (block or shutdown) to take on the port when the upper threshold is reached. If you have not configured any protective action, N/A is displayed. |
Status |
Packet forwarding status: · Normal—The port is forwarding traffic normally. · Control—The port is in controlled mode. The actual mode depends on the CtrMode setting: ¡ block. ¡ shutdown. |
Trap |
Status of the storm control threshold event trap switch: · On—The port sends threshold event traps. · Off—The port does not send threshold event traps. |
Log |
Status of the storm control threshold event log switch: · On—The port sends threshold event log messages. · Off—The port does not send threshold event log messages. |
SwiNum |
Number of times the forwarding state of the interface changes. When the SwiNum count reaches 65535, it automatically resets. |
loopback-detection action
Use loopback-detection action to configure the action for loop protection on Ethernet interfaces.
Use undo loopback-detection action to restore the default, which varies with device models.
Syntax
loopback-detection action { no-learning | semi-block | shutdown }
undo loopback-detection action
Default
A looped interface does not receive or send packets.
Views
Layer 2 Ethernet interface view, port group view
Default command level
2: System level
Parameters
no-learning: Disables MAC address learning on the interface.
semi-block: Permits only STP BPDUs and stops MAC address learning on the interface.
shutdown: Shuts down the Ethernet interface. To bring up the interface again, use the undo shutdown command.
Usage guidelines
When you change the link type of an Ethernet interface with the port link-type command, the device removes the protective action configured on the interface. For more information about the port link-type command, see Layer 2—LAN Switching Command Reference.
Configure Ethernet interfaces one by one in Ethernet interface view or in bulk in port group view.
Examples
# Configure the access port GigabitEthernet 1/0/1 to shut down when a loop is detected.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
[Sysname-GigabitEthernet1/0/1] loopback-detection action shutdown
# Configure the trunk port GigabitEthernet 1/0/2 to shut down when a loop is detected.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/0/2] port link-type trunk
[Sysname-GigabitEthernet1/0/2] loopback-detection enable
[Sysname-GigabitEthernet1/0/2] loopback-detection control enable
[Sysname-GigabitEthernet1/0/2] loopback-detection action shutdown
loopback-detection control enable
Use loopback-detection control enable to enable loopback detection control on trunk or hybrid ports.
Use undo loopback-detection control enable to restore the default.
Syntax
loopback-detection control enable
undo loopback-detection control enable
Default
Loopback detection control is disabled on trunk and hybrid ports.
Views
Layer 2 Ethernet interface view, port group view
Default command level
2: System level
Usage guidelines
When a hybrid or trunk port detects a loop condition, it sends traps, whether loopback detection control is enabled or not. However, the port performs the protective action that you configure with the loopback-detection action command only after loopback detection control is enabled.
This command is not applicable to access ports.
Examples
# Enable loopback detection control on the trunk port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
[Sysname-GigabitEthernet1/0/1] loopback-detection control enable
loopback-detection enable
Use loopback-detection enable to enable loopback detection globally in system view or on interfaces in Ethernet interface or port group view. To use loopback detection on an Ethernet interface, you must enable the function both globally and on the port.
Use undo loopback-detection enable to disable loopback detection globally or on Ethernet interfaces.
Syntax
loopback-detection enable
undo loopback-detection enable
Default
Loopback detection is disabled on all Ethernet interfaces.
Views
System view, Layer 2 Ethernet interface view, port group view
Default command level
2: System level
Usage guidelines
The undo loopback-detection enable command in system view disables loopback detection on all interfaces.
If an interface receives a packet that it sent out, a loop has occurred. Loops might cause broadcast storms, which degrade network performance. You can enable loopback detection to detect loops on an interface and, if the interface supports the loopback-detection action command, configure the protective action to take (for example, shut down the port) when a loop is detected.
In addition to the configured protective action, the device also performs other actions to alleviate the impact of the loops. For more information, see Table 10.
Table 10 Actions to take upon detection of a loop condition
Port type |
Actions |
|
No protective action is configured |
A protective action is configured |
|
Access port |
· Place the interface in controlled mode. The interface discards all incoming packets, but still forwards outgoing traffic. · Generate traps. · Delete all MAC address entries of the interface. |
· Perform the configured protective action. · Generate traps and log messages. · Delete all MAC address entries of the interface. |
Hybrid or trunk port |
· Generate traps. · If loopback detection control is enabled, set the interface to controlled mode. The interface discards all incoming packets, but still forwards outgoing packets. · Delete all MAC address entries of the interface. |
· Generate traps and log messages. · If loopback detection control is enabled, take the configured protective action on the interface. · Delete all MAC address entries of the interface. |
Examples
# Enable loopback detection on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
loopback-detection control enable
loopback-detection interval-time
Use loopback-detection interval-time to set the loopback detection interval.
Use undo loopback-detection interval-time to restore the default loopback detection interval.
Syntax
loopback-detection interval-time time
undo loopback-detection interval-time
Default
The loopback detection interval is 30 seconds.
Views
System view
Default command level
2: System level
Parameters
time: Specifies the loopback detection interval, ranging from 5 to 300 seconds.
Examples
# Set the loopback detection interval to 10 seconds.
<Sysname> system-view
[Sysname] loopback-detection interval-time 10
display loopback-detection
loopback-detection multi-port-mode enable
Use loopback-detection multi-port-mode enable to enable multi-port loopback detection.
Use undo loopback-detection multi-port-mode enable to restore the default.
Syntax
loopback-detection multi-port-mode enable
undo loopback-detection multi-port-mode enable
Default
Multi-port loopback detection is disabled.
Views
System view
Default command level
2: System level
Usage guidelines
If a device receives a packet that it sent out, a loop has occurred. Depending on whether the receiving interface is the same as the sending interface, loops fall into the following categories:
· Single-port loopback—Occurs when an interface receives a packet that it sent out and the receiving interface is the same as the sending interface.
· Multi-port loopback—Occurs when a device receives a packet that it sent out but the receiving interface may not be the same as the sending interface.
To enable multi-port loopback detection, configure the loopback-detection multi-port-mode enable and loopback-detection enable commands in system view, and the loopback-detection enable command in the view of the target interfaces.
Examples
# Enable multi-port loopback detection to monitor loops between GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] loopback-detection multi-port-mode enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/0/2] loopback-detection enable
loopback-detection per-vlan enable
Use loopback-detection per-vlan enable to enable loopback detection in each VLAN on trunk or hybrid ports.
Use undo loopback-detection per-vlan enable to disable loopback detection in all VLANs but the PVID on trunk or hybrid ports.
Syntax
loopback-detection per-vlan enable
undo loopback-detection per-vlan enable
Default
A trunk port or hybrid port performs loopback detection only in its PVID.
Views
Layer 2 Ethernet interface view, port group view
Default command level
2: System level
Usage guidelines
The loopback-detection per-vlan enable command is not applicable to access ports.
Examples
# Enable loopback detection in all VLANs on hybrid port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] loopback-detection per-vlan enable
mdi
|
NOTE: This command is not applicable to fiber ports. |
Use mdi to configure the MDI mode of an Ethernet copper interface.
Use undo mdi to restore the default.
Syntax
mdi { across | auto | normal }
undo mdi
Default
Ethernet interfaces operate in auto MDI mode.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
across: Sets the MDI mode to across. In this mode, pins 1 and 2 are receive pins, and pins 3 and 6 are transmit pins.
auto: Sets the MDI mode to auto. In this mode, the port negotiates pin roles with its peer.
normal: Sets the MDI mode to normal. In normal mode, pins 1 and 2 are transmit pins, and pins 3 and 6 are receive pins.
Examples
# Set GigabitEthernet 1/0/1 to operate in across MDI mode.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mdi across
multicast-suppression
Use multicast-suppression to set the multicast suppression threshold on an Ethernet interface or a group of Ethernet interfaces.
Use undo multicast-suppression to restore the default multicast suppression threshold.
Syntax
multicast-suppression { ratio | pps max-pps | kbps max-kbps }
undo multicast-suppression
Default
Ethernet interfaces do not suppress multicast traffic.
Views
Layer 2 Ethernet interface view, port group view
Default command level
2: System level
Parameters
ratio: Sets the multicast suppression threshold as a percentage of the maximum interface rate, ranging from 1 to 100. The smaller the percentage, the less multicast traffic is allowed to be received.
pps max-pps: Specifies the maximum number of multicast packets that the Ethernet interface can receive per second.
The value range of the max-pps argument varies by interface type as follows:
· On a GE port, the value ranges from 1 to 1488100.
· On a 10-GE port, the value ranges from 1 to 14881000.
kbps max-kbps: Specifies the maximum number of kilobits of multicast packets that the Ethernet interface can receive per second.
The value range of the max-kbps argument varies by interface type as follows:
· On a GE port, the value ranges from 1 to 1000000.
· On a 10-GE port, the value ranges from 1 to 10000000.
Usage guidelines
In Ethernet interface view, the configurations take effect only on the interface. In port group view, the configurations take effect on all ports in the port group.
When the received multicast traffic exceeds the threshold, the system discards multicast packets until multicast traffic drops below the threshold.
To configure two or all of broadcast, multicast, and unknown unicast suppression thresholds on the same port, do not use pps together with kbps or ratio.
If you set different multicast suppression thresholds in Ethernet interface view or port group view multiple times, the one configured last takes effect.
For a particular type of traffic, configure either storm suppression or storm control, but not both. If both of them are configured, you might fail to achieve the expected storm control effect.
Examples
# Set the multicast threshold to 20% on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] multicast-suppression 20
# Set the multicast threshold to 20% on all ports in the port group named group1.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/2
[Sysname-port-group-manual-group1] multicast-suppression 20
port auto-power-down
Use port auto-power-down to enable automatic power-down on Ethernet interfaces for energy efficiency.
Use undo port auto-power-down to restore the default.
Syntax
port auto-power-down
undo port auto-power-down
Default
Automatic power-down is disabled on Ethernet interfaces.
Views
Layer 2 Ethernet interface view, port group view
Default command level
2: System level
Examples
# Enable automatic power-down on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port auto-power-down
# Enable automatic power-down on all member ports of the port group named group1.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/2
[Sysname-port-group-manual-group1] port auto-power-down
port bridge enable
Use port bridge enable to enable bridging on a Layer 2 Ethernet interface.
Use undo port bridge enable to disable bridging on the Ethernet interface.
Syntax
port bridge enable
undo port bridge enable
Default
Bridging is disabled on Layer 2 Ethernet interfaces.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Examples
# Enable bridging on Layer 2 Ethernet interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port bridge enable
speed auto
Use speed auto to set options for speed autonegotiation.
Syntax
speed auto { 10 | 100 | 1000 } *
undo speed
Default
The speed of an interface is autonegotiated.
Views
GE Layer 2 interface view
Default command level
2: System level
Parameters
10: Sets 10 Mbps as an option for speed autonegotiation.
100: Sets 100 Mbps as an option for speed autonegotiation.
1000: Sets 1000 Mbps as an option for speed autonegotiation.
Usage guidelines
The speed command and the speed auto command supersede each other. The last command that you configure takes effect.
If you configure speed 100 after configuring speed auto 100 1000 on an interface, the interface speed is set to 100 Mbps by force without negotiation. If you configure speed auto 100 1000 after configuring speed 100 on the interface, the interface negotiates with its peer, and the negotiated speed is either 100 Mbps or 1000 Mbps.
To avoid negotiation failure, make sure at least one speed option is supported at both ends.
This feature is supported only on Gigabit copper ports that support speed autonegotiation.
The speed command and the speed auto command supersede each other. The command that is configured last takes effect.
Examples
# Configure the port GigabitEthernet 1/0/1 to use 10 Mbps and 1000 Mbps for speed negotiation.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] speed auto 10 1000
storm-constrain
Use storm-constrain to enable broadcast, multicast, or unknown unicast storm control on an Ethernet port.
Use undo storm-constrain to disable storm control.
Syntax
storm-constrain { broadcast | multicast | unicast } { pps | kbps | ratio } max-values min-values
undo storm-constrain { all | broadcast | multicast | unicast }
Default
Traffic storm control is disabled.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
all: Disables storm control for all types of packets: broadcast, multicast, and unknown unicast.
broadcast: Enables or disables broadcast storm control.
multicast: Enables or disables multicast storm control.
unicast: Enables or disables unknown unicast storm control.
pps: Sets storm control thresholds in pps.
kbps: Sets storm control thresholds in kbps.
ratio: Sets storm control thresholds as a percentage of the transmission capacity of the interface.
max-values: Sets the upper threshold, in pps, kbps, or percentage.
min-values: Sets the lower threshold, in pps, kbps, or percentage. The min-values argument ranges from 1 to the value of the max-values argument.
Usage guidelines
To achieve desirable storm protection effect, avoid configuring both the storm-constrain command and any storm suppression command (unicast-suppression, multicast-suppression, and broadcast-suppression) on a port.
An upper threshold must be greater than or equal to the corresponding lower threshold. H3C does not recommend that you configure the same value for the two thresholds.
Examples
# Enable unknown unicast storm control on Ethernet 1/1, setting the upper and lower thresholds to 200 pps and 150 pps.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] storm-constrain unicast pps 200 150
# Enable broadcast storm control on GigabitEthernet 1/0/2, setting the upper and lower thresholds to 2000 kbps and 1500 kbps.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/0/2] storm-constrain broadcast kbps 2000 1500
# Enable multicast storm control on GigabitEthernet 1/0/3, setting the upper and lower thresholds to 80% and 15%.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] storm-constrain multicast ratio 80 15
storm-constrain control
Use storm-constrain control to specify what protective action to take on an Ethernet interface when a type of traffic (unknown unicast, multicast, or broadcast) exceeds the upper storm control threshold.
Use undo storm-constrain control to restore the default.
Syntax
storm-constrain control { block | shutdown }
undo storm-constrain control
Default
No action is taken on an Ethernet interface when a type of traffic exceeds the upper storm control threshold.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
block: Blocks this type of traffic, while forwarding other types of traffic. Even though the interface does not forward the blocked traffic, it still counts the traffic. When the blocked traffic is drops below the lower threshold, the port resumes forwarding the traffic.
shutdown: Shuts down automatically. The interface automatically shuts down and stops forwarding any traffic. When the blocked traffic drops below the lower threshold, the port does not resume forwarding traffic. To bring up the interface, use the undo shutdown command or disable storm control.
Examples
# Configure GigabitEthernet 1/0/1 to block the traffic detected crossing the upper storm control threshold.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] storm-constrain control block
storm-constrain enable log
Use storm-constrain enable log to enable an Ethernet interface to log storm control threshold events. Logged events include traffic exceeding the upper threshold and traffic falling below the lower threshold from the upper threshold.
Use undo storm-constrain enable log to disable log sending.
Syntax
storm-constrain enable log
undo storm-constrain enable log
Default
A storm control-enabled port sends log messages when monitored traffic exceeds its upper threshold or falls below its lower threshold from the upper threshold.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Examples
# Disable GigabitEthernet 1/0/1 from sending out log messages upon detecting storm control threshold events.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo storm-constrain enable log
storm-constrain enable trap
Use storm-constrain enable trap to enable an Ethernet interface to send storm control threshold event traps. Triggering events include traffic exceeding the upper threshold and traffic falling below the lower threshold from the upper threshold.
Use undo storm-constrain enable trap to disable trap message sending.
Syntax
storm-constrain enable trap
undo storm-constrain enable trap
Default
A storm control-enabled interface sends out traps when monitored traffic exceeds its upper threshold or falls below its lower threshold from the upper threshold.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Examples
# Disable GigabitEthernet 1/0/1 from sending out storm control threshold event traps.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo storm-constrain enable trap
storm-constrain interval
Use storm-constrain interval to set the traffic polling interval of the storm control module.
Use undo storm-constrain interval to restore the default.
Syntax
storm-constrain interval seconds
undo storm-constrain interval
Default
The storm control module polls traffic statistics every 10 seconds.
Views
System view
Default command level
2: System level
Parameters
seconds: Sets the traffic polling interval of the storm control module, ranging from 1 to 300 seconds.
Usage guidelines
For network stability, use the default or a higher polling interval.
The interval set by the storm-constrain interval command is specific to storm control. To set the statistics polling interval of an interface, use the flow-interval command.
Examples
# Set the traffic statistics polling interval of the storm control module to 60 seconds.
<Sysname> system-view
[Sysname] storm-constrain interval 60
unicast-suppression
Use unicast-suppression to set the unknown unicast suppression threshold on an Ethernet interface or a group of Ethernet interfaces.
Use undo unicast-suppression to restore the default.
Syntax
unicast-suppression { ratio | pps max-pps | kbps max-kbps }
undo unicast-suppression
Default
Ethernet interfaces do not suppress unknown unicast traffic.
Views
Layer 2 Ethernet interface view, port group view
Default command level
2: System level
Parameters
ratio: Sets the unknown unicast suppression threshold as a percentage of the maximum interface rate, ranging from 1 to 100. The smaller the percentage, the less unknown unicast traffic is allowed to be received.
pps max-pps: Specifies the maximum number of unknown unicast packets that the Ethernet interface can receive per second.
The value range of the max-pps argument varies by interface type as follows:
· On a GE port, the value ranges from 1 to 1488100.
· On a 10-GE port, the value ranges from 1 to 14881000.
kbps max-kbps: Specifies the maximum number of kilobits of unknown unicast traffic that the Ethernet interface can receive per second.
The value range of the max-kbps argument varies by interface type as follows:
· On a GE port, the value ranges from 1 to 1000000.
· On a 10-GE port, the value ranges from 1 to 10000000.
Usage guidelines
In Ethernet interface view, the configuration will take effect only on the interface. In port group view, the configuration will take effect on all ports in the port group.
When the received unknown unicast traffic exceeds the threshold, the system discards unknown unicast packets until unknown unicast traffic drops below the threshold.
To configure two or all of broadcast, multicast, and unknown unicast suppression thresholds on the same port, do not use pps together with kbps or ratio.
If you set different unknown unicast suppression thresholds in Ethernet interface view or port group view multiple times, the one configured last takes effect.
For a particular type of traffic, configure either storm suppression or storm control, but not both. If both of them are configured, you might fail to achieve the expected storm control effect.
Examples
# Set the unknown unicast threshold to 20% on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] unicast-suppression 20
# Set the unknown unicast threshold to 20% on all ports of port group group1.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/2
[Sysname-port-group-manual-group1] unicast-suppression 20
virtual-cable-test
Use virtual-cable-test to test the cable connection of an Ethernet interface. The test results are displayed within five seconds.
Syntax
virtual-cable-test
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Usage guidelines
The following cable states are available:
· Normal—The cable is in good condition.
· Abnormal—Any fault other than a short or open circuit is detected.
· Abnormal (open)—An open circuit is detected.
· Abnormal (short)—A short circuit is detected.
· Failure—The detection failed.
If the cable connection is normal, the displayed cable length is the total length of the cable.
If the cable connection has a fault, the displayed cable length is the length from the local port to the faulty point.
Fiber ports do not support this command.
If the link of an Ethernet interface is up, testing its cable connection will cause the link to go down and then up.
The test result is for reference only. The cable length detection error is up to 5 m (about 16 ft). If a test item is not available, a hyphen (-) is displayed.
Examples
# Test the cable connection of GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] virtual-cable-test
Cable status: normal, 1 metres
Pair Impedance mismatch: -
Pair skew: - ns
Pair swap: -
Pair polarity: -
Insertion loss: - db
Return loss: - db
Near-end crosstalk: - db
|
NOTE: The Pair Impedance mismatch field has the following values: · Yes—Match · No—Mismatch |