01-04 Interface Management Commands
01-04 Interface Management Commands
Ethernet Switches
Command Reference 4 Interface Management Commands
Format
collect counters top [ number ] interface { interface-type | all | layer-2 |
layer-3 } [ sort-by statistics-type | interval interval-value ] *
Parameters
Parameter Description Value
Views
All views
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The display command allows you to view statistics about the traffic sent and
received by each interface on a device, but cannot sort these statistics by traffic
volume in descending order. The display counters top interface command allows
you to view top N interface traffic statistics reports, facilitating interface
monitoring. Before you view a top N interface traffic statistics report, run the
collect counters top command to generate your desired top N interface traffic
statistics report. For example, configure the device to generate a top N statistics
report about packets dropped on Layer 2 interfaces within 50s.
The top N interface traffic statistics function sorts statistics about inbound and
outbound traffic processed by interfaces within a collection interval in descending
order and generates a top N interface traffic statistics report. The device stops
collecting interface traffic statistics after the collection interval ends. To generate
another top N interface traffic statistics report, run the collect counters top
command again.
Configuration Impact
● After the collect counters top command is run, the device collects interface
traffic statistics and generates a top N interface traffic statistics report based
on the set parameters.
● The collect counters top command configuration is not saved in the
configuration file.
Follow-up Procedure
To view a top N interface traffic statistics report, run the display counters top
interface command.
Precautions
● When the master switch in a stack containing multiple member switches is
faulty, the top N interface traffic statistics function takes effect only on a
master switch. If the master switch encounters a fault and switches to the
backup state, run the collect counters top command on the new master
switch again.
● The collect counters top command can be run multiple times in succession
with different parameters specified. For example, you can configure a device
to generate a top N statistics report about interface multicast packets when
the device is still generating a top N statistics report about interface
broadcast packets.
● The top N interface traffic statistics function allows a device to generate a
maximum of five top N interface traffic statistics reports. If you want the
device to generate new top N interface traffic statistics reports when five top
N interface traffic statistics reports already exist, run the reset counters top
interface command to clear existing ones.
Example
# Configure a device to generate a statistics report about top 10 Layer 2 interfaces
in terms of the number of packets dropped within 40s.
<HUAWEI> collect counters top 10 interface layer-2 sort-by discards interval 40
By default, the interface bandwidth obtained by the NMS from the MIB depends
on the interface type. For example, the bandwidth of a GE interface is 1000
Mbit/s.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI,
S6730-H, S6730S-H, S6730-S, and S6730S-S support this command.
Format
bandwidth bandwidth [ kbps ]
undo bandwidth
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view,
GE sub-interface view, XGE sub-interface view, 40GE interface view, 100GE
interface view, 40GE sub-interface view, 100GE sub-interface view, MultiGE
interface view, MultiGE sub-interface view, tunnel interface view, Eth-Trunk
interface view, Eth-Trunk sub-interface view, VLANIF interface view, VE interface
view, VE sub-interface view
Default Level
2: Configuration level
Usage Guidelines
Running the bandwidth command sets an interface bandwidth obtained by the
NMS from the MIB and does not change an interface actual bandwidth. The NMS
can check the interface bandwidth through the two objects ifSpeed and
ifHighSpeed in IF-MIB.
● If the configured bandwidth is smaller than 4000 Mbit/s, ifSpeed and
ifHighSpeed are respectively displayed as bandwidth x 1000 x 1000 and
bandwidth.
Example
# Set the bandwidth of GE0/0/1 to 100 Mbit/s.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet0/0/1
[HUAWEI-GigabitEthernet0/0/1] bandwidth 100
Format
description description
undo description
Parameters
Parameter Description Value
Views
Interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To facilitate switch management and maintenance, you can configure interface
descriptions. An interface description can contain:
Precautions
Example
# Configure the description of GE0/0/1 as To-[DeviceB]GE-0/0/1, indicating that
this device is connected to device B through GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] description To-[DeviceB]GE-0/0/1
Function
The display counters command displays traffic statistics on an interface.
Format
display counters [ inbound | outbound ] [ interface interface-type [ interface-
number ] ] [ nonzero ]
Parameters
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
You can run the display counters command to view incoming or outgoing traffic
statistics based on the interface type for fault location.
Precautions
When a device has a large number of interfaces, you are advised to specify the
interface type in the display counters command to view only desired information.
If you do not specify those parameters, the following faults will occur:
● The displayed information is repeatedly refreshed, causing desired information
unable to be obtained.
● The system does not respond because of long-time information traversing
and searching.
Example
# Display traffic statistics on GE0/0/1.
<HUAWEI> display counters interface gigabitethernet 0/0/1
Inbound
Interface Octets(bytes) Unicast(pkts) Multicast(pkts) Broadcast(pkts)
GE0/0/1 754918035105 1408179641 15018056 9668635374
Outbound
Interface Octets(bytes) Unicast(pkts) Multicast(pkts) Broadcast(pkts)
GE0/0/1 764800451602 1148151623 15086605 9957268821
# Display traffic statistics on interfaces with at least one of the numbers of bytes,
unicast packets, multicast packets, and broadcast packets not 0.
<HUAWEI> display counters nonzero
Info: This operation may take a few seconds. Please wait for a moment...
Inbound
Interface Octets(bytes) Unicast(pkts) Multicast(pkts) Broadcast(pkts)
GE0/0/1 1467604 0 2902 0
Outbound
Interface Octets(bytes) Unicast(pkts) Multicast(pkts) Broadcast(pkts)
GE0/0/1 2703904 0 13750 1
Item Description
Item Description
Function
The display counters discard command displays statistics about dropped packets.
Format
display counters discard [ inbound | outbound ] [ interface interface-type
[ interface-number ] ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
Precautions
Example
# Display statistics about dropped packets on Ethernet 1/0/1.
<HUAWEI> display counters discard interface ethernet 1/0/1
Interface InDiscards OutDiscards
Eth1/0/1 0 0
Item Description
Function
The display counters error command displays error packet statistics.
Format
display counters error [ inbound | outbound ] [ interface interface-type
[ interface-number ] ]
Parameters
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run the display counters error command to view detailed error packet
statistics on all types of interfaces, which facilitates maintenance when there is a
large number of error packets. (The actual output information may differ from the
following information.)
Example
# Check all error packet statistics on the device.
<HUAWEI> display counters error
Inbound
Interface Total CRC Giants Fragments
GE0/0/1 0 0 0 0
GE0/0/2 0 0 0 0
GE0/0/3 0 0 0 0
GE0/0/4 0 0 0 0
GE0/0/5 0 0 0 0
Interface Runts DropEvents Alignments Symbols
GE0/0/1 0 0 0 0
GE0/0/2 0 0 0 0
GE0/0/3 0 0 0 0
GE0/0/4 0 0 0 0
GE0/0/5 0 0 0 0
Outbound
Interface Total Collisions Excess-Col Late Collisions
GE0/0/1 0 0 0 0
GE0/0/2 0 0 0 0
GE0/0/3 0 0 0 0
GE0/0/4 0 0 0 0
GE0/0/5 0 0 0 0
Item Description
Format
display counters interface [ interface-type interface-number ] [ verbose |
nonzero ]
display counters interface verbose [ nonzero ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
When diagnosing faults on an interface, run the display counters interface
[ interface-type interface-number ] [ verbose | nonzero ] command to view
detailed information about packets received and sent by the interface to
determine whether the interface works properly. You can also run this command
to view detailed traffic statistics on an interface, including typical packet statistics
and number of packets discarded in queues. You can also run this command to
view non-zero traffic statistics on an interface, including typical packet statistics
and number of packets discarded in queues.
Follow-up Procedure
If you want to collect new traffic statistics, run the reset counters interface
command to clear the current statistics.
Example
# Display traffic statistics on an interface, including typical packet statistics and
number of packets discarded in queues.
<HUAWEI> display counters interface gigabitethernet 0/0/1 verbose
GigabitEthernet0/0/1
InPackets : 0
InOctets : 0
InUcastPkts : 0
InMcastPkts : 0
InBcastPkts : 0
OutPackets : 0
OutOctets : 0
OutUcastPkts : 0
OutMcastPkts : 0
OutBcastPkts : 0
InJumbo : 0
InPause : 0
Frames : 0
OutJumbo : 0
OutPause : 0
InDiscards : 0
OutDiscards : 0
InErrors : 0
OutErrors : 0
CRC : 0
Giants : 0
Jabbers : 0
Fragments : 0
Runts : 0
DropEvents : 0
Alignments : 0
Symbols : 0
Ignoreds : 0
Collisions : 0
ExcessiveCollisions : 0
Late Collisions : 0
Deferreds : 0
Buffers purged : 0
InPkts64Octets : 0
InPkts65to127Octets : 0
InPkts128to255Octets : 0
InPkts256to511Octets : 0
InPkts512to1023Octets : 0
InPkts1024to1518Octets : 0
OutPkts64Octets : 0
OutPkts65to127Octets : 0
OutPkts128to255Octets : 0
OutPkts256to511Octets : 0
OutPkts512to1023Octets : 0
OutPkts1024to1518Octets : 0
Queue0lostPkts : 0
Queue1lostPkts : 0
Queue2lostPkts : 0
Queue3lostPkts : 0
Queue4lostPkts : 0
Queue5lostPkts : 0
Queue6lostPkts : 0
Queue7lostPkts : 0
Item Description
Item Description
Item Description
Item Description
Item Description
NOTE
The number (InPkts) of packets received by the interface and the number (OutPkts) of
packets sent by the interface can be displayed separately only on the S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI, S6730-H, S6730S-H, S6730-S,
and S6730S-S. The S1720GW, S1720GW-E, S1720GWR, S1720GWR-E, S1720GF, S1720GFR-P,
S2720-EI, S5720I-SI, S5720-LI, S1730S-H, S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L,
S5735S-L, S5735S-L1, S5735S-L-M, S5720S-LI, S5735-S, S500, S5735S-S, S5735-S-I, S5735S-
H, S5736-S, display only the total number (InOutPkts) of packets received and sent by the
interface.
Function
The display counters rate command displays the incoming or outgoing traffic
rate of an interface.
Format
display counters rate [ inbound | outbound ] [ interface interface-type
[ interface-number ] ] [ nonzero ]
Parameters
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
You can run the display counters rate command to view the incoming or
outgoing traffic rate based on the interface type for fault location.
Precautions
After the system is started, in the case of the first query or when the interval with
the last query is longer than 600s, the system re-initiates rate statistics collection.
In this case, you need to wait until the rate statistics collection result is displayed.
The minimum statistics collection interval is 5 seconds. If the interval is less than 5
seconds, the data collected last time is displayed.
When a device has a large number of interfaces, you are advised to specify the
interface type in the display counters rate command to view only desired
information. If you do not specify those parameters, the following faults will occur:
● The displayed information is repeatedly refreshed, causing desired information
unable to be obtained.
● The system does not respond because of long-time information traversing
and searching.
Example
# Display the traffic rate of GE0/0/1.
<HUAWEI> display counters rate interface gigabitethernet 0/0/1
Inbound
Interface Octets(bytes/s) Unicast(pkts/s) Multicast(pkts/s) Broadcast(pkts/s)
GE0/0/1 18 0 0 0
Outbound
Interface Octets(bytes/s) Unicast(pkts/s) Multicast(pkts/s) Broadcast(pkts/s)
GE0/0/1 61 0 0 0
# Display the traffic rate of interfaces with at least one of the numbers of bytes,
unicast packets, multicast packets, and broadcast packets not 0.
<HUAWEI> display counters rate nonzero
Info: This operation may take a few seconds. Please wait for a moment...
Inbound
Interface Octets(bytes/s) Unicast(pkts/s) Multicast(pkts/s) Broadcast(pkts/s)
GE0/0/1 82 1 0 0
Outbound
Interface Octets(bytes/s) Unicast(pkts/s) Multicast(pkts/s) Broadcast(pkts/s)
GE0/0/1 224 2 0 0
Item Description
Item Description
Format
display counters top interface report [ report-number ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
The collect counters top command generates top N interface traffic statistics
reports, but does not display these reports. To view the generated reports, run the
display counters top interface report [ report-number ] command.
Precautions
Before you run the display counters top interface report [ report-number ]
command, ensure that a top N interface traffic statistics report has been
generated using the collect counters top command. Otherwise, the "There is no
TOPN interface counters report." message is displayed after you run the display
counters top interface report [ report-number ] command.
Example
# Display the summary information about all top N interface traffic statistics
reports.
<HUAWEI> display counters top interface report
Id Start Time Interval Number Sort-By Status Interface-Type
-------------------------------------------------------------------------------
1 2012-09-05 09:03:13-08:00 30 20 bytes doing GigabitEthernet
Table 4-6 Description of the display counters top interface report command
output
Item Description
Item Description
# Display the detailed information about the top N interface traffic statistics
report numbered 1.
<HUAWEI> display counters top interface report 1
Owner : RT1(10.1.1.1)
Start Time : 2012-09-17 13:26:06
End Time : 2012-09-17 13:26:36
Interface Type : GigabitEthernet
Sort By : bytes
Interval : 30 seconds
Port Band Util Bytes Packets Broadcast Multicast Error
Discards
width (In + Out) (In + Out) (In + Out) (In + Out)
------- ----- ------ ---------- ---------- ---------- ---------- ----- --------
GE0/0/1 1000M 0% 974 4 0 4 0 0
Table 4-7 Description of the display counters top interface report 1 command
output
Item Description
Interface Type Indicates the type of interfaces for which the top N
interface traffic statistics report is generated, which can
be:
● all: indicates all interfaces.
● layer-2: indicates Layer 2 interfaces.
● layer-3: indicates Layer 3 interfaces.
● Specified interface type: indicates Ethernet physical
interfaces or Eth-Trunk interfaces.
Item Description
Format
display interface [ interface-type [ interface-number [.subinterface-number ] |
main ] | main ]
display interface slot slot-id [ main ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
The running status and statistics of an interface includes the physical status, basic
configuration, and statistics about forwarded packets on the interface. You can use
the display interface command to collect traffic statistics or locate faults on an
interface.
Precautions
● If no interface type is specified, the running status and statistics of all the
interfaces is displayed. If the interface type is specified but no interface
number is specified, the running status of all the interfaces of this type is
displayed.
● When the XGE service interface of the S5731-H include Ignoreds, Runts, and
Fragments packets, the bytes statistics are incorrect.
● Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support sub-interfaces.
Example
# Display the running status, basic configuration, and statistics about forwarded
packets on GE0/0/1.
<HUAWEI> display interface gigabitethernet 0/0/1
GigabitEthernet 0/0/1 current state : UP
Line protocol current state : UP
Description:
Switch Port, Link-type : access(negotiated),
PVID : 1, TPID : 8100(Hex), The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc12-3456
Last physical up time : 2018-07-04 18:59:25
Last physical down time : 2018-07-04 19:02:07
Current system time: 2018-07-10 16:03:43
Port Mode: COMMON COPPER
Speed : 1000, Loopback: NONE
Duplex: FULL, Negotiation: ENABLE
Mdi : AUTO, Flow-control: DISABLE
Last 300 seconds input rate 0 bits/sec, 0 packets/sec
Last 300 seconds output rate 0 bits/sec, 0 packets/sec
Input peak rate 50765440 bits/sec, Record time: 2018-07-04 19:01:29
Output peak rate 748160 bits/sec, Record time: 2018-07-04 19:01:29
Input: 850737 packets, 74865496 bytes
Unicast: 850735, Multicast: 2
Broadcast: 0, Jumbo: 0
Discard: 0, Pause: 0
Frames: 0
Total Error: 0
CRC: 0, Giants: 0
Jabbers: 0, Fragments: 0
Runts: 0, DropEvents: 0
Alignments: 0, Symbols: 0
Ignoreds: 0
Total Error: 0
Collisions: 0, ExcessiveCollisions: 0
Late Collisions: 0, Deferreds: 0
Buffers Purged: 0
# Display the running status, basic configuration, and statistics about forwarded
packets on 100GE0/0/1.
<HUAWEI> display interface 100GE 0/0/1
100GE0/0/1 current state : DOWN Line
protocol current state : DOWN
Description: Switch Port,
Link-type : access(negotiated), PVID : 1,
TPID : 8100(Hex), The Maximum Frame Length is 9216 IP
Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-
fc12-3456 Last physical up time :
- Last physical down time :
2019-02-26 09:45:16 Current system time:
2019-02-26 09:47:43 Port Mode: COMMON
FIBER Speed : 100000, Loopback:
NONE Duplex: FULL, Negotiation:
DISABLE Mdi : -, Flow-control:
DISABLE FEC :
NONE Last 300 seconds
input rate 0 bits/sec, 0 packets/sec Last 300 seconds
output rate 0 bits/sec, 0 packets/sec Input peak rate 0
bits/sec, Record time: - Output peak rate 0
bits/sec, Record time:
-
Input: 0 packets, 0
bytes Unicast: 0,
Multicast: 0 Broadcast: 0,
Jumbo: 0 Discard: 0,
Pause:
0
Total Error:
0 CRC: 0,
Giants: 0 Runts: 0,
Fragments: 0 Alignments: 0,
Symbols: 0 Ignoreds:
0
Output: 0 packets, 0
bytes Unicast: 0,
Multicast: 0 Broadcast: 0,
Jumbo: 0 Discard: 0,
Pause:
0
Item Description
Item Description
Item Description
Item Description
Last physical up time Last time the interface went Up physically. If this field
displays "-", the physical status of the interface does not
change.
If the system is configured with a time zone and is in
the daylight saving time, the time is displayed in the
format of YYYY-MM-DD HH:MM:SS UTC±HH:MM DST.
Item Description
Last physical down Last time the interface went Down physically. If this
time field displays "-", the physical status of the interface
does not change.
If the system is configured with a time zone and is in
the summer daylight saving time, the time is displayed
in the format of YYYY-MM-DD HH:MM:SS UTC±HH:MM
DST.
Item Description
Last 300 seconds Incoming packet rate (bits per second and packets per
input rate second) within the last 300 seconds.
Last 300 seconds Outgoing packet rate (bits per second and packets per
output rate second) within the last 300 seconds.
Input peak rate 0 Maximum rate of incoming packets and time when the
bits/sec,Record time maximum rate is reached.
Output peak rate 0 Maximum rate of outgoing packets and time when the
bits/sec,Record time maximum rate is reached.
Item Description
Item Description
Item Description
Item Description
Item Description
Item Description
Function
The display interface brief command displays brief information about the status
and configuration of interfaces.
Format
display interface brief [ main ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
The display interface brief command displays brief information about interfaces,
including the physical status, link layer protocol status, inbound and outbound
bandwidth usage within a certain period, and numbers of sent and received error
packets. This information helps locate faults on interfaces.
Precautions
To clear statistics on an interface, run the reset counters interface command.
Example
# Display brief information about the status and configuration of interfaces.
<HUAWEI> display interface brief
PHY: Physical
*down: administratively down
#down: LBDT down
(l): loopback
(s): spoofing
(E): E-Trunk down
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(lb): LBDT block
(lp): Loop-detect block
(ms): MACsec down
(o): Observe-port forwarding down
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/1 up up 0.06% 100% 0 21217388
GigabitEthernet0/0/2 up up 100% 100% 0 0
GigabitEthernet0/0/3 up up 0% 100% 0 0
GigabitEthernet0/0/4 up up 100% 100% 0 0
GigabitEthernet0/0/5 up up 99% 100% 0 0
GigabitEthernet0/0/6 down down 0% 0% 10 0
GigabitEthernet0/0/7 down down 0% 0% 12 0
GigabitEthernet0/0/8 down down 0% 0% 0 0
GigabitEthernet0/0/9 down down 0% 0% 0 0
GigabitEthernet0/0/10 down down 0% 0% 0 0
GigabitEthernet0/0/11 down down 0% 0% 0 0
GigabitEthernet0/0/12 down down 0% 0% 0 0
GigabitEthernet0/0/13 down down 0% 0% 0 0
GigabitEthernet0/0/14 down down 0% 0% 0 0
GigabitEthernet0/0/15 down down 0% 0% 0 0
GigabitEthernet0/0/16 down down 0% 0% 0 0
GigabitEthernet0/0/17 down down 0% 0% 0 0
GigabitEthernet0/0/18 down down 0% 0% 0 0
GigabitEthernet0/0/19 down down 0% 0% 0 0
GigabitEthernet0/0/20 down down 0% 0% 0 0
GigabitEthernet0/0/21 down down 0% 0% 0 0
GigabitEthernet0/0/22 down down 0% 0% 0 0
GigabitEthernet0/0/23 down down 0% 0% 0 0
GigabitEthernet0/0/24 down down 0% 0% 0 0
MEth0/0/1 down down 0% 0% 0 0
NULL0 up up(s) 0% 0% 0 0
Item Description
Item Description
Function
The display interface description command displays the description of an
interface.
Format
display interface description [ interface-type [ interface-number ] ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
The display interface command can also display the description of an interface.
To quickly view the description of an interface, you are advised to use the display
interface description command.
Precautions
If no interface type is specified, the description of all interfaces is displayed. If an
interface type is specified but no interface number is specified, the description of
all interfaces of the specified type is displayed.
If there is a great deal of statistics about traffic on Eth-Trunk interfaces, you are
recommended to specify trunk-id to filter output information. Otherwise, a
problem may occur due to excessive output information: The displayed
information is repeatedly refreshed, and therefore required information cannot be
located.
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support sub-interfaces.
Example
# Display the description of GE0/0/1.
<HUAWEI> display interface description gigabitethernet 0/0/1
PHY: Physical
*down: administratively down
#down: LBDT down
(l): loopback
(s): spoofing
(E): E-Trunk down
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(lb): LBDT block
(ms): MACsec down
Interface PHY Protocol Description
GE0/0/1 down down
Item Description
Function
The display ip interface command displays the IP configuration and statistics on
interfaces. The statistics include the number of packets and bytes received and
sent by interfaces, number of multicast packets sent and received by interfaces,
and number of broadcast packets received, sent, forwarded, and discarded by
interfaces.
Format
display ip interface [ interface-type interface-number ]
Parameters
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run the display ip interface brief command to view the following
information:
● IP configurations of all interfaces
● IP configurations of interfaces of the specified type and a specified interface
● IP configurations of interfaces that have IP addresses
This command, however, cannot display the IP configurations of Layer 2 interfaces
or Eth-Trunk member interfaces.
NOTE
● You can run the display interface description command to view the interface
description.
● You can run the display interface command to view detailed information about the
running status and statistics on the interface.
● Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-
EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support sub-interfaces.
Example
# Display IP information about VLANIF15.
<HUAWEI> display ip interface vlanif 15
Vlanif15 current state : UP
Line protocol current state : UP
The Maximum Transmit Unit : 1500 bytes
input packets : 766390, bytes : 41540847, multicasts : 681817
output packets : 242239, bytes : 14679482, multicasts : 172333
Directed-broadcast packets:
received packets: 0, sent packets: 0
forwarded packets: 0, dropped packets: 0
Internet Address is 10.1.1.119/24
Broadcast address : 10.1.1.255
TTL being 1 packet number: 164035
TTL invalid packet number: 0
ICMP packet input number: 0
Echo reply: 0
Unreachable: 0
Source quench: 0
Routing redirect: 0
Echo request: 0
Router advert: 0
Router solicit: 0
Time exceed: 0
IP header bad: 0
Timestamp request: 0
Timestamp reply: 0
Information request: 0
Information reply: 0
Netmask request: 0
Netmask reply: 0
Unknown type: 0
Line protocol current state Link layer protocol status of the interface:
● UP: The link layer protocol of the interface
is running properly.
● DOWN: The link layer protocol of the
interface is Down or no IP address is
configured on the interface.
The Maximum Transmit Unit MTU of the interface. The default MTU of an
Ethernet interface or a serial interface is 1500
bytes. Packets longer than the MTU are
fragmented before being transmitted. If
fragmentation is not allowed, the packets are
discarded.
input packets : 766390, bytes : Total number of packets, bytes, and multicast
41540847, multicasts : 681817 packets received by the interface.
Item Description
Item Description
(E): E-Trunk down Indicates that the Eth-Trunk is Down because of the
protocol negotiation on the E-Trunk.
Format
display ip interface description [ interface-type [ interface-number ] | interface-
type &<1-8> | slot slot-number [ card card-number ] ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
Example
# View IP-related information and description of a specified interface.
<HUAWEI> display ip interface description
Codes:
Ana(Analogmodem), Asy(Async), Cell(Cellular),
Dia(Dialer), Eth(Ethernet) GE(GigabitEthernet),
H(Hssi), Ima(Ima-group), Loop(LoopBack),
MTun(MTunnel), S(Serial), Tun(Tunnel),
VE(Virtual-Ethernet), VT(Virtual-Template)
------------------------------------------------------------------------------
Number of interfaces whose physical status is Up: 9
Number of interfaces whose physical status is Down: 1
Number of interfaces whose protocol status is Up: 9
Number of interfaces whose protocol status is Down: 1
Item Description
Format
display this interface
Parameters
None
Views
Interface view
Default Level
1: Monitoring level
Usage Guidelines
In the interface view, you can run the display this interface command to rapidly
view the status of the interface and packet statistics on the interface.
Example
# Display information about GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] display this interface
GigabitEthernet0/0/1 current state : UP
Line protocol current state : UP
Description:
Switch Port,Link-type : access(negotiated),
PVID : 1, TPID : 8100(Hex), The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc12-3456
Last physical up time : -
Last physical down time : 2000-04-01 23:55:43
Current system time: 2012-08-24 00:41:35+08:00
Port Mode: COMMON FIBER, Transceiver: 1000_BASE_SX_SFP
Speed : 1000, Loopback: NONE
Duplex: FULL, Negotiation: ENABLE
Mdi : -, Flow-control: DISABLE
Last 300 seconds input rate 0 bits/sec, 0 packets/sec
Last 300 seconds output rate 0 bits/sec, 0 packets/sec
Input peak rate 0 bits/sec, Record time: 2007-12-26 07:23:14
Output peak rate 0 bits/sec, Record time: 2007-12-26 07:23:14
Total Error: 0
CRC: 0, Giants: 0
Jabbers: 0, Fragments: 0
Runts: 0, DropEvents: 0
Alignments: 0, Symbols: 0
Ignoreds: 0
Total Error: 0
Collisions: 0, ExcessiveCollisions: 0
Late Collisions: 0, Deferreds: 0
Buffers Purged: 0
Item Description
Item Description
Item Description
Item Description
Last physical up time Last time the interface went Up physically. If this field
displays "-", the physical status of the interface does not
change.
If the system is configured with a time zone and is in
the daylight saving time, the time is displayed in the
format of YYYY-MM-DD HH:MM:SS UTC±HH:MM DST.
Item Description
Last physical down Last time the interface went Down physically. If this
time field displays "-", the physical status of the interface
does not change.
If the system is configured with a time zone and is in
the summer daylight saving time, the time is displayed
in the format of YYYY-MM-DD HH:MM:SS UTC±HH:MM
DST.
Item Description
Last 300 seconds Incoming packet rate (bits per second and packets per
input rate second) within the last 300 seconds.
Last 300 seconds Outgoing packet rate (bits per second and packets per
output rate second) within the last 300 seconds.
Input peak rate 0 Maximum rate of incoming packets and time when the
bits/sec,Record time maximum rate is reached.
Output peak rate 0 Maximum rate of outgoing packets and time when the
bits/sec,Record time maximum rate is reached.
Item Description
Item Description
Item Description
Item Description
Item Description
Item Description
4.1.17 interface
Function
The interface command displays the interface view or sub-interface view.
Format
interface interface-type interface-number
Parameters
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
After the specified interface view is displayed, you can set attributes for the
interface.
Precautions
● VLAN termination sub-interfaces cannot be created on a VCMP client.
● You need to set the interface type before creating a sub-interface. Only hybrid
and trunk interfaces on the preceding series of cards support Ethernet sub-
interface configuration.
● Physical interfaces cannot be created or deleted. You can only run the
interface interface-type interface-number command to enter the view of an
existing physical interface.
● Sub-interfaces can be created. Run the interface interface-type interface-
number command to create a sub-interface and enter the sub-interface view.
● Sub-interfaces can be deleted. Run the undo interface interface-type
interface-number command to delete a sub-interface.
● Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support sub-interfaces.
Example
# Display the view of GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1]
Format
mtu mtu
undo mtu
Parameters
Parameter Description Value
Views
Interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The maximum transmission unit (MTU) determines the maximum number of
bytes in IP packets each time a sender can send. The MTU of an IP packet refers to
the number of bytes from the IP header of the packet to the data.
The size of data frames is limited at the network layer. Any time the IP layer
receives an IP packet to be sent, it checks to which local interface the packet
needs to be sent and obtains the MTU configured on the interface. Then the IP
layer compares the MTU with the packet length. If the packet length is longer
than the MTU, the IP layer fragments the packet into smaller packets, which are
shorter than or equal to the MTU. If unfragmentation is configured, some packets
may be discarded during data transmission at the IP layer. To ensure jumbo
packets are not dropped during transmission, you need to configure forcible
fragmentation. In this case, you can run the mtu command to set the size of a
fragment.
NOTE
The configured MTU takes effect for data packets on the control plane.
For S5731-H, S6730-H, and S6730S-H, the configured MTU takes effect for data packets on
the forwarding plane after you run the ipv4 fragment enable command to enable packet
fragmentation. The configured MTU takes effect for GRE packets on the forwarding plane
without the need to execute the ipv4 fragment enable command.
For other devices, the configured MTU does not take effect for data packets on the
forwarding plane.
Prerequisites
Run undo portswitch command to change the working mode of Ethernet
interfaces from Layer 2 mode to Layer 3 mode.
Precautions
● After changing the maximum transmission unit (MTU) using the mtu
command on an interface, you need to restart the interface to make the new
MTU take effect. To restart the interface, run the shutdown command and
then the undo shutdown command, or run the restart command in the
interface view.
● If IPv6 is run on a tunnel interface and the MTU set using the mtu command
on the interface is smaller than 1280, IPv6 works abnormally on this interface.
To prevent this problem, set the MTU of a tunnel interface to a value greater
than or equal to 1280 if IPv6 runs on the tunnel interface.
● Configuring the MTU of an interface affects the maximum number of bytes
for IP packets to be sent by the interface at a time. This configuration also
affects the maximum frame length of sent Ethernet packets. The Ethernet
packet size cannot exceed the maximum frame length allowed by the peer
interface, which can be set using the jumboframe enable command.
Example
# Set the MTU of GE0/0/1 to 1200 bytes.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] mtu 1200
[HUAWEI-GigabitEthernet0/0/1] restart
Function
The port description command configures description about the device type
connected to an interface.
Format
port description { router | switch | phone | desktop }
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, Eth-Trunk
interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
You can run this command to configure description about the device type
connected to an interface to facilitate device management and maintenance. For
example, you can run port description router command to indicate that the
interface is connected to a router.
Precautions
After you configure this command on an interface, the interface can still switch
between Layer 2 and Layer 3 modes.
Example
# Specify description of the Ethernet interface GE0/0/1 to router to indicate that
the interface is connected to a router.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port description router
Format
reset counters if-mib interface [ interface-type [ interface-number ] ]
Parameters
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
NOTE
For details on how to view interface traffic statistics in the NMS, see the NMS
documentation.
Precautions
● If no interface type and number are specified, traffic statistics of all interfaces
in the NMS are cleared.
● After you run the reset counters if-mib interface command, traffic statistics
on all interfaces in the NMS are cleared. Therefore, confirm the action before
you run this command.
● Running the reset counters if-mib interface command does not affect the
interface traffic statistics displayed by the display interface command. To
clear the interface traffic statistics displayed by the display interface
command, run the reset counters interface command.
Example
# Clear traffic statistics on GE0/0/1 in the NMS.
<HUAWEI> reset counters if-mib interface gigabitethernet 0/0/1
Function
The reset counters interface command clears traffic statistics about a specified
interface.
Format
reset counters interface [ interface-type [ interface-number ] ]
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Before collecting traffic statistics on an interface within a certain period, run the
reset counters interface command to clear existing traffic statistics.
Precautions
Example
# Clear traffic statistics on all interfaces.
<HUAWEI> reset counters interface
Format
reset counters top interface report [ report-number ]
Parameters
Parameter Description Value
report-number Specifies the number of the top N interface The value is an
traffic statistics report to be deleted. If you integer ranging
do not specify this parameter, the command from 1 to 5.
clears all top N interface traffic statistics
reports.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Example
# Clear all top N interface traffic statistics reports.
<HUAWEI> reset counters top interface report
Format
restart
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, VLANIF
interface view, Sub-interface view, Tunnel interface view, VE interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
After modifying parameters of an interface, run the restart command to make the
modification take effect.
Precautions
● Restarting an interface during data transmission will cause data frame loss or
service interruption. Exercise caution when you use the restart command.
● Running the restart command is equivalent to running the shutdown
command and the undo shutdown command in sequence.
● Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support sub-interfaces.
Example
# Restart GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] restart
Function
The set flow-stat interval command sets the interval for collecting the traffic
statistics on interfaces.
The undo set flow-stat interval command restores the default interval for
collecting traffic statistics on interfaces.
By default, the interval for collecting traffic statistics on interfaces is 300 seconds.
Format
set flow-stat interval interval-time
Parameters
Parameter Description Value
Views
System view, Interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
By using the set flow-stat interval command to set the interval for collecting
traffic statistics on interfaces, you can collect and analyze traffic statistics
according to your needs. You can also take traffic control measures based on the
traffic statistics to prevent network congestion and service interruption.
● When congestion occurs, set the interval for collecting traffic statistics on an
interface to less than 300 seconds, or 30 seconds if congestion worsens. Then
observe the traffic distribution on the interface within a short period of time.
If data packets cause congestion, take proper measures to control the rate of
the packets.
● When the network bandwidth is sufficient and services are running properly,
set the interval for collecting traffic statistics on an interface to more than
300 seconds. If the value of any traffic parameter is not within the specified
range, change the interval for collecting traffic statistics to observe the traffic
volume in real time.
Precautions
● The interval configured in the system view takes effect on all the interfaces
that use the default interval.
● The interval configured in the interface view takes effect only on the current
interface.
● The interval configured in the interface view takes precedence over the
interval configured in the system view.
Example
# Set the interval for collecting traffic statistics on GE0/0/1 to 400s.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] set flow-stat interval 400
Format
shutdown
undo shutdown
Parameters
None
Views
Interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
When an interface is not connected to a cable or fiber, you can use the shutdown
command to disable the interface to prevent exceptions caused by interference.
Precautions
● When the device supports the autocomplete function, you must enter at least
the characters shut before the device can automatically complete the
shutdown command.
● Disabling an interface during data transmission will cause data frame loss or
service interruption. Exercise caution when you use the shutdown command.
● Some logical interfaces, such as loopback, and null interfaces, do not support
the shutdown and undo shutdown commands.
● If you run the shutdown command in the Eth-Trunk interface view, all Eth-
Trunk member interfaces are disabled.
● Running the shutdown and undo shutdown commands is equivalent to
running the restart command.
● When an interface is configured with a sub-interface, the default interval for
running the shutdown and undo shutdown commands on the main interface
is 15 seconds.
● When a physical interface functions as an Eth-Trunk member interface, the
default interval for running the shutdown and undo shutdown commands
on this interface is 15 seconds.
Example
# Shut down GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] shutdown
Commands provided in this section and all the parameters in the commands are
supported by all switch models by default, unless otherwise specified. For details,
see specific commands.
4.2.2 am isolate
Function
The am isolate command isolates the current interface from a specified interface
unidirectionally.
The undo am isolate command cancels unidirectional isolation between the
current interface and a specified interface. If no interface is specified,
unidirectional isolation between the current interface and all the other interfaces
is canceled.
By default, no unidirectional isolation is configured between the current interface
and a specified interface.
Format
am isolate { interface-type interface-number }&<1-8>
undo am isolate [ interface-type interface-number ]&<1-8>
am isolate interface-type interface-number1 [ to interface-number2 ]
undo am isolate [ interface-type interface-number1 [ to interface-number2 ] ]
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, Eth-Trunk
interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The am isolate command isolates interfaces unidirectionally. For example, if
interface A is isolated from interface B unidirectionally, packets sent from interface
A cannot reach interface B, but packets sent from interface B can reach interface
A. Unidirectional isolation needs to be configured in the following scenarios:
● When multiple hosts connect to different interfaces of a device and a host
sends many broadcast packets to the other hosts, isolate the interface
connected to the host from other interfaces unidirectionally. Then the other
hosts do not receive packets from the host.
● Interfaces in a port isolation group are isolated from each other, but
interfaces in different port isolation groups can communicate. To isolate
interfaces in different port isolation groups, configure unidirectional isolation
between these interfaces.
By default, only Layer 2 packets of the current interface are isolated from a
specified interface, but Layer 3 packets are not isolated. To isolate both Layer 2
and Layer 3 packets on interfaces unidirectionally, run the port-isolate mode all
command.
Precautions
An interface can be unidirectionally isolated from another type of interface.
However, an interface cannot be unidirectionally isolated from itself or from the
management interface. In addition, an Eth-Trunk cannot be unidirectionally
isolated from its member interfaces.
NOTE
Example
# Isolate GE0/0/1 from GE0/0/2 unidirectionally.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] am isolate gigabitethernet 0/0/2
Function
The assign port-type 100GE command sets the maximum rate of QSFP28
interfaces to 100 Gbit/s.
The undo assign port-type 100GE command restores the maximum rate of
QSFP28 interfaces to 40 Gbit/s.
NOTE
Format
assign port-type 100GE [ slot slot-id | all ]
Parameters
Parameter Description Value
slot slot-id Specifies a slot ID. The value must be set according to the device
configuration.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To change the rate of QSFP28 interfaces on the S5732-H24S6Q, S5732-H48S6Q,
S6730-H24X6C (part number: 02352FSG) and S6730-H48X6C (part number:
02352FSF), apply for and purchase a license from the equipment supplier, activate
the license, and then run the assign port-type 100GE or undo assign port-type
100GE command.
For the S6730-H24X6C (part number: 02353GFC), S6730S-H, and S6730-H48X6C
(part number: 02353FWL), the license has been loaded to the device by default.
You can run the assign port-type 100GE or undo assign port-type 100GE
command to change the rate of QSFP28 interfaces.
Precautions
● The corresponding license is required before this command is run.
● To check the current rate of an interface and the rate that takes effect after a
device restart, run the display device port-type configuration command.
● After the command is executed, restart the device immediately for the
configuration to take effect.
● After the device restarts, the original interface configuration may be lost.
Therefore, back up the configuration before the restart. After the restart,
check the configuration and modify it if necessary.
● After this command is executed, the maximum rate of QSFP28 interfaces is
the configured rate if you restore the factory settings with one click.
● After the license expires, the maximum rate of QSFP28 interfaces is the
default rate if you restore the factory settings with one click.
Example
# Set the maximum rate of all QSFP28 interfaces on the switch to 100 Gbit/s.
<HUAWEI> system-view
[HUAWEI] assign port-type 100ge all
Warning: The configuration of 40G interfaces may be lost after the device restart. Therefore, back up their
configuration before the
restart, and check the configuration after the restart is complete. Continue? [Y/N]:y
Info: The current configuration has been modified and takes effect after the device is restarted.
The undo assign port-type XGE command restores the maximum rate of
1000BASE-X interfaces to 1 Gbit/s.
By default, no license is loaded to a device, and 1000BASE-X interfaces support the
maximum rate of 1 Gbit/s.
NOTE
Format
assign port-type XGE [ slot slot-id | all ]
undo assign port-type XGE [ slot slot-id | all ]
Parameters
Parameter Description Value
slot slot-id Specifies a slot ID. The value must be the ID of an existing slot on
the device.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
By default, 1000BASE-X interfaces on a switch work at a maximum rate of 1
Gbit/s. To enable these interfaces to work at a maximum rate of 10 Gbit/s, apply
for and purchase a license from the equipment supplier, activate the license, and
then run the assign port-type XGE command to set the maximum rate of
1000BASE-X interfaces to 10 Gbit/s. To restore the maximum rate of 1000BASE-X
interfaces to 1 Gbit/s, run the undo assign port-type XGE command. This
command configuration takes effect only after the device is restarted.
Precautions
● The corresponding license is required before this command is run.
● To check the current rate of an interface and the rate that takes effect after a
device restart, run the display device port-type configuration command.
● After the command is executed, restart the device immediately for the
configuration to take effect.
● After the device restarts, the original interface configuration may be lost.
Therefore, back up the configuration before the restart. After the restart,
check the configuration and modify it if necessary.
● After this command is executed, the maximum rate of SFP interfaces is the
configured rate if you restore the factory settings with one click.
● After the license expires, the maximum rate of SFP interfaces is the default
rate if you restore the factory settings with one click after a device restart.
Example
# Set the maximum rate of 1000BASE-X interfaces to 10 Gbit/s.
<HUAWEI> system-view
[HUAWEI] assign port-type XGE all
Warning: The configuration of GE interfaces may be lost after the device restart. Therefore, back up their
configuration before the
restart, and check the configuration after the restart is complete. Continue? [Y/
N]:y
Warning: Running this command will change ports' capability of supporting dedicated stack cables.
Continue? [Y/N]:y
Info: The current configuration has been modified and takes effect after the device is restarted.
Function
The assign port-type 25GE command sets the maximum rate of 10GE SFP+
Ethernet optical ports to 25 Gbit/s.
The undo assign port-type 25GE command restores the maximum rate of 10GE
SFP+ Ethernet optical ports to 10 Gbit/s.
By default, no license is loaded to a device, and 10GE SFP+ Ethernet optical ports
work at a maximum rate of 10 Gbit/s.
NOTE
Format
assign port-type 25GE [ slot slot-id | all ]
Parameters
Parameter Description Value
slot slot-id Specifies a slot ID. The value must be set according to the device
configuration.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
By default, 10GE SFP+ Ethernet optical ports on a device work at a maximum rate
of 10 Gbit/s. To enable these ports to work at a maximum rate of 25 Gbit/s, apply
for and purchase a license from the equipment supplier, activate the license, and
then run the assign port-type 25GE command to set the maximum rate of the
ports to 25 Gbit/s. To restore the maximum rate of the ports to 10 Gbit/s, run the
undo assign port-type 25GE command. This command configuration takes effect
only after the device is restarted.
Precautions
● The corresponding license is required before this command is run.
● To check the current rate of an interface and the rate that takes effect after a
device restart, run the display device port-type configuration command.
● After the command is executed, restart the device immediately for the
configuration to take effect.
● After the device restarts, the original interface configuration may be lost.
Therefore, back up the configuration before the restart. After the restart,
check the configuration and modify it if necessary.
● After this command is executed, the maximum rate of 10GE SFP+ Ethernet
optical ports is the configured rate if you restore the factory settings with one
click.
● After the license expires, the maximum rate of 10GE SFP+ Ethernet optical
ports is the default rate if you restore the factory settings with one click after
a device restart.
Example
# Increase the maximum rate of all 10GE SFP+ Ethernet optical ports to 25 Gbit/s.
<HUAWEI> system-view
[HUAWEI] assign port-type 25GE all
Warning: The configuration of XGE interfaces may be lost after the device restart. Therefore, back up their
configuration before the
restart, and check the configuration after the restart is complete. Continue? [Y/N]:y
Info: The current configuration has been modified and takes effect after the device is restarted.
The undo assign group-speed command restores the default maximum rate of
interfaces in a MultiGE interface group.
By default, you can run the display device group-speed configuration command
to check the maximum rate of a MultiGE interface based on the BaseSpeed field
in the command output.
NOTE
Format
assign group-speed [ slot slot-id ] group group-number speed
undo assign group-speed [ slot slot-id ] group group-number
Parameters
Parameter Description Value
slot slot-id Specifies a slot ID. The value must be set according to the
device configuration.
In a stack, if no slot ID
is specified, the
maximum rate of
interfaces in the
MultiGE interface group
on the master switch is
configured.
group group- Specifies the number of The value is an integer and must be set
number a MultiGE interface according to the device configuration.
group.
Every 12 MultiGE interfaces form a
MultiGE interface group. The number
of MultiGE interface groups determines
the value range. For example, if a
device has 24 MultiGE interfaces, the
value is 0 or 1.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
On the S5732-H24UM2CC, S5732-H48UM2CC, S5736-S24UM4XC, every 12
MultiGE interfaces form a MultiGE interface group. To set the maximum rate of
interfaces in a specified MultiGE interface group, run the assign group-speed
command. The maximum rates of interfaces in the same MultiGE interface group
are the same, and the maximum rates of interfaces in different MultiGE interface
groups can be different.
Precautions
● This command takes effect only on the device to which license control items
are loaded. For details about how to use license control items, see Other: How
Can I Increase the Rate of Ports Through the RTU License? in the S1720,
S5700, and S6700 Series Switches License Usage Guide.
● After you run the assign group-speed command to set the maximum rate of
interfaces in a MultiGE interface group, restart the switch to make the
configuration take effect. If you have run the assign group-speed command
multiple times to set the maximum rate of interfaces in multiple MultiGE
interface groups, restart the switch to make these configurations take effect
simultaneously.
● After the assign group-speed command is run, the maximum rate of
interfaces in a MultiGE interface group is restored to the default value if
factory settings are restored with one click.
● After the license for a MultiGE interface group expires, if the device is
restarted or factory settings are restored with one click, the maximum rate of
interfaces in the MultiGE interface group is restored to the default value.
Example
# Set the maximum rate of interfaces in MultiGE interface group 0 to 10000
Mbit/s.
<HUAWEI> system-view
[HUAWEI] assign group-speed group 0 10000
Function
The auto duplex command configures the duplex mode on an Ethernet electrical
interface in auto-negotiation mode.
The undo auto duplex command restores the default duplex mode on an
Ethernet electrical interface in auto-negotiation mode.
NOTE
Format
auto duplex { half | full }*
Parameters
Parameter Description Value
Views
Ethernet interface view, MultiGE interface view, GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Prerequisites
Precautions
Example
# Configure Ethernet electrical interface GE0/0/1 in auto-negotiation mode to
work in half-duplex mode.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] negotiation auto
[HUAWEI-GigabitEthernet0/0/1] auto duplex half
Format
auto speed { 10 | 100 | 1000 | 2500 | 5000 | 10000 } *
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, MultiGE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
For example, the network adapter speeds on Server1, Server2, and Server3 that
form a server cluster are all 1000 Mbit/s, and the speed of the outbound interface
GE0/0/4 connecting the device to external networks is also 1000 Mbit/s. The
servers connect to GE0/0/1, GE0/0/2, and GE0/0/3 respectively. If the auto-
negotiation speed is not specified on the device, the speeds negotiated by
GE0/0/1, GE0/0/2, and GE0/0/3 with their connected servers are all 1000 Mbit/s.
When the servers send data at the speed of 1000 Mbit/s concurrently, the
outbound interface GE0/0/4 will be blocked. In this case, you can run the auto
speed 100 100 command to configure the auto-negotiation speed to 100 Mbit/s
for GE0/0/1, GE0/0/2, and GE0/0/3, preventing the outbound interface from being
blocked.
Prerequisites
Run the negotiation auto command to configure the Ethernet interface to work
in auto-negotiation mode.
Precautions
Example
# Configure Ethernet electrical interface GE0/0/1 to work at a rate of 100 Mbit/s
in auto-negotiation mode.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] negotiation auto
[HUAWEI-GigabitEthernet0/0/1] auto speed 100
4.2.9 cable-snr-test
Function
The cable-snr-test command checks the network cable quality and displays the
check result.
NOTE
This command is supported only on the S1730S-H XGE electrical interfaces on the
ES5D21X08T00 card of the S5731-H, and S5731S-H, GE electrical interfaces on the S5731-
H, S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-L1, S5735S-L, S5735S-L-M, S5735-
S (except the S5735-S48S4X), S500, S5735S-S, S5735-S-I, S5720I-SI, and and MultiGE
electrical interfaces on the S5720-28X-PWH-LI-AC, S5720-28X-PWH-LI-ACF, S5732-
H24UM2CC, S5732-H48UM2CC, S5732-H48XUM2CC, S5736-S24UM4XC.
Format
cable-snr-test
Parameters
None
Views
MultiGE interface view, XGE interface view, GE interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can check the quality of the network cable on an electrical interface to
determine whether the network cable quality meets communication requirements.
Precautions
● This command checks real-time quality of the network cable on an interface,
and the network cable quality changes with the external environment.
● A MultiGE electrical interface supports accurate network cable quality check
only when it works at the rate of 2.5 Gbit/s or higher.
● An XGE electrical interface supports accurate network cable quality check only
when it works at the rate of 10 Gbit/s.
● A GE electrical interface supports accurate network cable quality check only
when it works at the rate of 1 Gbit/s.
● An interface does not support the network cable quality check when it is
Down or in loopback detection mode.
● After the interface goes Up, wait for several minutes before running this
command. Otherwise, the command fails to be delivered.
Example
# Check the network cable quality on GigabitEthernet0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] cable-snr-test
Info: The current network cable is of good quality.
4.2.10 carrier
Function
The carrier command configures the delay in reporting an interface status change
event.
The undo carrier command restores the default delay in reporting an interface
status change event.
By default, the delay in reporting an interface Up event is 2000 milliseconds, and
the delay in reporting an interface Down event is 0 milliseconds.
Format
carrier { up-hold-time | down-hold-time } interval
undo carrier { up-hold-time | down-hold-time }
Parameters
Paramet Descripti Value
er on
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
If frequent physical status changes are reported to the system, extra system costs
are generated. You can configure the delay in reporting physical status changes to
solve the problem. The system is unaware of the physical status changes on
interfaces within the configured delay. If the interface physical status is not
recovered after the delay expires, the physical status changes are reported to the
system.
You can configure the delay in reporting physical status changes based on the
network connection status.
● Setting a long delay
For example, an interface frequently alternates between Up and Down states
at an interval shorter than the IP route convergence time. In this case, the
upper-layer protocol does not need to sense the physical status changes. You
can set a long delay in reporting physical status changes to avoid unnecessary
routing entry refreshing caused by frequent physical status changes.
● Setting a short delay
For example, when the physical status of the active interface in an interface
protection group changes from Up to Down, the system needs to immediately
instruct the upper-layer service forwarding protocol to send service packets
from the standby interface. In this case, you can set a short delay in reporting
physical status changes to ensure real-time service switchover.
Precautions
If you run the carrier command multiple times in the same interface view, only
the latest configuration takes effect.
Example
# Set the delay in reporting an interface Up event to 1000 milliseconds on
GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] carrier up-hold-time 1000
Format
clear configuration port-isolate
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
To clear all the interface isolation configurations on the device, you need to delete
the configurations one by one. If a large number of configurations exist on the
device, deleting the configurations takes much time and increases the
maintenance workload. To reduce the maintenance workload and operation
complexity, run the clear configuration port-isolate command in the system view
to clear all the interface isolation configurations on the device. The configurations
involve the port isolation group, unidirectional port isolation, and isolation mode.
Example
# Clear all the interface isolation configurations on the device.
<HUAWEI> system-view
[HUAWEI] clear configuration port-isolate
Warning: The port isolate will be cancelled. Continue?[Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment...done.
4.2.12 combo-port
Function
The combo-port command configures the working mode of a combo interface.
The undo combo-port command restores the default setting.
By default, a combo interface works in auto mode. That is, the combo interface
automatically switches between the electrical mode and optical mode.
NOTE
Only combo interfaces support this command. For details about the combo interface
supported by the switch, see the Hardware Description or click Info-Finder.
Format
combo-port { auto | copper | fiber }
undo combo-port
Parameters
Parameter Description Value
Views
GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Precautions
The electrical interface is used with the optical interface as a combo interface.
Combo optical interface does not support GE copper module.
Example
# Configure GE0/0/1 to work in electrical mode.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] combo-port copper
Function
The display counters protocol command displays IPv4 and IPv6 packet statistics
on an interface.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI,
S6730-H, S6730S-H, S6730-S, and S6730S-S support this command.
Format
display counters [ interface interface-type interface-number ] protocol [ rate ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
After enabling IPv4 or IPv6 packet statistics collection on an interface, you can run
this command to view packet statistics, facilitating fault location and
troubleshooting.
Example
# Display IPv4 and IPv6 packet statistics on interfaces.
<HUAWEI> display counters protocol
-: Statistic not enable
Inbound
Interface IPv4(bytes) IPv4(pkts) IPv6(bytes) IPv6(pkts)
GE0/0/20 0 0 0 0
GE0/0/21 - - 0 0
Outbound
Interface IPv4(bytes) IPv4(pkts) IPv6(bytes) IPv6(pkts)
GE0/0/20 0 0 0 0
GE0/0/21 - - 0 0
NOTE
The following switch models support this command and the command takes effect only on
the S7X08000 card:
● S5731-H24T4XC, S5731-H24P4XC, S5731-H48T4XC, S5731-H48P4XC, S5731-H24HB4XZ,
S5731-H48HB4XZ
● S5731S-H24T4XC-A, S5731S-H48T4XC-A, S5731S-H24HB4XZ-A, S5731S-H48HB4XZ-A
● S5736-S
● S5732-H24UM2CC, S5732-H48UM2CC, S5732-H48XUM2CC
Format
display card port-config-mode configuration
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
To check the card interface working mode or check whether the card interface
working mode configured using the set card port-config-mode 25g-port enable
command takes effect, run the display card port-config-mode configuration
command.
Example
# Display information about the card interface working mode.
<HUAWEI> display card port-config-mode configuration
-----------------------------------
SlotId Current Next
-----------------------------------
1 8*10G 8*10G
-----------------------------------
Item Description
Item Description
NOTE
Format
display device group-speed configuration
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run this command to check the following information:
● Default maximum rates of interfaces in MultiGE interface groups
● Maximum rates of interfaces in MultiGE interface groups, which are
configured using the assign group-speed command
● Maximum rates of interfaces in MultiGE interface groups during the current
device startup
● Maximum rates of interfaces in MultiGE interface groups for the next device
startup
Example
# Display the rates of interfaces in MultiGE interface groups.
<HUAWEI> display device group-speed configuration
Group speed configuration information:
-------------------------------------------------------------------------------
Slot Group Interfaces BaseSpeed ConfigSpeed CurrentSpeed
NextSpeed
-------------------------------------------------------------------------------
0 0 MultiGE2/0/1 ~ 2/0/12 1G 10G 10G 10G
1 MultiGE2/0/13 ~ 2/0/24 1G - 1G 1G
License used information:
-------------------------------------------------------------------------------
Slot LicenseItem ResourceCount ResourceUsed
-------------------------------------------------------------------------------
0 1G->2.5G 0 0
1G->5G 0 0
1G->10G 1 1
2.5G->5G 0 0
2.5G->10G 0 0
5G->10G 0 0
Item Description
Format
display device port-config-mode status [ slot slot-id ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
For the S5732-H24UM2CC (part number: 02353HUC/
02353HUC-003/02353HUC-004/02353SJY/
02353SJY-001/02353SJY-004/02353SJY-010/02353SJY-011/02353SJY-014/02353SJY-
015/02353SJY-016/02353SJY-019/02353SJY-002/02353SJY-003/02353SJY-012/0235
3SJY-013/02353SJY-017/02353SJY-018), S5732-H48UM2CC (part number:
02353HUB/02353HUB-002/02353HUB-003/02353SJT/
02353SJT-001/02353SJT-003/02353SJT-004/02353SJT-010/02353SJT-011/02353SJT-
013/02353SJT-014/02353SJT-015/02353SJT-016/02353SJT-018/02353SJT-002) and
S5732-H48XUM2CC, you can run the display device port-config-mode status
command to check the interface working mode and interface split information.
Example
# Display the interface working mode and interface split information on the
S5732-H24UM2CC.
<HUAWEI> display device port-config-mode status
Slot ID Port-config-mode Split-port Status
----------------------------------------------------------------------
0 4*25GE+4*10GE+40GE XGigabitEthernet0/0/1
enable
XGigabitEthernet0/0/2
XGigabitEthernet0/0/3
XGigabitEthernet0/0/4
----------------------------------------------------------------------
Item Description
Function
The display device port-type configuration command displays the maximum
rate of interfaces on the device.
NOTE
Format
display device port-type configuration
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
On the S6730-H24X4Y4C, after the maximum rate of a 10GE SFP+ Ethernet optical
interface is set to 25 Gbit/s using the assign port-type 25GE command, you can
run the display device port-type configuration command to check the maximum
rate configuration.
Precautions
Example
# Display the maximum rate of 40GE interfaces on a switch.
<HUAWEI> display device port-type configuration
-----------------------------------
SlotId Current Next
-----------------------------------
0 40GE 100GE
1 40GE 100GE
-----------------------------------
Item Description
Function
The display error-down recovery command displays information about the port
in Error-Down state, including the interface name, cause of the Error-Down event,
delay for the interface to change from Down to Up, and remaining time for the
Up event.
NOTE
An interface enters the error-down state after being shut down due to an error. Currently,
errors include the auto-defend protection, threshold crossing event, remote failure event,
MAC address flapping, link flapping, low optical power, error packets exceeding the alarm
threshold, and BPDU protection.
Format
display error-down recovery [ interface interface-type interface-number ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
The auto recovery function is configured and the delay for the an interface to
change from Down to Up is set using the error-down auto-recovery command. If
the interface is in the Error-Down state, you can run the display error-down
recovery command to view the remaining time for the Up event.
Prerequisites
The auto recovery function has been configured on an interface using the error-
down auto-recovery command.
Precautions
If interface is not specified in this command, the system displays information
about all interfaces in error-down state.
Example
# Display the delay for the interface to change from Down to Up and the
remaining time for the Up event.
<HUAWEI> display error-down recovery
interface error-down cause recovery remainder
time(sec) time(sec)
----------------------------------------------------------------------------
GigabitEthernet0/0/1 bpdu-protection 30 10
Item Description
Format
display interface ethernet brief [ main ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
You can use the display interface ethernet brief command to view brief
information about Ethernet interfaces, including the physical status, auto-
negotiation mode, duplex mode, rate, and average inbound and outbound
bandwidth usages within the last period of time. This information helps you locate
and rectify faults.
Precautions
To clear statistics on an interface, run the reset counters interface command.
Example
# Display brief information about Ethernet interfaces.
<HUAWEI> display interface ethernet brief
PHY: Physical
*down: administratively down
#down: LBDT down
(l): loopback
(b): BFD down
InUti/OutUti: input utility/output utility
Interface PHY Auto-Neg Duplex Bandwidth InUti OutUti Trunk
GigabitEthernet0/0/1 up enable half 100M 0.06% 100% --
GigabitEthernet0/0/2 up enable full 1000M 100% 100% --
GigabitEthernet0/0/3 up enable full 1000M 0% 100% --
GigabitEthernet0/0/4 up enable full 1000M 100% 100% 1
GigabitEthernet0/0/5 up enable full 1000M 99% 100% --
GigabitEthernet0/0/6 down enable half 1000M 0% 0% --
GigabitEthernet0/0/7 down enable half 1000M 0% 0% --
GigabitEthernet0/0/8 down enable full 1000M 0% 0% --
GigabitEthernet0/0/9 down enable full 1000M 0% 0% --
GigabitEthernet0/0/10 down enable full 1000M 0% 0% --
GigabitEthernet0/0/11 down enable full 1000M 0% 0% --
GigabitEthernet0/0/12 down enable full 1000M 0% 0% --
GigabitEthernet0/0/13 down enable full 1000M 0% 0% --
GigabitEthernet0/0/14 down enable full 1000M 0% 0% --
GigabitEthernet0/0/15 down enable full 1000M 0% 0% --
GigabitEthernet0/0/16 down enable full 1000M 0% 0% --
GigabitEthernet0/0/17 down enable full 1000M 0% 0% --
Table 4-21 Description of the display interface ethernet brief command output
Item Description
Item Description
Format
display port-group [ all | port-group-name ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
When using the display port-group command, note that:
● If no parameter is configured, names of all permanent port groups are
displayed.
● If all is configured, information about all permanent port groups and
interfaces in these groups is displayed.
● If port-group-name is configured, information about a specified permanent
port group and interfaces in the group is displayed.
Example
# Display information about all port groups and interfaces in these groups.
<HUAWEI> display port-group all
Portgroup: 1
GigabitEthernet0/0/1
GigabitEthernet0/0/2
GigabitEthernet0/0/3
Item Description
Function
The display port-group member-configuration command displays the
configuration of each member interface in a specified interface group.
Format
display port-group port-group-name member-configuration
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
To view the configuration of each member interface in a specified interface group,
run the display port-group member-configuration command.
Example
# Display the configuration of each member interface in an interface group
named group1.
<HUAWEI> display port-group group1 member-configuration
Portgroup: group1
#
interface GigabitEthernet0/0/1
description group1
shutdown
stp disable
#
interface GigabitEthernet0/0/2
description group1
shutdown
stp disable
#
Item Description
Format
display port-isolate group { group-id | all }
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
The port isolation feature isolates interfaces in a VLAN. Run port-isolate enable
[ group group-id ] command to add interfaces to a port isolation group, you can
implement Layer 2 isolation between these interfaces. To view the configuration
of the port isolation group, run the display port-isolate group command.
Example
# Display the configurations of all port isolation groups.
Format
display port protect-group { all | protect-group-index }
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Hosts are usually connected to an external network through a default gateway. If
the outbound interface of the default gateway fails, the hosts cannot
communicate with the external network, interrupting normal service transmission
and degrading device reliability. The port protection function solves this problem.
Without changing the networking, you can add two interfaces on the device to a
port protection group to implement interface backup in active/standby mode.
When the active interface fails, services are immediately switched to the standby
interface, ensuring non-stop service transmission.
The display port protect-group command displays information about member
interfaces in an interface protection group.
Example
# Display information about interface protection group 1 and its member
interfaces.
<HUAWEI> display port protect-group 1
Group ID : 1
-----------------------------------------------
Protect-group member Role State
-----------------------------------------------
GigabitEthernet0/0/1 Master Work
GigabitEthernet0/0/2 Standby Protect
NOTE
Format
display port split [ slot slot-id ]
Parameters
Parameter Description Value
Views
User view, system view
Default Level
1: Monitoring level
Usage Guidelines
After interfaces are split, you can run this command to view the current status of
the split and merged interface.
Example
# Display the current status of a split or merged interface.
<HUAWEI> display port split
*enable : Will be enabled after board reset
*disable : Will be disabled after board reset
Item Description
Item Description
NOTE
The service interfaces do not support this command on the following devices:
● MultiGE interface on the S5720-28X-PWH-LI-AC, S5732-H24UM2CC (part number:
02353HUC/02353HUC-003/02353HUC-004/02353SJY/
02353SJY-001/02353SJY-004/02353SJY-010/02353SJY-011/02353SJY-014/02353SJY-015
/
02353SJY-016/02353SJY-019/02353SJY-002/02353SJY-003/02353SJY-012/02353SJY-013
/02353SJY-017/02353SJY-018), S5732-H48UM2CC (part number: 02353HUB/
02353HUB-002/02353HUB-003/02353SJT/
02353SJT-001/02353SJT-003/02353SJT-004/02353SJT-010/02353SJT-011/02353SJT-013/
02353SJT-014/02353SJT-015/02353SJT-016/02353SJT-018/02353SJT-002), S5732-
H48XUM2CC, S5736-S24UM4XC
● XGE electrical interfaces on the ES5D21X08T00 card
Format
display virtual-cable-test interface-type interface-number
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
A cable test detects faults on the cable connected to an interface. If the cable is
working properly, the test result displays the total length of the cable. If the cable
cannot work properly, the test result displays the distance between the interface
and the failure point.
NOTE
The test result is only for reference and may be inaccurate for cables of some vendors.
Example
# Display the cable test result on Ethernet electrical interface GE0/0/1.
<HUAWEI> display virtual-cable-test gigabitethernet 0/0/1
VCT test last ran on: 2013-7-12 21:25:13
Item Description
VCT test last ran on Time when the last VCT test was
performed on an interface.
NOTE
● When the daylight saving time (DST) is
not used, the system displays the
following information: VCT test last ran
on: 2013-7-12 21:25:13.
● When the DST is used, the system
displays the following information: VCT
test last ran on: 2013-7-12 21:25:13 DST.
NOTE
4.2.26 duplex
Function
The duplex command sets the duplex mode for an Ethernet electrical interface in
non-auto-negotiation mode.
The undo duplex command restores the default duplex mode for an Ethernet
electrical interface in non-auto-negotiation mode.
By default, the duplex mode of an Ethernet electrical interface is full duplex when
the interface works in non-auto-negotiation mode.
NOTE
Format
duplex { full | half }
undo duplex
Parameters
Parameter Description Value
Views
Ethernet interface view, MultiGE interface view, GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
If the peer device does not support auto-negotiation, you can run this command
to manually set the duplex mode for the local interface in non-auto-negotiation
mode to ensure that the interface works in the same duplex mode as the peer
interface.
Prerequisites
Precautions
● When the working rate of a GE electrical interface is 1000 Mbit/s, the
interface supports only the full duplex mode and does not need to negotiate
the duplex mode with the peer interface.
● When an interface works in half-duplex mode, flow control does not take
effect on the interface.
● Interfaces on both ends of a link must have the same duplex mode.
Example
# Set the duplex mode to half duplex for Ethernet electrical interface GE0/0/1 in
non-auto-negotiation mode.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo negotiation auto
[HUAWEI-GigabitEthernet0/0/1] speed 100
[HUAWEI-GigabitEthernet0/0/1] duplex half
Function
The error-down auto-recovery command enables an interface in Error-Down
state to go Up and sets the auto recovery delay.
NOTE
An interface enters the Error-Down state after being shut down due to an error. Currently,
errors include the auto-defend protection, threshold crossing event, remote failure event,
MAC address flapping, link flapping, low optical power, error packets exceeding the alarm
threshold, and BPDU protection.
Format
error-down auto-recovery cause { as-not-ready | auto-defend | bpdu-
protection | efm-remote-failure | efm-threshold-event | error-statistics | runts-
error-statistics | link-flap | mac-address-flapping | port-security | transceiver-
power-low | storm-control | data-integrity-error } interval interval-value
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The restored interface is shut down again if the interface receives BPDUs again or
the link is considered unavailable in a specified time.
Precautions
The error-down auto-recovery command is invalid for the interface that has been
in Error-Down state. It takes effect for only the interface that enters the Error-
Down state after the error-down auto-recovery command is executed.
BPDU protection has been enabled using the stp bpdu-protection command in
the system view.
A threshold crossing event has been associated with an interface using the efm
threshold-event trigger error-down command in the interface view.
An error event has been associated with an interface using the efm trigger error-
down command in the interface view.
Example
# Set the delay for an interface changes from Down to Up to 50s after the edge
port is enabled with BPDU protection on an STP-enabled network.
<HUAWEI> system-view
[HUAWEI] error-down auto-recovery cause bpdu-protection interval 50
# Set the auto recovery delay to 50s after an EFM threshold crossing event is
associated with an interface.
<HUAWEI> system-view
[HUAWEI] error-down auto-recovery cause efm-threshold-event interval 50
# Set the auto recovery delay to 50s after an EFM remote failure event is
associated with an interface.
<HUAWEI> system-view
[HUAWEI] error-down auto-recovery cause efm-remote-failure interval 50
Function
The error-down-threshold error-percentage command configures the alarm
threshold for received CRC packets causing an interface status to change to Error-
Down against all the received packets on the interface and alarm interval.
Format
error-down-threshold error-percentage threshold-value interval interval-value
Parameters
threshold- Specifies the alarm threshold for The value is an integer that
value the percentage of received CRC ranges from 1 to 50.
packets causing an interface
NOTE
status change to Error-Down
against all the received packets You are advised to set the
threshold to be greater than or
on the interface. equal to the alarm threshold
configured in the trap-threshold
error-percentage command.
Views
Ethernet interface view, GE interface view, XGE interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Precautions
Example
# Set the alarm threshold for the percentage of received CRC packets causing the
interface status to change to Error-Down against all the received packets to 10%
and the interval for calculating the percentage of received CRC packets against all
the received packets to 30 seconds on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface GigabitEthernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] error-down-threshold error-percentage 10 interval 30
Function
The error-down-threshold error-statistics command configures the alarm
threshold for CRC error packets causing an interface status to change to Error-
Down and interval for receiving CRC error packets.
By default, the alarm threshold for CRC error packets is 3 and the alarm interval is
10 seconds.
Format
error-down-threshold error-statistics threshold-value interval interval-value
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
After an interface is configured to transit to the Error-Down state when the
number of received CRC error packets exceeds the threshold using the error-
statistics threshold-event trigger error-down command, the interface transits to
the Error-Down state when the number of received error packets exceeds the
threshold within the specified interval. By default, an interface transits to the
Error-Down state when the number of received error packets exceeds 3 within 10
seconds. Run the error-down-threshold error-statistics command to configure
the interval and the threshold for received error packets.
Precautions
This command is not supported on the stack interface.
On a switch running a version earlier than V200R009C00, if the alarm threshold
has been set to n and alarm interval to m seconds using the trap-threshold error-
statistics threshold-value interval interval-value command, the error-down-
threshold error-statistics n interval m configuration is automatically generated
after the system software version is upgraded to V200R009C00 or a later version.
On a switch running a version earlier than V200R009C00, if the error-down-
threshold error-statistics configuration exists on the switch, the configuration
Example
By default, the alarm threshold of CRC error packets that cause the interface
status to change to Error-Down is 10 and the alarm interval is 30 seconds.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] error-down-threshold error-statistics 10 interval 30
Format
error-statistics threshold-event trigger error-down
undo error-statistics threshold-event trigger error-down
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view,
MultiGE interface view, 40GE interface view, 100GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
When an Ethernet interface receives excessive error packets, faults such as packet
loss will occur. Because the interface is still in Up state, traffic is still transmitted
on the interface even if a backup link is configured. To avoid impact on services,
you can configure the interface to change to the Error-down state when it receives
excessive error packets. When the number of received error packets on the
interface exceeds the threshold, the system disables the interface and records the
Example
# Configure GE0/0/1 to transit to the error-down state when the number of error
packets received on the interface reaches the threshold.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] error-statistics threshold-event trigger error-down
NOTE
Only the GE electrical interfaces of the following models support this command:
S1720GF, S1720GFR-P, S1720GW-E, S1720GWR-E, S2720-EI, S5720-LI, S5720S-LI, S5720I-SI,
S5735S-H, S5736-S, S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-L, S5735S-L1,
S5735S-L-M, S5735-S, S500, S5735-S-I, S5735S-S
Format
fast-link-down disable
undo fast-link-down disable
Parameters
None
Views
GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
After an interface is enabled to go Down after a delay, the device detects the
interface Down event after a delay of hundreds of milliseconds. When the
interface alternates between Up and Down states, the interface does not go Down
immediately, enhancing the anti-interference capability of the device.
Precautions
● If the energy-efficient-ethernet enable command has been executed to
enable the EEE function on an electrical interface, the interface cannot be
enabled to go Down after a delay. If the fast-link-down disable command
has been executed to enable the interface to go Down after a delay, you can
still run the energy-efficient-ethernet enable command to enable the EEE
function on the interface.
● If the loopback detection mode has been configured on an interface using the
loopback command, the interface cannot be enabled to go Down after a
delay. If the fast-link-down disable command has been executed to enable
the interface to go Down after a delay, you can still run the loopback
command to configure the loopback detection mode for the interface.
Example
# Enable an interface to go Down after a delay.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] fast-link-down disable
Function
The fec mode base-r command enables the Base-R FEC function on an interface.
The fec mode none command disables the Base-R FEC function on an interface.
The undo fec mode command restores the default Base-R FEC configuration on
an interface.
By default, the medium on a 25GE interface determines whether the Base-R FEC
function is enabled on the interface. For details, see Table 4-27.
NOTE
Format
fec mode { base-r | none }
undo fec mode [ base-r | none ]
Parameters
Parameter Description Value
Views
25GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Base-R FEC is a bit error correction technology that adds correction information to
data packets at the transmit end, and corrects bit errors generated during data
packet transmission at the receive end based on the correction information. You
can enable the Base-R FEC function to improve the signal quality.
You can run the display interface command in any view or run the display this
interface command in the interface view to check whether the FEC function is
enabled on an interface based on the Fec field in the command output.
Prerequisites
You can run this command on an interface only when the following conditions are
met:
● Auto-negotiation is disabled on the interface.
● The interface is not a stack member interface.
Precautions
● For the device running a version earlier than V200R019C10, the Base-R FEC
function is enabled by default on interfaces and cannot be disabled. If you
Example
# Enable the Base-R FEC function on an interface.
<HUAWEI> system-view
[HUAWEI] interface 25ge 0/0/1
[HUAWEI-25GE0/0/1] fec mode base-r
Function
The fec mode rs command enables the Reed-Solomon Forward Error Correction
(RS-FEC) function on an interface.
The fec mode none command disables the RS-FEC function on an interface.
The undo fec mode command restores the default RS-FEC configuration on an
interface.
Format
fec mode { rs | none }
undo fec mode [ rs | none ]
Parameters
Parameter Description Value
Views
25GE interface view, 100GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
You can run the display interface command in any view or run the display this
interface command in the interface view to check whether the FEC function is
enabled on an interface based on the FEC field in the command output.
Precautions
● For the device running a version earlier than V200R019C00, the RS-FEC
function is enabled by default on interfaces and cannot be disabled. If you
need to disable the function, upgrade the device to V200R019C00 or a later
version.
● In V200R019C00 and later versions, if the RS-FEC function is enabled on one
end, this function also needs to be enabled on the other end to ensure that
the RS-FEC status on both ends of the link is the same.
● When a XGE optical module or XGE high-speed cable is installed on a 25GE
interface, the interface does not support the RS-FEC function.
● When a 40GE optical module or 40GE high-speed cable is installed on a
100GE interface, the interface does not support the RS-FEC function.
● The FEC function is mutually exclusive with auto-negotiation and the port
mode ge command. If FEC has been configured, the FEC configuration will be
automatically deleted when auto-negotiation is enabled or the port mode ge
command is run.
● When 25GE interfaces are interconnected, you are advised to enable FEC on
both ends of the link to reduce the transmission bit error rate of the physical
link. Otherwise, error packets may be generated.
Example
# Disable the FEC function on 100GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface 100ge 0/0/1
[HUAWEI-100GE0/0/1] fec mode none
Function
The flow-control command enables flow control on an Ethernet interface.
NOTE
Format
flow-control
undo flow-control
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface
view, 40GE interface view, 100GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Flow control prevents packet loss caused by network congestion. If network
congestion occurs on the local device after flow control is configured, the local
device sends a message to the remote device, requesting the remote device to
temporarily stop sending packets. After receiving the message, the remote device
temporarily stops sending packets to the local device regardless of the interface
working rate. In this case, the device can receive and send pause frames.
Precautions
● If flow control is enabled on an interface, it must also be enabled on the peer
interface.
● Flow control and flow control auto-negotiation can be configured on Ethernet
interfaces, but they cannot be configured concurrently.
● When an interface works in half-duplex mode, flow control does not take
effect on the interface.
● In a scenario where Layer 3 services are deployed, enabling flow control may
affect the IP traffic forwarding on the interface. As a result, the interface
becomes unavailable. You can run the undo flow-control command in the
interface view to disable flow control to recover the interface.
● If the flow control configuration is implemented on the S5735S-H and S5736-
S using the flow-control command, the rate limit for outbound traffic of the
GE electrical interface is 200 Mbit/s, and a congestion occurs, the inbound
traffic rate cannot be reduced to be the same as the outbound traffic rate on
the GE electrical interface. (The inbound traffic rate is about 200 Mbit/s.)
● For the S2730S-S, S5735-L1, S5735-L-I, S300, S5735-L, S5735S-L, S5735S-L1,
S5735S-L-M, S5735-S, S500, S5735-S-I, and S5735S-S, the multicast functions
(both Layer 2 and Layer 3 multicast functions) conflict with the flow control
function.
Example
# Enable flow control on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] flow-control
Function
The flow-control negotiation command enables flow control auto-negotiation
on an Ethernet interface.
NOTE
Format
flow-control negotiation
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Network congestion causes packet loss. Flow control can prevent packet loss. If
congestion occurs on a device, the device sends a message to request the peer
device to stop sending packets, which prevents packet loss. Flow control auto-
negotiation enables a device to determine whether to enable flow control by
negotiating with the peer device.
Prerequisites
Run the negotiation auto command to configure the Ethernet interface to work
in auto negotiation mode.
Precautions
Example
# Enable flow control auto-negotiation on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] negotiation auto
[HUAWEI-GigabitEthernet0/0/1] flow-control negotiation
Function
The flow-control negotiation receive command enables received flow control
auto-negotiation on an Ethernet interface.
NOTE
Format
flow-control negotiation receive
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Flow control prevents packet loss caused by network congestion. Received flow
control auto-negotiation enables a device to determine whether to enable
received flow control by negotiating with the peer device. On a unidirectional
communication network, you can run the flow-control negotiation receive
command on the Ethernet interface functioning as the outbound interface at the
transmit side to enable received flow control auto-negotiation, and run the flow-
control negotiation command on the inbound interface at the receive side to
enable flow control auto-negotiation. After received flow control auto-negotiation
is enabled on the Ethernet interface, if congestion occurs on a device, the device
sends a message to request the peer device to stop sending packets, which
prevents packet loss.
Prerequisites
Precautions
NOTE
Example
# Enable received flow control auto-negotiation on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] negotiation auto
[HUAWEI-GigabitEthernet0/0/1] flow-control negotiation receive
NOTE
Format
flow-control receive
undo flow-control receive
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Flow control prevents packet loss caused by network congestion. On a
unidirectional communication network, after received flow control is enabled on
the Ethernet interface at the transmit side using the flow-control receive
command and flow control is enabled on the Ethernet interface at the receive side
using the flow-control command, if congestion occurs on the device at the
receive side, the device sends a message to the device at the transmit side to
notify it to stop sending packets. After receiving the message, the device at the
transmit side temporarily stops sending packets to the device at the receive side
regardless of the interface working rate, preventing congestion. In this case, the
device at the transmit side can receive pause frames, but cannot send pause
frames; the device at the receive side can receive and send pause frames.
Precautions
● Flow control can be implemented only after flow control is enabled on the
peer device.
● Flow control, received flow control, flow control auto-negotiation, and
received flow control auto-negotiation can be configured on Ethernet
interfaces, but cannot be configured together.
● When an interface works in half-duplex mode, received flow control does not
take effect.
● In a scenario where Layer 3 services are deployed, enabling received flow
control may affect the IP traffic forwarding on the interface. As a result, the
interface becomes unavailable. You can run the undo flow-control receive
command in the interface view to disable received flow control to recover the
interface.
● For the S2730S-S, S5735-L1, S5735-L-I, S300, S5735-L, S5735S-L, S5735S-L1,
S5735S-L-M, S5735-S, S500, S5735-S-I, and S5735S-S, the multicast functions
(both Layer 2 and Layer 3 multicast functions) conflict with the flow control
function.
Example
# Enable received flow control on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] flow-control receive
4.2.38 group-member
Function
The group-member command adds specified Ethernet interfaces to a permanent
port group.
The undo group-member command deletes specified Ethernet interfaces from a
permanent port group.
By default, no Ethernet interface is added to a permanent port group.
Format
group-member { interface-type interface-number1 [ to interface-type interface-
number2 ] } &<1-10>
undo group-member { interface-type interface-number1 [ to interface-type
interface-number2 ] } &<1-10>
Parameters
Parameter Description Value
Views
Permanent port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
If you need to perform the same operations on multiple Ethernet interfaces,
configuring each interface one by one easily causes incorrect configurations and is
labor-intensive.
The port group function easily solves the problem. You can add all the Ethernet
interfaces to the same port group. After you run a configuration command once in
the port group view, the configuration takes effect on all the Ethernet interfaces in
the port group, reducing the configuration workload.
Prerequisite
Prior to running this command, run the port-group command in the system view
to create a permanent interface group.
Configuration Impact
If the group-member command is run more than once, all configurations take
effect.
Precautions
● Both physical and logical interfaces can be added to a permanent port group.
● This command has the same function as the port-group group-member
command that is used in the system view. You can also run the port-group
Example
# Add GE0/0/1 and GE0/0/2 to port group portgroup1.
<HUAWEI> system-view
[HUAWEI] port-group portgroup1
[HUAWEI-port-group-portgroup1] group-member gigabitethernet 0/0/1 to gigabitethernet 0/0/2
Format
interface { ethernet | gigabitethernet | multige | xgigabitethernet | 25ge |
40ge | 100ge } interface-number[.subinterface-number ] [ mode l2 ]
undo interface { ethernet | gigabitethernet | multige | xgigabitethernet | 25ge
| 40ge | 100ge } interface-number[.subinterface-number ]
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
After entering the specified Ethernet interface view, you can set attributes for the
Ethernet interface.
NOTE
● Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-
EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support Ethernet sub-interfaces.
● Only hybrid and trunk interfaces on the preceding switches support Layer 2 Ethernet
sub-interface configuration.
● After you run the undo portswitch command to switch Layer 2 interfaces on the
preceding series of switches into Layer 3 interfaces, you can configure Layer 3 Ethernet
sub-interfaces on the interfaces.
● After an interface is added to an Eth-Trunk, sub-interfaces cannot be configured on the
interface.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
Example
# Enter the view of GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1]
Format
interface range { interface-type interface-number1 [ to interface-type interface-
number2 ] } &<1-10>
Parameters
Parameter Description Value
interface-type Specifies Ethernet interfaces to The value of interface-
interface-number1 be added to a temporary port number2 must be larger
[ to interface-type group. than the value of
interface- interface-number1.
number2 ] to indicates an interface range.
All interfaces numbered A maximum of 48
between interface-number1 temporary port groups
and interface-number2 are can be created on a
added to the temporary port device.
group.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The port group function easily solves the problem. You can add all the Ethernet
interfaces to the same port group. After you run a configuration command once in
the port group view, the configuration takes effect on all the Ethernet interfaces in
the port group, reducing the configuration workload.
Configuration Impact
If the interface range command is run more than once, all configurations take
effect.
Precautions
different member switches to the same port group, run this command
several times or use the keyword to several times.
– The interfaces specified by interface-number1 and interface-number2
must be of the same type, for example, both of the interfaces are GE
interfaces.
– The interfaces specified before and after the keyword to must have the
same attribute. For example, both of them are main interfaces or sub-
interfaces. If they are sub-interfaces, they must belong to the same main
interface.
– If to is not specified, the preceding limitations do not apply.
– Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S,
S6720-EI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support
sub-interfaces.
Example
# Add GE0/0/1, 0/0/2, and 0/0/3 to a temporary port group.
<HUAWEI> system-view
[HUAWEI] interface range gigabitethernet 0/0/1 to gigabitethernet 0/0/3
[HUAWEI-port-group]
NOTE
Format
jumboframe enable [ value ]
undo jumboframe enable
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface
view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk
interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
When transmitting a large amount of data (such as files and videos), an Ethernet
interface may receive jumbo frames. If the jumbo frame length exceeds the
default data frame length that can be processed, the device directly discards the
jumbo frames. You can set the jumbo frame length allowed on an interface.
After you configure the device to allow jumbo frames, packet forwarding becomes
more flexible. If multiple common Ethernet frames are used to transmit a data
packet, many redundant contents such as interframe gaps (IFGs) and preambles
are also transmitted. If jumbo frames are used to transmit the data packet, fewer
frames, as well as fewer IFGs and preambles, are transmitted, improving
bandwidth efficiency.
Precautions
If you run the jumboframe enable command multiple times in the same interface
view to set the maximum frame length allowed by the interface, only the latest
configuration takes effect.
If you run the jumboframe enable command on an interface without specifying
the value parameter, the interface allows the default jumbo frame length. By
default, the jumbo frame length allowed by Ethernet interfaces of other models is
9216 bytes.
If the length of an outgoing packet exceeds the maximum frame length allowed
on an interface, the interface can directly forward the packet.
If the maximum frame length allowed by interfaces is configured in batches
through the port group function, the maximum frame length range displayed
when the jumboframe enable ? command is executed in the port group view is
1536-12288. The actual maximum frame length allowed by the interfaces is
defined in Parameters. Configure the maximum frame length as required.
Example
# Set the maximum frame length allowed by GE0/0/1 to 5000 bytes.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] jumboframe enable 5000
Format
log-threshold { input-rate | output-rate } bandwidth-in-use [ resume-rate
resume-threshold ]
undo log-threshold { input-rate | output-rate }
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface
view, 40GE interface view, 100GE interface view
Default Level
2: Configuration level
Usage Guidelines
Monitoring bandwidth usage helps you know current load on a device. If the
bandwidth usage exceeds a threshold, bandwidth resources are insufficient and
the device capacity needs to be expanded. For example, if the bandwidth usage
exceeds 95%, an alarm is generated, indicating that bandwidth resources are
almost exhausted. As a result, some services may be interrupted before device
capacity expansion.
You can configure two thresholds: low threshold (log threshold) and high
threshold (alarm threshold). The system generates a log when the bandwidth
usage exceeds the low threshold and generates an alarm when the bandwidth
usage exceeds the high threshold. This configuration ensures that you can expand
the device capacity in advance to avoid service interruptions caused by bandwidth
exhaustion.
NOTE
The trap-threshold command is used to set the bandwidth usage threshold for
generating a trap.
The log-threshold input-rate output-rate command with the following
parameters provides various functions:
● log-threshold input-rate bandwidth-in-use resume-rate resume-threshold:
sets the inbound bandwidth usage threshold for generating a log to provide
the following functions:
– If inbound bandwidth usage value exceeds the value of bandwidth-in-use,
an IFNET_BWRATE_IN_RISING log is generated, indicating that inbound
bandwidth usage exceeds the configured threshold.
– If inbound bandwidth usage value is lower than the value of resume-
threshold, an IFNET_BWRATE_IN_RESUME log is generated, indicating
that inbound bandwidth usage is lower than the configured threshold.
● log-threshold output-rate bandwidth-in-use resume-rate resume-threshold:
sets the outbound bandwidth usage threshold for generating a log to provide
the following functions:
– If outbound bandwidth usage value exceeds the value of bandwidth-in-
use, an IFNET_BWRATE_OUT_RISING log is generated, prompting for a
bandwidth increase request.
– If outbound bandwidth usage falls below the threshold specified by
resume-threshold, an IFNET_BWRATE_OUT_RESUME log is generated,
indicating that bandwidth usage has been restored.
If the offset between the value of bandwidth-in-use and the value of resume-
threshold is too small, log information may be frequently displayed.
The log threshold must be lower than the trap threshold, providing efficient
protection for services. For example, when the inbound bandwidth usage reaches
80%, a log is generated. If the inbound bandwidth usage continues to increase
and reaches 95%, a trap is generated. This ensures that a log is generated for
inbound bandwidth usage of 80%, and a trap is generated for inbound bandwidth
usage of 95%. Either the log or the trap prompts for a bandwidth increase,
preventing service interruption.
Example
# Configure GE0/0/1 to generate a log when the outbound interface rate exceeds
80% of the bandwidth.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] log-threshold output-rate 80
# Configure GE0/0/1 to generate a log when the outbound interface rate exceeds
80% of the bandwidth and to clear a log when the outbound interface rate is
lower than 60% of the bandwidth.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] log-threshold output-rate 80 resume-rate 60
Format
log-threshold { input-discard | output-discard } [ threshold-value interval
interval-value ]
undo log-threshold { input-discard | output-discard }
Parameters
Parameter Description Value
interval interval- Specifies the interval for collecting The value is an integer in
value statistics on discarded packets due the range from 60 to
to congestion. 86400, in seconds.
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view,
40GE interface view, 100GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Network congestion during service transmission may cause packet loss. If a lot of
packets are discarded, services are affected. To better monitor the number of
discarded packets, you can run the log-threshold output-discard or log-
threshold input-discard command to set the threshold for packet loss caused by
congestion and interval for collecting statistics on discarded packets in the
inbound or outbound direction of an interface. The device generates a log when
the number of discarded incoming and outgoing packets on the interface in a
specified period exceeds the threshold. Logs help you know the congestion on the
interface. You can determine whether to increase the bandwidth or cancel the
bandwidth limit on the interface based on the logs. In this way, the congestion
problem can be solved.
Precautions
● If the number of discarded incoming and outgoing packets falls below the
threshold in a specified period, the device generates a log indicating that the
number of discarded packets falls below the threshold.
● If the number of discarded packets exceeds the threshold in an interval for
collecting statistics on discarded packets, the device immediately generates a
log indicating that the number of discarded packets exceeds the threshold,
and enters the next statistics interval. In the next statistics interval, the
number of discarded packets on an interface is calculated using the following
formula:
Number of discarded packets = Current number of discarded packets -
Number of discarded packets in the beginning of the statistics interval
● If the number of discarded packets exceeds the threshold in several
consecutive statistics intervals, the device only generates a log in the first
statistics interval, indicating that the number of discarded packets exceeds the
threshold. If the number of discarded packets falls below the threshold, the
device generates a log indicating that the number of discarded packets falls
below the threshold. If the number of discarded packets on an interface
exceeds the threshold again, the device will generate a log indicating that the
number of discarded packets exceeds the threshold.
● If the user log function is disabled in the system view, the user log function no
longer takes effect in the interface view. To record user logs, run the log-
threshold { input-discard | output-discard }* command in the system view to
enable the log function first.
Example
# Set the threshold for packet loss caused by congestion to 100 and interval for
collecting statistics on discarded packets to 60 seconds in the inbound direction of
GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] log-threshold input-discard 100 interval 60
4.2.44 log-threshold
Function
The log-threshold command enables the log function for packet loss caused by
congestion on all interfaces of a device.
The undo log-threshold command disables the log function for packet loss
caused by congestion on all interfaces of a device.
By default, the log function is enabled for packet loss caused by congestion on all
interfaces of a device.
Format
log-threshold { input-discard | output-discard }*
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Enable or disable the log function for packet loss caused by congestion on all
interfaces of a device in the system view.
Example
# Enable the log function for inbound packet loss cased by congestion on a device.
<HUAWEI> system-view
[HUAWEI] log-threshold input-discard
4.2.45 loopback
Function
The loopback command enables loopback detection on an interface.
The undo loopback command disables loopback detection on an interface.
By default, loopback detection is not configured.
Format
loopback internal
undo loopback
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface
view, 40GE interface view, 100GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
When testing some special functions, for example, locating an Ethernet fault, you
need to enable loopback detection on Ethernet interfaces to check whether the
interfaces are working properly. After loopback detection is enabled on an
Ethernet interface, the interface is in Up state if it works properly, and is in Down
state if it fails.
Follow-up Procedure
Run the display interface command to check whether the current status of the
interface configured with internal loopback is Up. If the current status of the
interface is Up, the internal forwarding function works well; otherwise, a fault
occurs during internal forwarding.
After loopback detection is enabled on an interface, the Speed field in the display
this interface command output indicates the configured interface rate or the rate
of the installed optical module, copper module, or network cable, and the
Bandwidth field in the display interface ethernet brief command output
indicates the actual interface rate. Installing and then removing the optical or
copper module or restarting the device may affect the actual interface rate.
Precautions
● Loopback detection interrupts the operation of Ethernet interfaces and links.
After loopback detection is performed, run the undo loopback command to
disable loopback detection immediately.
● You cannot run the loopback command to perform loopback detection on a
fabric port.
● The loopback command and the single-fiber enable command cannot be
configured on the same interface.
Example
# Configure loopback detection on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] loopback internal
Warning: The configuration may cause loops.
4.2.46 loopbacktest
Function
The loopbacktest command configures internal loopback detection on an
interface.
By default, internal loopback detection is not configured.
Format
loopbacktest internal
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view
Default Level
3: Management level
Usage Guidelines
You can run the loopbacktest command to check whether the internal forwarding
chip functions properly.
NOTE
Example
# Configure internal loopback detection on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
4.2.47 mdi
Function
The mdi command configures the medium dependent interface (MDI) mode of an
Ethernet electrical interface.
The undo mdi command restores the default MDI mode of an Ethernet electrical
interface.
By default, an Ethernet electrical interface automatically identifies the network
cable type.
Format
mdi { across | auto | normal }
undo mdi
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Twisted pairs used to connect Ethernet devices include:
● Straight-through cable: connects devices of different types, such as a switch
and a PC or a switch and a router.
● Crossover cable: connects devices of the same type, such as two switches, two
routers, or two PCs.
Generally, if two interfaces are connected with a twisted-pair cable, the receive pin
on the local end must be connected to the transmit pin on the remote end and
the transmit pin on the local end must be connected to the receive pin on the
remote end so that a link can be Up. According to pin assignment, twisted-pair
cables are classified into straight-through and crossover cables. The device must
support negotiation and crossover of receive and transmit pins so that Ethernet
electrical interfaces can support the two types of twisted-pair cables. The device
supports the following medium dependent interface (MDI) modes: auto, normal,
and across.
Generally, when interfaces at both ends work in auto mode, devices can
communicate regardless of whether the straight-through or crossover cable is
used. Set the MDI mode to normal or across only when the device cannot identify
the network cable type. When configuring an MDI mode on an interface, pay
attention to the following points:
● When a straight-through cable is used, the local and remote interfaces must
use different MDI modes, for example, across mode on one end and normal
mode on the other end.
● When a crossover cable is used, the local and remote interfaces must use the
same MDI mode. For example, both ends must use the across or normal
mode, or at least one end uses the auto mode
NOTE
Example
# Set the MDI mode of GE0/0/1 to across.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] mdi across
The undo negotiation active command cancels the slave mode configuration on
an interface.
Format
negotiation active
Parameters
None
Views
MultiGE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Precautions
● It is recommended that you run this command on an interface working in
auto-negotiation mode.
● When MultiGE interfaces of two switches are connected, you cannot configure
the negotiation active command on the MultiGE interfaces simultaneously;
otherwise, the MultiGE interfaces cannot go Up.
Example
# Configure MultiGE 0/0/1 to work in slave mode.
<HUAWEI> system-view
[HUAWEI] interface MultiGE 0/0/1
[HUAWEI-MultiGE0/0/1] negotiation active
Format
negotiation auto
undo negotiation auto
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, port group view, Meth interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Earlier Ethernet worked in 10M half-duplex mode and required mechanisms such
as Carrier Sense Multiple Access (CSMA)/Collision Detection (CD) to ensure
system stability. As Ethernet technology develops, full-duplex Ethernet and 100
Mbit/s Ethernet emerge. This greatly improves Ethernet performance. Auto-
negotiation technology allows new Ethernet to be compatible with earlier
Ethernet. In auto-negotiation mode, interfaces on both ends of a link negotiate
their operating parameters, including the duplex mode and rate. If the negotiation
succeeds, the two interfaces work at the same operating parameters.
Precautions
● For details about Ethernet interfaces supporting the auto-negotiation
function, see Licensing Requirements and Limitations for Ethernet Interfaces.
● By default, auto-negotiation is enabled on GE optical interfaces and rate
auto-negotiation is disabled. You can run the speed auto-negotiation
command to enable rate auto-negotiation.
● When a GE optical module is installed on an XGE optical interface, the
interface works in auto-negotiation mode by default. To configure the
interface to work in non-auto-negotiation mode, run the undo negotiation
auto command. If you replace the GE optical module with an XGE optical
module, the interface does not support the auto-negotiation mode and works
in non-auto-negotiation mode by default. If you replace the XGE optical
module with a GE optical module, the undo negotiation auto command
configuration becomes ineffective. If you need the interface to still work in
non-auto-negotiation mode, reconfigure this command.
● After configuring the auto-negotiation function on an interface, if you remove
and install a single optical fiber on the interface, the interface may be Up and
the remote interface may be Down. You can run the shutdown and undo
shutdown commands on the remote interface to make the remote interface
go Up.
Example
# Configure GE0/0/1 to work in non-auto negotiation mode.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo negotiation auto
NOTE
Format
negotiation priority { 802.3bz | mgbase-t }
undo negotiation priority
Parameters
Parameter Description Value
Views
MultiGE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
If the peer device supports 2.5 Gbit/s or 5 Gbit/s rate when the peer device
connects to the MultiGE interface of Huawei switch and the peer device uses the
proprietary protocol Mgbase-t of the Broadcom company, the MultiGE interface of
the interconnected Huawei switch may fail to be enabled. You can configure
Mgbase-t as the protocol that the MultiGE interface on the Huawei switch
preferentially uses, so that the MultiGE interface can be properly enabled.
Example
# Configure Mgbase-t as the protocol that a MultiGE interface in auto-negotiation
mode preferentially uses.
<HUAWEI> system-view
[HUAWEI] interface MultiGE 0/0/1
[HUAWEI-MultiGE0/0/1] negotiation priority mgbase-t
NOTE
Only the XGE electrical interfaces of the ES5D21X08T00 cards support this command.
Format
port clock-mode slave
Parameters
None
Views
XGE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Precautions
If the interfaces on both ends are configured to work in slave mode, clock
negotiation will fail and the interfaces cannot go Up.
Example
# Set the clock negotiation mode of an XGE electrical interface to slave.
<HUAWEI> system-view
[HUAWEI] interface XGigabitEthernet 0/1/1
[HUAWEI-XGigabitEthernet0/1/1] port clock-mode slave
Format
port link-flap interval interval-value
undo port link-flap interval
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Link flapping occurs when the physical status of an interface frequently alternates
between Up and Down due to network flapping or network cable faults. Link
flapping causes frequent network topology changes and affects user
communication. For example, two links work in primary/backup mode. If the
interface of the primary link experiences frequent Up/Down transitions, flows are
switched between the primary and backup links. Frequent service switchovers
increase load of the device and may result in service data loss.
Link flapping protection can solve the problem. You can configure this function to
disable an interface that frequently alternates between Up and Down. When the
interface is Down, the network topology will not change frequently. In the
preceding example, you can configure link flapping protection on the interface of
the primary link to prevent frequent topology changes. When the system detects
frequent physical status changes on the interface of the primary link, the system
directly disables the interface to trigger a primary/backup link switchover. The
backup link then steadily transmits services. The link flapping protection function
involves the following parameters:
● Number of link flappings: One link flapping refers to one interface Up/Down
transition.
● Link flapping period: It is a period during which the system counts the
number of link flappings.
If the number of link flappings on an interface reaches the threshold within a link
flapping period, the system disables the interface and records its status as ERROR
DOWN(link-flap), indicating that the interface is Down because of link flappings.
By default, after link flapping protection is enabled, an interface goes Down if its
status changes five times within 10 seconds.
Prerequisites
The configured interval takes effect only after link flapping protection is enabled
using the port link-flap protection enable command on the interface.
Precautions
If you run the port link-flap interval command multiple times in the same
interface view, only the latest configuration takes effect.
Example
# Set the link flapping detection interval to 50s on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-flap interval 50
Function
The port link-flap protection enable command enables link flapping protection
on an interface.
The undo port link-flap protection enable command disables link flapping
protection on an interface.
Format
port link-flap protection enable
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Link flapping occurs when the physical status of an interface frequently alternates
between Up and Down due to network flapping or network cable faults. Link
flapping causes frequent network topology changes and affects user
communication. For example, two links work in primary/backup mode. If the
interface of the primary link experiences frequent Up/Down transitions, flows are
switched between the primary and backup links. Frequent service switchovers
increase load of the device and may result in service data loss.
Link flapping protection can solve the problem. You can configure this function to
disable an interface that frequently alternates between Up and Down. When the
interface is Down, the network topology will not change frequently. In the
preceding example, you can configure link flapping protection on the interface of
the primary link to prevent frequent topology changes. When the system detects
frequent physical status changes on the interface of the primary link, the system
directly disables the interface to trigger a primary/backup link switchover. The
backup link then steadily transmits services. The link flapping protection function
involves the following parameters:
● Number of link flappings: One link flapping refers to one interface Up/Down
transition.
● Link flapping period: It is a period during which the system counts the
number of link flappings.
If the number of link flappings on an interface reaches the threshold within a link
flapping period, the system disables the interface and records its status as ERROR
DOWN(link-flap), indicating that the interface is Down because of link flappings.
By default, after link flapping protection is enabled, an interface goes Down if its
status changes five times within 10 seconds.
Follow-up Procedure
● Run the port link-flap interval interval-value command to set the link
flapping interval for the interface.
● Run the port link-flap threshold threshold-value command to set the
number of link flappings for the interface.
● An interface in Error-down state can be recovered using either of the
following methods:
– Manual recovery: If a few interfaces need to be recovered forcibly, run the
shutdown and undo shutdown commands in the interface view.
Alternatively, run the restart command in the interface view to restart
the interfaces.
Example
# Enable link flapping protection on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-flap protection enable
Function
The port link-flap threshold command sets the maximum number of link
flapping events on an interface.
The undo port link-flap threshold command restores the default maximum
number of link flapping events on an interface.
Format
port link-flap threshold threshold-value
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Link flapping occurs when the physical status of an interface frequently alternates
between Up and Down due to network flapping or network cable faults. Link
flapping causes frequent network topology changes and affects user
communication. For example, two links work in primary/backup mode. If the
interface of the primary link experiences frequent Up/Down transitions, flows are
switched between the primary and backup links. Frequent service switchovers
increase load of the device and may result in service data loss.
Link flapping protection can solve the problem. You can configure this function to
disable an interface that frequently alternates between Up and Down. When the
interface is Down, the network topology will not change frequently. In the
preceding example, you can configure link flapping protection on the interface of
the primary link to prevent frequent topology changes. When the system detects
frequent physical status changes on the interface of the primary link, the system
directly disables the interface to trigger a primary/backup link switchover. The
backup link then steadily transmits services. The link flapping protection function
involves the following parameters:
● Number of link flappings: One link flapping refers to one interface Up/Down
transition.
● Link flapping period: It is a period during which the system counts the
number of link flappings.
If the number of link flappings on an interface reaches the threshold within a link
flapping period, the system disables the interface and records its status as ERROR
DOWN(link-flap), indicating that the interface is Down because of link flappings.
By default, after link flapping protection is enabled, an interface goes Down if its
status changes five times within 10 seconds.
Prerequisites
The port link-flap threshold command configuration takes effect only after link
flapping protection is enabled using the port link-flap protection enable
command on the interface.
Precautions
If you run the port link-flap threshold command multiple times in the same
interface view, only the latest configuration takes effect.
Example
# Set the maximum number of link flapping events on GE0/0/1 to 10.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-flap threshold 10
4.2.55 port-group
Function
The port-group command creates a permanent port group and displays the
permanent port group view.
Format
port-group port-group-name
undo port-group { all | port-group-name }
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
If you need to perform the same operations on multiple Ethernet interfaces,
configuring each interface one by one easily causes incorrect configurations and is
labor-intensive.
The port group function easily solves the problem. You can add all the Ethernet
interfaces to the same port group. After you run a configuration command once in
the port group view, the configuration takes effect on all the Ethernet interfaces in
the port group, reducing the configuration workload.
Two types of port groups are available:
Example
# Create port group portgroup1 and enter the port group view.
<HUAWEI> system-view
[HUAWEI] port-group portgroup1
[HUAWEI-port-group-portgroup1]
Format
port-group group-member { interface-type interface-number1 [ to interface-type
interface-number2 ] } &<1-10>
Parameters
Parameter Description Value
interface-type Specifies Ethernet interfaces to be The value of
interface-number1 added to a temporary port group. interface-number2
[ to interface-type must be larger than
interface-number2 ] to indicates an interface range. All the value of
interfaces numbered between interface-number1.
interface-number1 and interface-
number2 are added to the
temporary port group.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
If you need to perform the same operations on multiple Ethernet interfaces,
configuring each interface one by one easily causes incorrect configurations and is
labor-intensive.
The port group function easily solves the problem. You can add all the Ethernet
interfaces to the same port group. After you run a configuration command once in
the port group view, the configuration takes effect on all the Ethernet interfaces in
the port group, reducing the configuration workload.
Two types of port groups are available:
● Temporary port group: To temporarily deliver a configuration to multiple
interfaces, you can create a temporary port group. After you deliver the
configuration and exit from the port group view, the system automatically
deletes the temporary port group.
● Permanent port group: To deliver configurations to interfaces multiple times,
you can create a permanent port group. After you exit from the port group
view, the port group and member interfaces in the group still exist, facilitating
subsequent batch configuration for the member interfaces. To delete a
permanent port group, run the undo port-group { all | port-group-name }
command.
Configuration Impact
If the port-group group-member command is run more than once, all
configurations take effect.
Precautions
● The port-group group-member command is equivalent to the group-
member command executed in the permanent port group view. Multiple
Example
# Add GE0/0/1, GE0/0/2, and GE0/0/3 to a temporary port group.
<HUAWEI> system-view
[HUAWEI] port-group group-member gigabitethernet 0/0/1 to gigabitethernet 0/0/3
[HUAWEI-port-group]
Function
The port-isolate enable command enables port isolation.
Format
port-isolate enable [ group group-id ]
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 40GE interface view, 100GE interface view, 25GE interface view, , port group
view, Eth-Trunk interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To implement Layer 2 isolation between interfaces, add different interfaces to
different VLANs. This, however, wastes VLAN resources. To save VLAN resources,
enable port isolation to isolate interfaces in a VLAN. That is, you can add
interfaces to a port isolation group to implement Layer 2 isolation between these
interfaces. Port isolation provides secure and flexible networking schemes for
customers.
Precautions
● After port isolation is configured, ports are isolated at Layer 2 but can
communicate at Layer 3 by default. To configure both Layer 2 isolation and
Layer 3 isolation, run the port-isolate mode all command.
● Interfaces in a port isolation group are isolated from each other, but
interfaces in different port isolation groups can communicate. If group-id is
not specified, interfaces are added to port isolation group 1 by default.
● There is no limit on the number of members in a port isolation group on the
S200, S1730S-S, and S1730S-S1. The maximum number of members in a port
isolation group on other switch models is 512.
● In the same VLAN, if the mac-address learning disable command is run to
disable MAC address learning and traffic is forwarded in broadcast mode, the
device first copies the traffic received on the inbound interface before
checking whether port isolation is configured, though port isolation has been
configured. When the copied traffic exceeds the chip performance, the device
discards the traffic, resulting in packet loss in forwarding.
Example
# Enable port isolation on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port-isolate enable group 1
Format
port-isolate exclude vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>
undo port-isolate exclude vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
To enable communication between users in a VLAN where port isolation needs to
be disabled, run the port-isolate exclude vlan command to exclude the VLAN.
Only S1720GW, S1720GW-E, S1720GWR, S1720GWR-E, S1720GF, S1720GFR-P,
S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5735S-H, S5736-S, S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and S6730S-S
support this command.
Example
# Exclude VLAN 10 where port isolation needs to be disabled.
<HUAWEI> system-view
[HUAWEI] port-isolate exclude vlan 10
Format
protect-group member interface-type interface-number { master | standby }
undo protect-group member interface-type interface-number
Parameters
Parameter Description Value
Views
Interface protection group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Hosts are usually connected to an external network through a default gateway. If
the outbound interface of the default gateway fails, the hosts cannot
Prerequisites
An interface protection group has been created using the port protect-group
command.
Precautions
Example
# Add GigabitEthernet0/0/1 to an interface protection group.
<HUAWEI> system-view
[HUAWEI] port protect-group 1
[HUAWEI-protect-group1] protect-group member gigabitethernet 0/0/1 master
Function
The port mode ge command configures a 25GE interface to work at the rate of 1
Gbit/s.
The undo port mode command restores the rate of a 25GE interface to 25 Gbit/s.
NOTE
Format
port mode ge
Parameters
None
Views
25GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
A 25GE interface can work at the rate of 1 Gbit/s. You can configure the rate as
required and replace the transmission medium.
On the S6730-H28Y4C, each group of interfaces numbered 1 to 4, 5 to 8, 9 to 16,
17 to 20, 21 to 24, and 25 to 28 belong to an interface group. On the S7X08000
and S7X0800K0 cards, every four of interfaces numbered 1 to 4, 5 to 8, 9 to 12,
and so on belong to an interface group, all interfaces in the same interface group
will be configured to work at the same rate.
Precautions
● Configure the remote interface to work at the same rate as that of the local
interface.
● Ensure that all interfaces in the interface group in which the interface rate is
to be changed are in Down status before running this command. If the status
of an interface is Up, run the shutdown command on the interface and then
change the interface rate.
● For the S5732-H24UM2CC, S5732-H48UM2CC, S5732-H48XUM2CC, S6730-
H28Y4C, S6730-H24X4Y4C, and S7Y08000 cards, after the port mode ge
command is run on an interface, if any of the four 25GE interfaces in an
interface group is Up, the command configuration will not be cleared after
the clear configuration this or clear configuration interface command is
run. If all the four 25GE ports in an interface group are Down, the command
configuration will be cleared after the clear configuration this or clear
configuration interface command is run.
● For the S7X08000 card, after the port mode ge command is run on an
interface, if one of two 25GE interfaces is Up, the command configuration will
not be cleared after the clear configuration this or clear configuration
interface command is run. If both 25GE interfaces are Down, the command
configuration will be cleared after the clear configuration this or clear
configuration interface command is run.
● After the port mode ge command is run on a specific interface, running the
clear configuration this or clear configuration interface command will not
clear the port mode ge command configuration if some other interfaces in
the interface group where the specific interface belongs are Up. When all the
interfaces in the interface group are Down, running the clear configuration
this or clear configuration interface command will clear the port mode ge
command configuration.
● 25GE interfaces split from other interfaces cannot work at the rate of 1 Gbit/s.
Example
# Configure a 25GE interface to work at the rate of 1 Gbit/s.
<HUAWEI> system-view
[HUAWEI] interface 25ge 0/1/1
[HUAWEI-25GE0/1/1] port mode ge
Warning:The interface(s)(25GE0/1/1,25GE0/1/2) will be converted to GE mode.[Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment....done.
Format
port-isolate mode { l2 | all }
undo port-isolate mode
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To implement Layer 2 isolation between interfaces, you can add different
interfaces to different VLANs. This wastes VLAN resources. Port isolation can
isolate interfaces in the same VLAN. That is, you only need to add interfaces to a
port isolation group to implement Layer 2 isolation between these interfaces. Port
isolation provides secure and flexible networking schemes.
You can configure the interface isolation mode to all to implement Layer 2 and
Layer 3 isolation between interfaces in a port isolation group.
NOTE
Example
# Configure Layer 2 isolation and Layer 3 communication.
<HUAWEI> system-view
[HUAWEI] port-isolate mode l2
Format
port media type { copper | fiber }
undo port media type { copper | fiber }
Parameters
Parameter Description Value
Views
GE interface view
Default Level
2: Configuration level
Usage Guidelines
This command only distinguishes optical interface configuration and electrical
interface configuration, and is not configurable.
If you have specified the interface attributes (such as auto-negotiation, speed, and
full-duplex mode) on a combo interface, the system automatically generates this
command to determine whether an interface configuration item belongs to the
optical interface or electrical interface. After this command is generated, the
configuration for the other interface type (such as optical interface) will not be
lost if the combo interface works as an electrical interface.
For example, after you run the display this command on a combo interface, the
interface configuration is as follows:
#
interface GigabitEthernet0/0/1
port media type copper
undo negotiation auto
speed 100
port media type fiber
undo negotiation auto
#
The command output shows that there are two configuration items undo
negotiation auto and speed 100 when the combo interface works as an electrical
interface and one configuration item undo negotiation auto when the combo
interface works as an optical interface.
Example
None
Format
port media type { copper | fiber }
undo port media type { copper | fiber }
Parameters
Parameter Description Value
Views
XGE interface view
Default Level
2: Configuration level
Usage Guidelines
This command cannot be manually configured and belongs to internal
implementation commands. This command only distinguishes optical interface
configuration and electrical interface configuration, and is not configurable.
If you have installed a copper module on an XGE interface and specified the
interface attributes (such as auto-negotiation, speed, and full-duplex mode), the
system automatically generates this command to determine whether an interface
configuration item belongs to the optical or electrical interface.
For example, after you run the display this command on an XGE interface, the
interface configuration is as follows:
#
interface XGigabitEthernet0/0/1
port media type copper
mdi across
port media type fiber
als enable
#
The command output indicates that there is one configuration item mdi across
when the XGE interface works as an electrical interface and one configuration
item als enable when the XGE interface works as an optical interface.
Example
None
Format
port media type { copper | fiber }
undo port media type { copper | fiber }
Parameters
Parameter Description Value
Views
25GE interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
This command only distinguishes optical interface configuration and electrical
interface configuration, and is not configurable.
If you have run the port mode ge command to configure a 25GE interface to
work at the rate of 1 Gbit/s, installed a GE copper module on the 25GE interface,
and specified the interface attributes (such as auto-negotiation and MDI type) for
the 25GE interface, the system automatically generates this command to
determine whether an interface configuration item belongs to the optical or
electrical interface.
For example, after you run the display this command on a 25GE interface, the
interface configuration is as follows:
#
interface 25GigabitEthernet0/0/1
port media type copper
mdi across
port media type fiber
als enable
#
The command output indicates that there is one configuration item mdi across
when the 25GE interface works as an electrical interface and one configuration
item als enable when the 25GE interface works as an optical interface.
Example
None
Format
port protect-group protect-group-index
undo port protect-group protect-group-index
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Follow-up Procedure
Run the protect-group member command to add the specified Ethernet interface
to an interface protection group.
Example
# Create an interface protection group.
<HUAWEI> system-view
[HUAWEI] port protect-group 1
Function
The port split command splits a specified interface.
The undo port split command cancels the split configuration on an interface.
NOTE
Format
port split split-type 40GE:4*XGE
Parameters
Parameter Description Value
Views
XGE interface view, 40GE interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To split an interface, run the port split split-type command in the view of the
interface. To merge converted interfaces into the original interface, run the undo
port split command in the view of only one of the converted interfaces.
Precautions
● After configuring interface split using the port split split-type command,
restart the interface card to make the configuration take effect.
● If interface split or merge is configured on an interface, the original
configuration on the interface is lost. Therefore, exercise caution when
deciding to perform the interface split or merge operation.
● 10GE interfaces converted from a 40GE interface are numbered based on the
number of the last 10GE interface on the switch. For interfaces on the switch
panel, if the last 10GE interface is numbered XGE 0/y/m and a 40GE interface
to be split is numbered 40GE 0/y/n, the four 10GE interfaces converted from
the 40GE interface are numbered XGE 0/y/(m + 4 * (n - 1) + z + 1). For
example, if the last 10GE interface on a switch is numbered XGE 0/0/48, the
four 10GE interfaces converted from 40GE 0/0/3 are numbered XGE 0/0/57,
XGE 0/0/58, XGE 0/0/59, and XGE 0/0/60. For interfaces on a card, m has a
fixed value of 0. For example, the four 10GE interfaces converted from 40GE
1/1/1 on a card are numbered XGE 1/1/1, XGE 1/1/2, XGE 1/1/3, and XGE
1/1/4.
Split interfaces are numbered in the same sequence as the wires of a cable are numbered.
For example, in a 1-to-4 cable, the wire numbered 1 corresponds to the interface with the
lowest interface number, and the wire numbered 4 corresponds to the interface with the
highest interface number.
● After interface split is configured, the interface and converted interfaces
cannot be added to a stack interface, regardless of whether the configuration
takes effect. If an interface has been added to a stack interface, the interface
cannot be split.
● After configuring interface split using the port split split-type 40GE:4*XGE
command, or using the undo port split command, restart the device to make
the configuration take effect. You can run the display port split command in
any view to check the status of a split interface.
Example
# Split a 40GE interface into four 10GE interfaces and restart the device to make
the configuration take effect.
<HUAWEI> system-view
[HUAWEI] interface 40GE 0/0/1
[HUAWEI-40GE0/0/1] port split split-type 40GE:4*XGE
Warning: This command will take effect only after resetting the board. 40GE0/0/1 will be split up into XGE,
and the port configuration will be lost when the port type is changed. Continue? [Y/N]:y
Info: Succeeded in setting the configuration.
[HUAWEI-40GE0/0/1] return
<HUAWEI> reboot
Info: The system is now comparing the configuration, please wait.
Warning: The configuration has been modified, and it will be saved to the next startup saved-configuration
file flash:/device.cfg. Continue? [Y/N]:y
Now saving the current configuration to the slot 0.
Save the configuration successfully.
Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save
diagnostic-information'.
System will reboot! Continue?[Y/N]:y
Function
The port serdes-mode command configures the Serdes mode of a MultiGE
interface.
The undo port serdes-mode command restores the default Serdes mode of a
MultiGE interface.
NOTE
Format
port serdes-mode { 2500-base-x | 5000-base-x } { sgmii | xfi }
port serdes-mode sgmii xfi
undo port serdes-mode
Parameters
Parameter Description Value
Views
MultiGE interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
By default, when a MultiGE interface on the S5732-H24UM2CC (part number:
02353HUC/02353HUC-003/02353HUC-004/02353SJY/
02353SJY-001/02353SJY-004/02353SJY-010/02353SJY-011/02353SJY-014/02353SJY-
015/02353SJY-016/02353SJY-019/02353SJY-002/02353SJY-003/02353SJY-012/0235
3SJY-013/02353SJY-017/02353SJY-018), S5732-H48UM2CC (part number:
02353HUB/02353HUB-002/02353HUB-003/02353SJT/
02353SJT-001/02353SJT-003/02353SJT-004/02353SJT-010/02353SJT-011/02353SJT-
013/02353SJT-014/02353SJT-015/02353SJT-016/02353SJT-018/02353SJT-002)
works at the rate of 2.5 Gbit/s or 5 Gbit/s, the Serdes mode of the MultiGE
interface is 10G. When a Huawei device is connected to a non-Huawei device, if
the preamble of packets sent from the non-Huawei device is not fixed, the
MultiGE interface connecting the Huawei device to the non-Huawei device
discards the packets. To prevent this problem, when a Huawei device connects to a
non-Huawei device and receives the ENTITYTRAP_1.3.6.1.4.1.2011.5.25.219.2.2.3
hwBoardFail alarm with EntityTrapFaultID being 132282, run the port serdes-
mode command to change the Serdes mode of the MultiGE interface to 2.5G or
5G based on the alarm information.
Precautions
MultiGE interfaces of different devices can be split into separate interface groups
based on rules. MultiGE interfaces in each interface group support only two Serdes
modes.
Example
# Configure a MultiGE interface to work in 2.5G or 10G Serdes mode.
<HUAWEI> system-view
[HUAWEI] interface MultiGE 0/0/1
[HUAWEI-MultiGE0/0/1] port serdes-mode 2500-base-x xfi
4.2.68 portswitch
Function
The portswitch command changes the working mode of Ethernet interfaces from
Layer 3 mode to Layer 2 mode.
The undo portswitch command changes the working mode of Ethernet interfaces
from Layer 2 mode to Layer 3 mode.
Format
portswitch
undo portswitch
Parameters
None
Views
GE interface view, XGE interface view, 25GE interface view, 40GE interface view,
100GE interface view, Eth-Trunk interface view, port group view, MultiGE interface
view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Precautions
Only interfaces on the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support switching between Layer 2
and Layer 3 modes.
Ethernet interfaces working at Layer 3 support IP address configuration.
By default, Ethernet interfaces on the device work at Layer 2 mode and have been added to
VLAN 1. You can run the undo portswitch command to change the working mode to Layer
3 mode. The Ethernet interfaces are removed from VLAN 1 only after Layer 3 protocols
become Up.
Example
# Change the working mode of GE0/0/1 from Layer 2 mode to Layer 3 mode.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] ip address 10.10.10.10 255.255.255.0
Function
The portswitch batch command changes the working mode of Ethernet
interfaces from Layer 3 mode to Layer 2 mode in batches.
The undo portswitch batch command changes the working mode of Ethernet
interfaces from Layer 2 mode to Layer 3 mode in batches.
Format
portswitch batch interface-type { interface-number1 [ to interface-number2 ] }
&<1-10>
Parameters
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
You can run the portswitch batch or undo portswitch batch command to
change the working mode of interfaces in batches.
Precautions
● The mode switching function takes effect when the interface only has
attribute configurations (for example, shutdown and description
configurations). If the service configuration (for example, port link-type
access configuration) exists on the interface, you must clear the service
configuration before running this command.
● The minimum interval between running the portswitch batch and undo
portswitch batch commands must be 30s.
NOTE
Only interfaces on the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support switching between Layer 2
and Layer 3 modes.
Ethernet interfaces working at Layer 3 support IP address configuration.
Example
# Change the working mode of GE0/0/1, 0/0/2, and 0/0/3 to Layer 2 mode.
<HUAWEI> system-view
[HUAWEI] portswitch batch gigabitethernet 0/0/1 0/0/2 0/0/3
Format
reset statistics-peak interface interface-type interface-number
NOTE
Parameters
Parameter Description Value
Views
All views
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Generally, the PIR of an interface indicates the maximum rate of the interface in a
long time. To check the recent peak rate of an interface, run the reset statistics-
peak command to clear the previous peak rate record and obtain the new peak
rate. To view the peak rate of an interface, run the display interface command.
The following information is displayed:
Input peak rate 244425848 bits/sec,Record time: 2008-01-01 00:16:37
Output peak rate 753496 bits/sec,Record time: 2008-01-15 19:25:12
Precautions
PIR statistics on a specified interface cannot be restored after they are cleared.
Exercise caution before clearing the statistics.
Example
# Clear PIR statistics on GE0/0/1.
<HUAWEI> reset statistics-peak interface gigabitethernet 0/0/1
Function
The reset statistics-peak interface command clears peak information rate (PIR)
statistics on all the interfaces in one click.
Format
reset statistics-peak interface
NOTE
Parameters
None
Views
User view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Generally, the PIR of an interface indicates the maximum rate of the interface in a
long time. To check the recent PIR of a specified interface, run the reset statistics-
peak command to clear the previous PIR statistics and obtain the new PIR. To
check recent PIR statistics on multiple or all interfaces, you may need to spend a
long time in clearing the PIR statistics, increasing the workload. To reduce the
workload, you can run this command in the user view to clear PIR statistics on all
the interfaces.
Precautions
PIR statistics on an interface cannot be restored after they are cleared. Exercise
caution before clearing the statistics.
Example
# Clear PIR statistics on all the interfaces.
<HUAWEI> reset statistics-peak interface
NOTE
The service interfaces do not support this command on the following devices:
● MultiGE interface on the S5720-28X-PWH-LI-AC, S5732-H24UM2CC (part number:
02353HUC/02353HUC-003/02353HUC-004/02353SJY/
02353SJY-001/02353SJY-004/02353SJY-010/02353SJY-011/02353SJY-014/02353SJY-015
/
02353SJY-016/02353SJY-019/02353SJY-002/02353SJY-003/02353SJY-012/02353SJY-013
/02353SJY-017/02353SJY-018), S5732-H48UM2CC (part number: 02353HUB/
02353HUB-002/02353HUB-003/02353SJT/
02353SJT-001/02353SJT-003/02353SJT-004/02353SJT-010/02353SJT-011/02353SJT-013/
02353SJT-014/02353SJT-015/02353SJT-016/02353SJT-018/02353SJT-002), S5732-
H48XUM2CC, S5736-S24UM4XC
● XGE electrical interfaces on the ES5D21X08T00 card
Format
reset virtual-cable-test { interface-type interface-number | all }
Parameters
Parameter Description Value
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Before conducting a cable test on an electrical interface, you can use this
command to delete the previous test results.
Precautions
The cable test results cannot be restored after being cleared. Exercise caution
before clearing the statistics.
Example
# Delete cable test results on GE0/0/1.
<HUAWEI> reset virtual-cable-test gigabitethernet 0/0/1
NOTE
The following switch models support this command and the command takes effect only on
the S7X08000 card:
● S5731-H24T4XC, S5731-H24P4XC, S5731-H48T4XC, S5731-H48P4XC, S5731-H24HB4XZ,
S5731-H48HB4XZ
● S5731S-H24T4XC-A, S5731S-H48T4XC-A, S5731S-H24HB4XZ-A, S5731S-H48HB4XZ-A
● S5736-S
● S5732-H24UM2CC, S5732-H48UM2CC, S5732-H48XUM2CC
Format
set card port-config-mode 25g-port enable slot slot-id
undo set card port-config-mode 25g-port enable slot slot-id
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
By default, the card interface working mode is 10GE, and the number of interfaces
is 8*10GE. To use 25GE interfaces, run the set card port-config-mode 25g-port
enable command. In this case, the number of interfaces on the card is 2*25GE,
and the last six interfaces are unavailable.
Precautions
● After running this command, you need to confirm the automatic reset of
cards as prompted to make the configuration take effect.
● After the interface working mode is changed, replace the connection medium.
● When the interface working mode of a card is being changed, the card cannot
be removed and then reinstalled.
● After you run the reset factory-configuration command to restore factory
settings and restart the device, the card interface working mode is restored to
10GE.
● If there are stack ports on a card, changing the card interface working mode
may cause a stack split after the card is reset.
Example
# Configure the card interface working mode to 25GE.
<HUAWEI> system-view
[HUAWEI] set card port-config-mode 25g-port enable slot 1
Warning: Only the first two ports will be available after the subcard is automatically initialized. Continue?
[Y/N]:y
Warning: The subcard needs to be reset for the new port mode to take effect. Ensure that subcard is
properly installed during re-ini
tialization. Otherwise, port mode switching fails. Continue? [Y/
N]:y
Info: The system is executing the command. Please wait.....................................
Info: The port mode is changed successfully.
NOTE
Format
set device port-config-mode port-config-mode enable { all | slot slot-id }
Parameters
Parameter Description Value
slot slot-id Specifies a slot ID. The value must be set according to
the device configuration.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
There are four SFP28 Ethernet optical ports and two QSFP28 Ethernet optical
ports on the panel of S5732-H24UM2CC (part number: 02353HUC/
02353HUC-003/02353HUC-004/02353SJY/
02353SJY-001/02353SJY-004/02353SJY-010/02353SJY-011/02353SJY-014/02353SJY-
015/02353SJY-016/02353SJY-019/02353SJY-002/02353SJY-003/02353SJY-012/0235
3SJY-013/02353SJY-017/02353SJY-018), S5732-H48UM2CC (part number:
02353HUB/02353HUB-002/02353HUB-003/02353SJT/
02353SJT-001/02353SJT-003/02353SJT-004/02353SJT-010/02353SJT-011/02353SJT-
013/02353SJT-014/02353SJT-015/02353SJT-016/02353SJT-018/02353SJT-002) and
S5732-H48XUM2CC. You can run the set device port-config-mode enable
command to change the working mode of SFP28 Ethernet optical ports on the
device panel and change the working mode of QSFP28 Ethernet optical ports or
split QSFP28 Ethernet optical ports. The device supports eight types of working
mode switching modes or interface split modes:
● 4*25GE+2*40GE: Four SFP28 Ethernet optical ports work at the rate of 25
Gbit/s, and two QSFP28 Ethernet optical ports work at the rate of 40 Gbit/s.
● 4*25GE+4*10GE+40GE: Four SFP28 Ethernet optical ports work at the rate of
25 Gbit/s, QSFP28 Ethernet optical port 1 is split into four 10GE ports, and
QSFP28 Ethernet optical port 2 works at the rate of 40 Gbit/s.
● 4*25GE+40GE+4*10GE: Four SFP28 Ethernet optical ports work at the rate of
25 Gbit/s, QSFP28 Ethernet optical port 1 works at the rate of 40 Gbit/s, and
QSFP28 Ethernet optical port 2 is split into four 10GE ports.
● 4*25GE+8*10GE: Four SFP28 Ethernet optical ports work at the rate of 25
Gbit/s, and each of two QSFP28 Ethernet optical ports is split into four 10GE
ports.
● 2*100GE: Four SFP28 Ethernet optical ports are unavailable, and two QSFP28
Ethernet optical ports work at the rate of 100 Gbit/s.
● 4*25GE+100GE: Four SFP28 Ethernet optical ports are unavailable, QSFP28
Ethernet optical port 1 is split into four 25GE ports, and QSFP28 Ethernet
optical port 2 works at the rate of 100 Gbit/s.
● 100GE+4*25GE: Four SFP28 Ethernet optical ports are unavailable, QSFP28
Ethernet optical port 1 works at the rate of 100 Gbit/s, and QSFP28 Ethernet
optical port 2 is split into four 25GE ports.
● 8*25GE: Four SFP28 Ethernet optical ports are unavailable, and each of two
QSFP28 Ethernet optical ports is split into four 25GE ports.
Precautions
● After the working mode of an interface is changed or an interface is split, the
configuration on the original interface is lost. Therefore, exercise caution
when performing this operation.
● After running this command, you need to confirm the automatic restart of the
device as prompted to make the configuration take effect. To prevent
configuration loss, save the configuration in advance.
● After interface split is configured, the interface and converted interfaces
cannot be added to a stack interface, regardless of whether the configuration
takes effect. If an interface has been added to a stack interface, the interface
cannot be split.
Example
# Configure the two QSFP28 Ethernet optical ports on the device panel to work at
the rate of 100 Gbit/s.
<HUAWEI> system-view
[HUAWEI] set device port-config-mode 2*100GE enable all
Warning: After the command is run, some ports may become unavailable or their configurations may be
lost, and the device automatically restarts. Continue? [Y/N]:y
Warning: Save the configuration before restart. Otherwise, configuration will be lost and the device will
restart. Continue? [Y/N]:y
Function
The set ethernet speed down-grade command enables the rate decrease auto-
negotiation function on an interface.
The undo set ethernet speed down-grade command disables the rate decrease
auto-negotiation function on an interface.
NOTE
The rate decrease auto-negotiation function applies only to MultiGE interfaces, GE electrical
interfaces, GE optical interfaces that have GE copper modules installed, and the last four
10GE electrical interfaces on the ES5D21X08T00 card of the S5731-H and S5731S-H.
Format
set ethernet speed down-grade
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Two devices are connected through two GE electrical interfaces using a network
cable. The two GE interfaces are configured to work in rate auto-negotiation
mode. The network cable can only work at the rate of 100 Mbit/s or 10 Mbit/s
because it deteriorates, but the maximum rate supported by the two GE interfaces
is 1000 Mbit/s. The interfaces negotiate the working rate to 1000 Mbit/s, but
cannot go Up because the network cable does not support the rate of 1000
Mbit/s.
You can use the rate decrease auto-negotiation function to solve this problem.
After rate decrease auto-negotiation is enabled using this command, the two GE
interfaces can decrease the negotiated rate to 10 Mbit/s or 100 Mbit/s, and then
can go Up.
Prerequisites
Precautions
If the network cable quality is low, a MultiGE interface takes longer time to go Up
after the rate decrease auto-negotiation function is configured. For example, if the
rate is decreased from 10 Gbit/s to 100 Mbit/s, the MultiGE interface takes about
40 seconds to go Up. If the rate is decreased from 2.5 Gbit/s to 100 Mbit/s, the
MultiGE interface takes about 20 seconds to go Up. It is recommended that you
replace the network cable.
Example
# Configure the rate decrease auto-negotiation function on a GE interface.
<HUAWEI> system-view
[HUAWEI] set ethernet speed down-grade
Function
The set flow-statistics include-interframe command configures traffic statistics
on an interface to contain the inter-frame gap and preamble.
Format
set flow-statistics include-interframe
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view, Eth-Trunk interface view
Default Level
2: Configuration level
Usage Guidelines
You can run the display interface command to view the running status and traffic
statistics on an interface. The Last 300 seconds input rate or Last 300 seconds
output rate field in the command output indicates the inbound or outbound
traffic rate on the interface in the last 300 seconds.
● If you want to obtain the total number of bytes passing through an interface
in a period, configure the device to count the bytes in the interframe gap
(IFG) and preamble when collecting traffic statistics on the interface. The
interface traffic rate is as follows:
Interface traffic rate = (Original packet length + IFG + Preamble) x Number of
packets passing through the interface every second
● If you want to obtain only the number of packet bytes passing through an
interface in a period, configure the device not to count the bytes in the IFG
and preamble when collecting traffic statistics on the interface. The interface
traffic rate is as follows:
Interface traffic rate = Original packet length x Number of packets passing
through the interface every second
By default, the IFG has a fixed value of 12 bytes and the preamble has a fixed
value of 8 bytes.
Example
# Configure traffic statistics on GE0/0/1 to contain the inter-frame gap and
preamble.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] set flow-statistics include-interframe
Function
The set flow-change-ratio { input-threshold | output-threshold } upper-limit
command sets the trap threshold for a sudden traffic volume change on
interfaces.
By default, the trap threshold for a sudden traffic volume change on interfaces is
50%.
By default, the lower threshold of the initial bandwidth usage percentage for
triggering a trap is 20%.
Format
set flow-change-ratio { input-threshold | output-threshold } upper-limit
threshold
Parameters
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To allow the switch to detect real-time traffic volume changes on interfaces, you
can run this command to set the trap threshold for a sudden traffic volume
change on interfaces and the lower threshold of the initial bandwidth usage
percentage for triggering a trap.
Configuration Impact
If the trap function for a sudden traffic volume change is enabled (using the
snmp-agent trap enable feature-name ifpdt trap-name
hwInputRateChangeOverThresholdNotice or snmp-agent trap enable feature-
name ifpdt trap-name hwOutputRateChangeOverThresholdNotice command)
after the set flow-change-ratio command is enabled, a trap will be generated
when the traffic volume change percentage on interfaces exceeds the specified
threshold (value of threshold) and the bandwidth usage percentage is not lower
than the lower threshold (value of bandwidth-usage-threshold).
Precautions
You can run the set flow-stat interval command to configure the traffic statistics
collection interval on interfaces. The default interval is 300 seconds.
Example
# Set the trap threshold for a sudden traffic volume change in the inbound
direction of interfaces to 70%.
<HUAWEI> system-view
[HUAWEI] set flow-change-ratio input-threshold upper-limit 70
Function
The set flow-change-ratio input-broadcast-detect disable command disables
detection of a sudden broadcast traffic volume change in the inbound direction of
interfaces.
Format
set flow-change-ratio input-broadcast-detect disable
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
By default, the switch checks whether the volume of broadcast traffic in the
inbound direction of interfaces changes suddenly, and generates a trap after
detecting a sudden change, facilitating network maintenance.
If the switch has many interfaces, detection of a sudden broadcast traffic volume
change in the inbound direction of interfaces consumes some CPU and memory
resources. You can run the set flow-change-ratio input-broadcast-detect
disable command to disable the function.
Precautions
Example
# Disable detection of a sudden broadcast traffic volume change in the inbound
direction of interfaces.
<HUAWEI> system-view
[HUAWEI] set flow-change-ratio input-broadcast-detect disable
Format
set if-mib sample-interval interval-value
undo set if-mib sample-interval [ interval-value ]
Parameters
Parameter Description Value
interval-value Specifies the interval The value can be 0 or an integer multiple
of collecting traffic of 10 in the range from 10 to 300, in
statistics on an seconds. The value 0 indicates that the
interface. function of periodically collecting traffic
statistics on an interface is disabled.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
When the NMS obtains interface traffic statistics through the MIB tables iftable
and ifxtable, the time for querying interface traffic statistics in real time is long.
When the device has a large number of interfaces, the query efficiency of the NMS
is low. To resolve this issue, switches can be configured to periodically collect
traffic statistics on interfaces. In this case, the NMS can directly obtain traffic
statistics collected on interfaces, improving the query efficiency.
Precautions
● If the command has been run for multiple times, only the latest configuration
takes effect.
● When the undo set if-mib sample-interval [ interval-value ] command is
run, if the interval is specified, the value must be consistent with the current
configuration.
● A short interval will cause a high CPU usage.
Example
# Set the interval of collecting traffic statistics on an interface to 100 seconds.
<HUAWEI> system-view
[HUAWEI] set if-mib sample-interval 100
Function
The set port-enable delay command sets the delay after which an interface goes
Up after a device restart.
The undo set port-enable delay command deletes the delay after which an
interface goes Up after a device restart.
Format
set port-enable delay delay-timer
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
On an unstable network, devices may fail to obtain IP addresses from the
expected DHCP server. If devices obtain IP addresses from another DHCP server,
the devices cannot obtain IP addresses on the expected network segment for a
long time even after the network is recovered. To prevent this problem, you can
set the delay after which interfaces go Up after a device restart.
Precautions
● If you run the shutdown and undo shutdown commands or run the restart
command on the interface during the delay, the delay does not take effect.
● The configuration takes effect only after the device is restarted.
Example
# Set the delay after which GE0/0/1 goes Up after a device restart to 20 seconds.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] set port-enable delay 20
Warning: The configuration takes effect only after the card or subcard is restarted.
NOTE
Format
single-fiber enable
undo single-fiber enable
Parameters
None
Views
GE interface view, XGE interface view, 25GE interface view, 40GE interface view,
100GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
During network management and maintenance, the administrator may need to
send traffic from users to a specified server for analysis and processing. If a server
can receive and send packets, there is a possibility that the server forwards user
traffic to other devices, causing a security risk. The unidirectional single-fiber
communication function can address this issue. A single fiber means that two
optical modules are connected by only one fiber, and unidirectional
communication means that packets can be sent in only one direction. With this
function, a switch can only send but cannot receive packets, and an analysis server
can only receive but cannot send packets. Data security on the analysis server is
ensured.
Precautions
The remote interface also works in non-auto negotiation mode and the rate of the
peer interface is the same as the rate of the local interface.
Example
# Enable XGigabitEthernet0/0/1 to send packets through a single fiber.
<HUAWEI> system-view
[HUAWEI] interface XGigabitEthernet 0/0/1
[HUAWEI-XGigabitEthernet0/0/1] single-fiber enable
4.2.82 speed
Function
The speed command sets the rate for an Ethernet interface in non-auto
negotiation mode.
The undo speed command restores the default rate of an Ethernet interface in
non-auto negotiation mode.
By default, an Ethernet interface works at its highest rate when it works in non-
auto negotiation mode.
Format
speed { 10 | 100 | 1000 | 2500 | 5000 | 10000 }
undo speed
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, MultiGE interface view, 25GE interface
view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
In non-auto negotiation mode, if interfaces on two connected devices work at
different rates, use the speed command to change the rates of the interfaces to
be the same so that the two devices can communicate.
Precautions
● If the remote interface does not support the auto negotiation mode, run the
undo negotiation auto command on the local interface to configure the
interface to work in non-auto negotiation mode. You can then change the
rate of the local interface to be the same as the rate of the remote interface
to ensure proper communication.
● For details about the rates supported by Ethernet interfaces, see Licensing
Requirements and Limitations for Ethernet Interfaces.
● For 25GE interfaces, the speed 10000 command is mutually exclusive with the
following commands:
– port mode ge (25GE interface)
– fec mode rs
– fec mode base-r
● The rate of MultiGE interfaces on the S5732-H24UM2CC, S5732-H48UM2CC,
and S5736-S24UM4XC can be increased using the RTU license. After the
license is activated, you can run the assign group-speed command and
restart the device to make the configured maximum rate supported by the
interfaces in the MultiGE interface group take effect.
To check the default rate of MultiGE interfaces, run the display device group-
speed configuration command. The BaseSpeed field indicates the default
rate.
Example
# Configure GE0/0/1 to work at 100 Mbit/s in non-auto negotiation mode.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo negotiation auto
[HUAWEI-GigabitEthernet0/0/1] speed 100
NOTE
Format
speed auto-negotiation
undo speed auto-negotiation
Parameters
None
Views
GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
If an optical interface is configured to work in auto-negotiation mode using the
negotiation auto command, the interface cannot negotiate the rate with another
interface. You can run the speed auto-negotiation command to configure the
auto-negotiation function on the interface.
Prerequisites
Run the negotiation auto command to enable auto-negotiation before using the
speed auto-negotiation command on the interface.
Precautions
Example
# Enable auto-negotiation on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] negotiation auto
[HUAWEI-GigabitEthernet0/0/1] speed auto-negotiation
Function
The statistic enable command enables IPv4 or IPv6 packet statistics collection on
an interface.
The undo statistic enable command disables IPv4 or IPv6 packet statistics
collection on an interface.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI,
S6730-H, S6730S-H, S6730-S, and S6730S-S support this command.
Format
{ ipv4 | ipv6 } * statistic enable { both | inbound | outbound }
Parameters
Parameter Description Value
Views
VLANIF interface view, Eth-Trunk interface view, GE interface view, XGE interface
view, 25GE interface view, MultiGE interface view, 40GE interface view, 100GE
interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To check the network status or locate network faults, you can enable IPv4 or IPv6
packet statistics collection on an interface to collect IPv4 or IPv6 packet statistics
on the interface.
Precautions
Example
# Enable IPv4 packet statistics collection in the inbound direction of
GigabitEthernet0/0/1.
<HUAWEI> system-view
[HUAWEI] interface GigabitEthernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] ipv4 statistic enable inbound
4.2.85 traffic-pppoe
Function
The traffic-pppoe command configures an interface to allow only PPPoE packets
to pass through.
The undo traffic-pppoe command cancels the configuration.
By default, an interface allows all types of packets to pass through.
NOTE
Format
traffic-pppoe { any | source-address } { any | destination-address }
undo traffic-pppoe { any | source-address } { any | destination-address }
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 40GE interface view, port group view, Eth-Trunk interface view
Default Level
2: Configuration level
Usage Guidelines
If you run the traffic-pppoe any any command on an interface, the interface
allows only PPPoE packets to pass through and discards other packets.
Example
# Configure GE0/0/1 to allow only PPPoE packets to pass through.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] traffic-pppoe any any
# Configure GE0/0/1 to allow only PPPoE packets with source MAC address 1-1-1
to pass through.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] traffic-pppoe 1-1-1 any
NOTE
● The training function can be configured on the 40GE interfaces of the S6720-EI and
S6720S-EI.
● The training function can be configured on the 40GE interfaces of the S5735S-H, S5731-
H, S5731S-H24T4XC-A, S5731S-H48T4XC-A or S5736-S that has the ES5D21Q02Q00 or
ES5D21Q04Q01 card installed.
Format
training { enable | disable }
undo training { enable | disable }
Parameters
None
Views
40GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
With the increase of transmission rate or frequency, attenuation of signal's high-
frequency components becomes increasingly severe. To guarantee transmission
performance of signals, it is necessary to compensate for signals, and commonly
used compensation technologies are pre-emphasis and balancing. The pre-
emphasis technology increases high-frequency components of signals at the
transmit end of transmission lines to compensate attenuation during the
transmission. However, the pre-emphasis technology increases crosstalk while
amplifying high-frequency components. To solve this problem, the balancing
technology is developed. The balancing technology is used at the receive end of
transmission lines to function like a filter for filtering high-frequency crosstalk.
After the training function is enabled on a 40GE interface, the transmit end
exchanges frames with the receive end to automatically set the pre-emphasis and
exists on the interface, the configuration remains unchanged after the system
software is upgraded to a version later than V200R009C00.
Example
# Disable the training function on 40GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface 40ge 0/0/1
[HUAWEI-40GE0/0/1] training disable
Warning: The configuration will cause an abnormality in port running. Continue? [Y/N]:y
NOTE
Format
training { enable | disable }
undo training { enable | disable }
Parameters
None
Views
100GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
With the increase of transmission rate or frequency, attenuation of signal's high-
frequency components becomes increasingly severe. To guarantee transmission
performance of signals, it is necessary to compensate for signals, and commonly
used compensation technologies are pre-emphasis and balancing. The pre-
Example
# Disable the training function on 100GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface 100ge 0/0/1
[HUAWEI-100GE0/0/1] training disable
Warning: The configuration will cause an abnormality in port running. Continue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment.......
By default, an Ethernet optical interface does not enter the error-down state when
the optical power is low.
Format
transceiver power low trigger error-down
Parameters
None
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view,
40GE interface view, 100GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Low optical power of the device may cause intermittent service interruption. To
ensure that services are running properly, enable an interface to enter the error-
down state when the optical power is low so that services can be switched in a
timely manner.
Follow-up Procedure
Example
# Enable GE0/0/1 to enter the error-down state when the optical power is low.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] transceiver power low trigger error-down
4.2.89 trap-threshold
Function
The trap-threshold command sets the inbound and outbound bandwidth usage
thresholds for generating a trap.
The undo trap-threshold command restores the default inbound and outbound
bandwidth usage thresholds for generating a trap.
The default inbound or outbound bandwidth usage threshold for generating a trap
is 80.
Format
trap-threshold { input-rate | output-rate } bandwidth-in-use [ resume-rate
resume-threshold ]
undo trap-threshold { input-rate | output-rate }
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, 25GE interface
view, MultiGE interface view, 40GE interface view, 100GE interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Monitoring bandwidth usage helps you know current load on a device. If the
bandwidth usage exceeds a threshold, bandwidth resources are insufficient and
the device capacity needs to be expanded. For example, if the bandwidth usage
exceeds 95%, an alarm is generated, indicating that bandwidth resources are
almost exhausted. As a result, some services may be interrupted before device
capacity expansion.
You can configure two thresholds: low threshold (log threshold) and high
threshold (alarm threshold). The system generates a log when the bandwidth
usage exceeds the low threshold and generates an alarm when the bandwidth
usage exceeds the high threshold. This configuration ensures that you can expand
the device capacity in advance to avoid service interruptions caused by bandwidth
exhaustion.
NOTE
The trap-threshold command sets the bandwidth usage threshold for generating
a trap. The trap-threshold with the following parameters provides various
functions:
● trap-threshold input-rate bandwidth-in-use resume-rate resume-threshold:
sets the inbound bandwidth usage threshold for generating a trap.
– If inbound bandwidth usage exceeds the threshold specified in
bandwidth-in-use, an hwIfMonitorInputRateRising trap is generated,
indicating that inbound bandwidth usage exceeds the configured
threshold.
– If inbound bandwidth usage falls below the threshold specified in
resume-threshold, an hwIfMonitorInputRateResume trap is generated,
indicating that inbound bandwidth usage falls between the configured
threshold for clearing a trap.
● trap-threshold output-rate bandwidth-in-use resume-rate resume-
threshold: sets the outbound bandwidth usage threshold for generating a
trap.
– If outbound bandwidth usage exceeds the threshold specified in
bandwidth-in-use, an hwIfMonitorOutputRateRising trap is generated,
indicating that outbound bandwidth usage exceeds the configured
threshold.
– If outbound bandwidth usage falls below the threshold specified in
resume-threshold, an hwIfMonitorOutputRateResume trap is generated,
indicating that outbound bandwidth usage falls between the configured
threshold for clearing a trap.
If the offset between the value of bandwidth-in-use and the value of resume-
threshold is too small, trap information may be frequently displayed.
The log threshold must be lower than the trap threshold, providing efficient
protection for services. For example, when the inbound bandwidth usage reaches
80%, a log is generated. If the inbound bandwidth usage continues to increase
and reaches 95%, a trap is generated. This ensures that a log is generated for
inbound bandwidth usage of 80%, and a trap is generated for inbound bandwidth
usage of 95%. Either the log or the trap prompts for a bandwidth increase,
preventing service interruption.
Example
# Configure GE0/0/1 to generate a trap when the outbound bandwidth usage
exceeds 60%.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] trap-threshold output-rate 60
Function
The trap-threshold enable command enables the function of reporting an alarm
if packets are discarded on an interface due to a congestion.
Format
trap-threshold { input-discard | output-discard } enable
Parameters
Views
GE interface view, MultiGE interface view, XGE interface view, 25GE interface view,
40GE interface view, 100GE interface view, port group view
NOTE
Only the S5736-S equipped with the S7Q02001, ES5D21Q02Q00 or ES5D21Q04Q01 card
supports this command in the 40GE interface view.
Default Level
2: Configuration level
Usage Guidelines
If a congestion occurs on a network that is running, packets may be discarded
when service flows are transmitted on the network. If a lot of packets are
discarded, services are affected. To improve transmission quality of service flows,
you can run the trap-threshold enable command to enable the function of
reporting an alarm if packets are discarded on an interface due to a congestion.
The device then reports an alarm if the number of discarded incoming and
outgoing packets on the interface in a specified period exceeds the threshold. Such
alarms help you know the congestion on the interface. You can determine
whether to increase the bandwidth or cancel the bandwidth limit on the interface
based on the logs. In this way, the congestion problem can be rectified.
Example
# Enable the function of reporting an alarm if incoming packets are discarded on
XGE0/0/1 due to a congestion.
<HUAWEI> system-view
[HUAWEI] interface XGigabitEthernet 0/0/1
[HUAWEI-XGigabitEthernet0/0/1] trap-threshold input-discard enable
Format
trap-threshold error-percentage threshold-value interval interval-value
Parameters
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
When an interface receives too many CRC packets, packet forwarding is affected.
To enable the device to report the corresponding alarm if the percentage of
received CRC packets against all the received packets within the specified period
exceeds the alarm threshold, run this command.
Precautions
Example
# Set the alarm threshold for the percentage of CRC packets against all the
received packets to 10% and the interval for calculating the percentage of CRC
packets against all the received packets to 20 seconds on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface GigabitEthernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] trap-threshold error-percentage 10 interval 20
Format
trap-threshold error-statistics threshold-value interval interval-value
undo trap-threshold error-statistics
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, 40GE interface view, 100GE interface view, port group
view
Default Level
2: Configuration level
Usage Guidelines
The system generates an alarm when the number of error packets received by an
interface within an alarm interval exceeds the alarm threshold. If the number of
received error packets is 0 in the next alarm interval, the system displays an alarm
clearance message.
Example
# Set the alarm threshold for error packets on GE0/0/1 to 10 and the alarm
interval to 30 seconds.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] trap-threshold error-statistics 10 interval 30
Function
The trap-threshold interval command sets the interval for reporting an alarm if
packets are discarded on an interface due to a congestion.
The undo trap-threshold interval command restores the default interval for
reporting an alarm if packets are discarded on an interface due to a congestion.
Format
trap-threshold { input-discard | output-discard } interval interval-value
Parameters
Parameter Description Value
Views
GE interface view, MultiGE interface view, XGE interface view, 25GE interface view,
100GE interface view, port group view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Network congestion during service transmission may cause packet loss. If a lot of
packets are discarded, services are affected. To improve transmission quality of
service flows, you need to enable the device to report alarms to notify users of the
current network status if the number of packets discarded due to a congestion in
a period of time reaches the specified limit. In this case, you can run the trap-
threshold interval command to flexibly adjust the interval for reporting an alarm
if packets are discarded due to a congestion based on actual service situations.
Such alarms help you know the congestion on the interface. You can determine
whether to increase the bandwidth or cancel the bandwidth limit on the interface
based on the logs. In this way, the congestion problem can be solved.
Precautions
After this command is run, only the interval for reporting an alarm if packets are
discarded on an interface due to a congestion is set. The corresponding alarm is
triggered only after the function of reporting an alarm if packets are discarded on
an interface due to a congestion is enabled using the trap-threshold enable
command and the number of discarded packets on the interface within a specified
period of time reaches the alarm threshold.
If this command is executed multiple times, only the latest configuration takes
effect.
Example
# Set the interval for reporting an alarm if incoming packets are discarded on
XGE0/0/1 due to a congestion to 80 seconds.
<HUAWEI> system-view
[HUAWEI] interface XGigabitEthernet 0/0/1
[HUAWEI-XGigabitEthernet0/0/1] trap-threshold input-discard interval 80
Format
trap-threshold { input-discard | output-discard } threshold threshold-value
undo trap-threshold { input-discard | output-discard } threshold
Parameters
Parameter Description Value
Views
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface
view, 25GE interface view, port group view
NOTE
Only the S5736-S equipped with the S7Q02001, ES5D21Q02Q00 or ES5D21Q04Q01 card
supports this command in the 40GE interface view.
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Network congestion during service transmission may cause packet loss. If a lot of
packets are discarded, services are affected. To improve transmission quality of
service flows, you need to enable the device to report alarms to notify users of the
current network status if the number of packets discarded due to a congestion in
a period of time reaches the specified limit. In this case, you can run the trap-
threshold threshold command to flexibly adjust the alarm threshold for the
number of discarded packets on an interface due to a congestion based on actual
service situations. Such alarms help you know the congestion on the interface. You
can determine whether to increase the bandwidth or cancel the bandwidth limit
on the interface based on the logs. In this way, the congestion problem can be
solved.
Precautions
After this command is run, only the interval for reporting an alarm if packets are
discarded on an interface due to a congestion is set. The corresponding alarm is
triggered only after the function of reporting an alarm if packets are discarded on
an interface due to a congestion is enabled using the trap-threshold enable
command and the number of discarded packets on the interface within a specified
period of time reaches the alarm threshold.
If this command is executed multiple times, only the latest configuration takes
effect.
Example
# Set the alarm threshold for the number of discarded incoming packets on
XGE0/0/1 due to a congestion to 200.
<HUAWEI> system-view
[HUAWEI] interface XGigabitEthernet 0/0/1
[HUAWEI-XGigabitEthernet0/0/1] trap-threshold input-discard threshold 200
4.2.95 virtual-cable-test
Function
The virtual-cable-test command tests the cable connected to an Ethernet
electrical interface and displays the test result.
NOTE
The MEth management interface supports this command on the following devices: S5731-S,
S5731S-S, S5731-H, S5731S-H, S5732-H, S6730-S, S6730S-S, S6730-H, S6730S-H, S6735-S.
The service interfaces do not support this command on the following devices:
● MultiGE interface on the S5720-28X-PWH-LI-AC, S5732-H24UM2CC (part number:
02353HUC/02353HUC-003/02353HUC-004/02353SJY/
02353SJY-001/02353SJY-004/02353SJY-010/02353SJY-011/02353SJY-014/02353SJY-015
/
02353SJY-016/02353SJY-019/02353SJY-002/02353SJY-003/02353SJY-012/02353SJY-013
/02353SJY-017/02353SJY-018), S5732-H48UM2CC (part number: 02353HUB/
02353HUB-002/02353HUB-003/02353SJT/
02353SJT-001/02353SJT-003/02353SJT-004/02353SJT-010/02353SJT-011/02353SJT-013/
02353SJT-014/02353SJT-015/02353SJT-016/02353SJT-018/02353SJT-002), S5732-
H48XUM2CC, S5736-S24UM4XC
● XGE electrical interfaces on the ES5D21X08T00 card
Format
virtual-cable-test
Parameters
None
Views
MEth interface view, Ethernet interface view, GE interface view, XGE interface view,
25GE interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the cable is faulty, the interface is in Down state or the interface rate is
abnormal even if it is in Up state. You can run the virtual-cable-test command to
check whether the cable works properly. According to the command output, you
can locate and rectify cable faults.
● If the cable works properly, the total length of the cable is displayed.
● If the cable cannot work properly, the distance between the interface and the
failure point is displayed.
VCT can be performed in either of the following modes:
● Common mode: The test speed is fast (about 2.5s), but the test precision is
low.
● Enhanced mode: The test precision is high, but the test duration is longer
(about 8s).
NOTE
Precautions
● The test result is only for reference and may be inaccurate for cables of some
vendors.
● If the detection result is Unknown, you are advised to use the cable analyzer
to perform the test.
● The test result is related to the cable signal attenuation. When the cable
length is shorter than 3 m, the cable signal attenuation mostly results from
the connector, not the cable. The test result is therefore invalid.
● Running the virtual-cable-test command may affect services on the interface
in a short period of time, and the interface in Up state may alternate between
Up and Down.
● Combo electrical interfaces support cable tests, but cable tests are not
recommended on combo electrical interfaces because services will be
interrupted.
● This command can be used on an XGE optical interface or GE optical interface
when the interface has a GE copper module installed.
● After a 25GE optical interface is configured to work at the rate of 1 Gbit/s
using the port mode ge command and has a GE copper module installed, the
virtual-cable-test command can be configured on the interface.
● When GE electrical interfaces on the S1720GW-E, S1720GWR-E, S1720GF,
S1720GFR-P, S2720-EI, S5720-LI, S1730S-H, S2730S-S, S5735-L-I, S5735-
L1,S300, S5735-L, S5735S-L1, S5735S-L, S5735S-L-M, S5720S-LI, S5735S-H,
S5736-S, S500, S5735-S, S5735S-S, S5735-S-I and S5720I-SI work at a rate of
1000 Mbit/s or 100 Mbit/s and the interface is up, the detection result is
unavailable.
● On the S6720S-EI, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S, S6735-S,
and S6720-EI, when a GE electrical interface works at a rate of 100 Mbit/s,
the detection result is unavailable.
● On the S5731-H, S5731S-H, S5731-S, and S5731S-S, when a GE electrical
interface works at a rate of 10 Mbit/s, 100 Mbit/s, or 1000 Mbit/s, the
detection result is unavailable.
● The detection result is unavailable when the interface is in the Up state or the
remote interface is shut down.
● The FE electrical port uses only two pairs of wire pairs. The two pairs of wire
sequences used for VCT detection are unavailable.
● When the GE electrical port works at the rate of 10 Mbit/s or 100 Mbit/s, only
two pairs of cables are used to detect the VCT status. The other two pairs of
cables do not detect and return the default result.
● The virtual cable test (VCT) cannot be performed on multiple interfaces of the
device at the same time.
Example
# Test the cable connected to GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] virtual-cable-test
Warning: The command will stop service for a while. Continue? [Y/N]y
Info: This operation may take a few seconds. Please wait for a moment..........done.
Pair A length: 189meter(s)
Pair B length: 189meter(s)
Pair C length: 189meter(s)
Pair D length: 189meter(s)
Pair A state: Ok
Pair B state: Ok
Pair C state: Ok
Pair D state: Ok
Info: The test result is only for reference.
Item Description
Item Description
Commands provided in this section and all the parameters in the commands are
supported by all switch models by default, unless otherwise specified. For details,
see specific commands.
Function
Using the display interface loopback command, you can view the status and
traffic statistics of a loopback interface.
Format
display interface loopback [ loopback-number | main ]
Parameters
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
In the scenario where you need to monitor the status of an interface or locate an
interface fault, you can use the display interface loopback command to collect
the statistics on the interface including the status. Through the displayed
information, you can collect the traffic statistics and troubleshoot the interface.
Prerequisite
A loopback interface has been created using the interface loopback command.
Example
# Display the status and traffic statistics of a specified loopback interface.
<HUAWEI> display interface loopback 6
LoopBack6 current state : UP
Line protocol current state : UP (spoofing)
Description:
Route Port,The Maximum Transmit Unit is 1500
Internet Address is 10.3.3.3/32
Current system time: 2012-02-25 09:56:04
Last 10 seconds input rate 0 bits/sec, 0 packets/sec
Last 10 seconds output rate 0 bits/sec, 0 packets/sec
Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec
Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec
Input: 0 packets,0 bytes
0 unicast,0 broadcast,0 multicast
0 errors,0 unknownprotocol
Output:0 packets,0 bytes
0 unicast,0 broadcast,0 multicast
0 errors
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
Line protocol current Link layer protocol status of a loopback interface. The
state link layer protocol status of a loopback interface is
always Up after the loopback interface is created.
Output bandwidth Indicates the percentage of the rate for sending packets
utilization to the total bandwidth.
Format
display interface null [ 0 | main ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
The display interface null command displays the status of a null interface. The
interface status information includes: the physical status, link layer protocol status,
description, MTU, IP address, current system time, last time statistics about the
null interface are cleared, incoming and outgoing packet rates in bit/s and pps,
total numbers of packets and bytes received and sent by the null interface, and
percentages of the rates for receiving and sending packets to the total bandwidth.
Precautions
Example
# Display the status and traffic statistics of Null 0 interface.
<HUAWEI> display interface null 0
NULL0 current state : UP
Line protocol current state : UP (spoofing)
Description:
Route Port,The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
Physical is NULL DEV
Current system time: 2012-02-25 10:25:59
Last 300 seconds input rate 0 bits/sec, 0 packets/sec
Last 300 seconds output rate 0 bits/sec, 0 packets/sec
Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec
Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec
Input: 0 packets,0 bytes
0 unicast,0 broadcast,0 multicast
0 errors,0 unknownprotocol
Output:0 packets,0 bytes
0 unicast,0 broadcast,0 multicast
0 errors
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
NULL0 current state Indicates the physical status of the null interface.
The physical status of the null interface is always Up.
Line protocol current Indicates the link layer protocol status of the
state interface. The protocol status of the null interface is
always Up.
Last 300 seconds input Indicates the rates for sending and receiving the bytes
rate and the packets by the interface in the last five
Last 300 seconds output minutes.
rate
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and
S6730S-S support this command.
Format
display interface virtual-ethernet [ ve-number | main ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
In the scenario where you need to monitor the status of an interface or locate an
interface fault, you can use the display interface virtual-ethernet command to
collect the statistics on the interface including the status. Through the displayed
information, you can collect the traffic statistics and troubleshoot the interface.
Example
# Display the status and traffic statistics of VE 0/0/1.
<HUAWEI> display interface virtual-ethernet 0/0/1
Virtual-Ethernet0/0/1 current state : UP
Line protocol current Indicates the link layer protocol status of the interface:
state ● UP: indicates that the link layer protocol on the
interface is Up.
● DOWN: indicates that the link layer protocol on the
interface is Down or no IP address is assigned to the
interface.
Item Description
Last 300 seconds Incoming packet rate (bits per second and packets per
input rate second) within the last 300 seconds.
Last 300 seconds Outgoing packet rate (bits per second and packets per
output rate second) within the last 300 seconds.
Format
interface loopback loopback-number
undo interface loopback loopback-number
Parameters
Views
System view
Default Level
2: Configuration level
Usage Guidelines
A loopback interface is always Up.
Example
# Create loopback interface 5.
<HUAWEI> system-view
[HUAWEI] interface loopback 5
[HUAWEI-LoopBack5]
Function
Using the interface null command, you can enter the null interface view.
Format
interface null 0
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The Null0 interface never forwards or accepts any traffic. All traffic sent to this
interface is directly discarded. Unnecessary traffic can be sent to the Null0
interface to avoid using ACLs.
Precautions
There is only one null interface, named null0. This interface is always Up and
cannot be shut down or deleted.
Example
# Enter the view of the Null0 interface.
<HUAWEI> system-view
[HUAWEI] interface null 0
[HUAWEI-NULL0]
Function
The interface virtual-ethernet command displays the view of an existing virtual
Ethernet (VE) interface, or creates a VE interface and displays the VE interface
view.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and
S6730S-S support this command.
Format
interface virtual-ethernet ve-number[.subnumber ]
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
A VE interface is a logical interface with Ethernet features on a switch. VE
interfaces are mainly used in scenarios where Ethernet over GRE is configured or
an L2VPN accesses to an L3VPN. You need to create a VE sub-interface when
configuring an L2VPN to access to an L3VPN.
Example
# Create VE interface 0//0/1.
<HUAWEI> system-view
[HUAWEI] interface virtual-ethernet 0/0/1
[HUAWEI-Virtual-Ethernet0/0/1]
Function
The portswitch command changes the working mode of a virtual Ethernet (VE)
interface from Layer 3 mode to Layer 2 mode.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and
S6730S-S support this command.
Format
portswitch
undo portswitch
Parameters
None
Views
VE interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
By default, a VE interface on the device works in Layer 3 mode. To enable Layer 2
forwarding on the VE interface, run the portswitch command to change the
working mode to Layer 2 mode.
Precautions
● If an interface has the non-attribute configuration, this command cannot be
executed. Before running this command, delete the non-attribute
configuration on the interface.
● The minimum interval between running the portswitch and undo portswitch
commands must be 30s.
Example
# Change VE0/0/1 to Layer 2 mode.
<HUAWEI> system-view
[HUAWEI] interface virtual-ethernet 0/0/1
[HUAWEI-Virtual-Ethernet0/0/1] portswitch
NOTE
Only the S5731-H, S5731S-H, S5731-S, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and
S6730S-S support this configuration.
Format
statistic enable { both | inbound | outbound }
Parameters
Parameter Description Value
Views
GE sub-interface view, XGE sub-interface view, MultiGE sub-interface view, 25GE
sub-interface view, 40GE sub-interface view, 100GE sub-interface view, Eth-Trunk
sub-interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To check the network status or locate network faults, you can use the statistic
enable command to enable the traffic statistics function on sub-interfaces. The
switch then collects traffic statistics on the sub-interfaces.
Precautions
● After you run the undo statistic enable command on a sub-interface, the
switch stops collecting traffic statistics on the sub-interface, and the collected
traffic statistics are deleted.
● The switch uses ACL resources when collecting traffic statistics. If the traffic
statistics function is enabled on too many sub-interfaces, other services may
fail to obtain ACL resources.
● Traffic statistics on sub-interfaces is unavailable for error packets.
● The device supports traffic statistics collection on a maximum of 4096 sub-
interfaces.
● VXLAN Layer 2 sub-interfaces do not support traffic statistics collection.
Example
# Enable the traffic statistics function for incoming and outgoing traffic on the
sub-interface GigabitEthernet1/0/1.1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1.1
[HUAWEI-GigabitEthernet1/0/1.1] statistic enable both
Format
trigger trap { linkup | linkdown }
Parameters
Parameter Description Value
linkup Sends the LinkUp trap to the NMS. -
linkdown Sends the LinkDown trap to the NMS. -
Views
Loopback interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The traps configured by trigger trap are used to check whether the network
between the NMS and device functions properly. If the NMS receives a trap sent
from the interface, the network between the NMS and device functions properly;
otherwise, a fault may occur on the network.
Prerequisites
Run the snmp-agent trap enable feature-name command to enable the LinkUp
and LinkDown traps.
Precautions
The trigger trap command is used on loopback interfaces to check the network
between the NMS and device. The interface status does not change according to
the meaning of the trap. For example, if the trigger trap linkdown command is
used, the loopback interface sends a LinkDown trap to the NMS but does not
change its status to Down. If you have used the trigger trap linkdown command,
you must run the trigger trap linkup command to clear the LinkDown trap on
the NMS.
Example
# Configure a loopback interface to send the LinkUp trap to the NMS.
<HUAWEI> system-view
[HUAWEI] interface loopback 1
[HUAWEI-LoopBack1] trigger trap linkup