AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R010 Command Reference
Ethernet Interface Configuration Commands
The AR100&AR120&AR150&AR160&AR200 series, AR1200 series, AR2220E, AR2201-48FE, AR2202-48FE, AR2204-51GE-P, AR2204-51GE-R, AR2204-27GE-P, AR2204-27GE, AR2204E, AR2204E-D, and AR2204 only support isolation at Layer 2 and interworking at Layer 3. GE0/0/3 to GE0/0/26 on the AR2204-51GE-P and AR2204-51GE-R cannot be isolated from GE0/0/27 to GE0/0/50.
An interface on the 4GE-2S, 9ES2, 4ES2G-S or 4ES2GP-S card cannot be isolated from an interface on other cards.
The interface on 8FE1GE card support configuring the IFG and interface isolated.
The AR2200&AR3200 series support configuring the IFG and interface isolated.
- am isolate
- auto duplex
- auto speed
- clock (Ethernet interface view)
- combo-port
- display error-down recovery
- display interface ethernet brief
- display port-group
- display port-isolate group
- display snmp-agent trap feature-name error-down all
- duplex
- encapsulation priority-tagged
- error-down auto-recovery
- error-statistics threshold-event trigger error-down
- flow-control (Ethernet interface view)
- flow-control negotiation
- group-member
- interface (Ethernet interface)
- interface range
- ifg
- log-threshold
- loopback
- mac-address (Ethernet interface view)
- management-plane isolate enable
- management-port isolate enable
- mdi
- mtu (Ethernet interface view)
- negotiation auto
- port-down holdoff-timer
- port-group
- port-group group-member
- port-isolate enable
- port-isolate mode
- portswitch
- set flow-statistics include-interframe
- snmp-agent trap enable feature-name error-down
- speed
- trap-threshold
- trap-threshold error-statistics
- virtual-cable-test
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>
Views
Ethernet interface view, GE interface view, Eth-Trunk interface view, port group view, XGE interface view
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.
An interface on the 4GE-2S, 9ES2, 4ES2G-S or 4ES2GP-S card cannot be unidirectionally isolated from an interface on other cards.
An interface on the AR100&AR120&AR150&AR160 can be isolated from a maximum of 4 interfaces unidirectionally.
An interface on the AR200, AR1200, AR2200, AR3200 and AR3600 can be isolated from a maximum of 32 interfaces unidirectionally.
auto duplex
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.
By default, the duplex mode on an Ethernet electrical interface is negotiated with the peer interface.
Usage Guidelines
Usage Scenario
In auto-negotiation mode, interfaces on both ends of a link negotiate their duplex mode. If the negotiated duplex mode is not the required one, you can run the auto duplex command to set the required duplex mode in auto-negotiation mode. For example, two interfaces on both ends support full-duplex mode and half-duplex mode. If the two interfaces negotiate to work in half-duplex mode, but they are required to work in full-duplex mode, you can run the auto duplex full command to set the full-duplex mode for the two interfaces.
Prerequisites
The Ethernet interface works in auto-negotiation mode.
Precautions
By default, an Ethernet interface works in auto-negotiation mode, which is recommended. If the negotiation succeeds, the two interfaces work at the same duplex mode and speed. The settings of the SPEED and DUPLEX parameters and auto-negotiation mode must be the same at the local and peer ends. Otherwise, negotiation may fail. The interface auto-negotiation mode, duplex mode and speed support depend on the device.
In auto-negotiation mode, an FE electrical interface negotiates the duplex mode with the peer device on the link.
In auto-negotiation mode, a GE electrical interface that works at a rate of 1000 Mbit/s supports the full-duplex mode. If the duplex mode is changed to half-duplex, the GE electrical interface works at a maximum rate of 100 Mbit/s.
auto speed
Function
The auto speed command configures the auto-negotiation rate of an Ethernet electrical interface.
The undo auto speed command restores the default auto-negotiation rate of an Ethernet electrical interface.
By default, Ethernet electrical interfaces on both ends can negotiate to any rate they support.
Format
auto speed { 10 | 100 | 1000 } *
undo auto speed
GE optical interfaces do not support this command.
Parameters
Parameter |
Description |
Value |
---|---|---|
10 | Sets the auto-negotiation rate of an Ethernet electrical interface to 10 Mbit/s. |
- |
100 | Sets the auto-negotiation rate of an Ethernet electrical interface to 100 Mbit/s. |
- |
1000 | Sets the auto-negotiation rate of an Ethernet electrical interface to 1000 Mbit/s. NOTE:
FE electrical interfaces do not support this parameter. |
- |
Usage Guidelines
Usage Scenario
In auto-negotiation mode, interfaces on both ends of a link negotiate their rate. If the negotiated rate is not the required one, run the auto speed command to set the auto-negotiation rate range to limit the negotiated rate. For example, if two interfaces negotiate to work at a rate of 1000 Mbit/s, but they are required to work at a rate of 100 Mbit/s, you can run the auto speed 100 command to set the rate of the interfaces to 100 Mbit/s.
By default, an Ethernet interface works in auto-negotiation mode, which is recommended. If the negotiation succeeds, the two interfaces work at the same duplex mode and speed. The settings of the SPEED and DUPLEX parameters and auto-negotiation mode must be the same at the local and peer ends. Otherwise, negotiation may fail. The interface auto-negotiation mode, duplex mode and speed support depend on the device.
Prerequisites
The Ethernet interface works in auto-negotiation mode. For details, see negotiation auto.
clock (Ethernet interface view)
Function
The clock command configures the clock mode of a combo interface.
The undo clock command restores the default setting.
By default, a combo interface automatically selects the clock mode, and preferentially works in slave clock mode to use line clock signals.
Parameters
Parameter | Description | Value |
---|---|---|
auto perfer | Allows a combo interface to automatically select the clock mode. If this parameter is not configured, you must manually specify the clock mode of a combo interface. |
- |
master | Configures a combo interface to work in master clock mode. |
- |
slave | Configures a combo interface to work in slave clock mode. |
- |
Usage Guidelines
Usage Scenario
A combo interface on a router is connected to an Ethernet interface that supports the clock function on the peer end. To exchange data successfully, interfaces on the two communicating parties must work in clock synchronization state.
A combo interface works in either of the following clock modes:
- Master: uses clock signals provided by the interface card.
- Slave: uses line clock signals.
When a router is connected to an Ethernet interface on the peer end and both the connected interfaces support the clock function, you must configure the interfaces to work in master and slave clock modes respectively.
- When you manually specify the clock modes of the two interfaces, you must configure one interface to work in master clock mode and the other in slave clock mode.
- When you manually specify the clock mode of an interface and configure the other interface to automatically select the clock mode, the other interface will automatically select the clock mode opposite to the specified the clock mode of the peer interface.
- When you configure both the interfaces to automatically select the clock mode, the interfaces will select different clock modes.
Precautions
When the peer Ethernet interface does not support the clock function, you do not need to configure the clock mode for the combo interface.
combo-port
Function
The combo-port command configures the working mode of a combo interface.
The undo combo-port command restores the default setting.
A combo interface works in auto mode and automatically works as an optical or electrical interface by default.
Parameters
Parameter |
Description |
Value |
---|---|---|
auto | Allows a combo interface to automatically select the working mode. The device checks the interface status and selects the working mode as follows:
NOTE:
If the electrical interface is connected using a network cable and the combo interface goes Up:
|
- |
copper | Configures a combo interface to work in electrical mode so that data is transmitted through network cables. | - |
fiber | Configures a combo interface to work in optical mode so that data is transmitted through optical fibers. | - |
Usage Guidelines
Usage Scenario
Combo interfaces are logic interfaces. One combo interface can work as a GE electrical interface or a GE optical interface. Each combo interface has only one internal forwarding interface. When the electrical interface is enabled, the optical interface is disabled. When the optical interface is enabled, the electrical interface is disabled. Set the working mode of combo interfaces according to network requirements. The electrical and optical interfaces of a combo interface use the same interface view. You can enable the electrical or optical interface, and configure interface attributes such as the rate and duplex mode in the same interface view.
Precautions
This command takes effect only on combo interfaces.
If a combo interface is configured to work in a different mode from the remote interface, the two interfaces cannot communicate.
When a combo interface works in auto mode, to modify the configuration of the electrical or optical interface, you must forcibly configure the combo interface to work in electrical or optical mode.
When the combo interface of the AR531 series works in optical mode, the interface supports only the non-auto-negotiation mode, and the peer interface must also be configured to work in non-auto-negotiation mode.
For example, after you run the display this command on a combo interface, the interface configuration is as follows:
# interface GigabitEthernet0/0/0 ip address 192.168.1.10 255.255.255.0 port media type fiber undo negotiation auto speed 100 port media type copper undo negotiation auto combo-port fiber #
The command output shows that there are two configuration items undo negotiation auto and speed 100 when the combo interface works as an optical interface and one configuration item undo negotiation auto when the combo interface works as an electrical interface.
display error-down recovery
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.
An interface enters the error-down state after being shut down due to an error. Currently, errors include BPDU protection.
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) ---------------------------------------------------------------------------- Ethernet2/0/0 bpdu-protection 30 10
Item |
Description |
---|---|
interface |
Interface name. |
error-down cause |
Cause of the error-down event, including:
|
recovery time(sec) |
Delay for the interface to change from Down to Up, in seconds. If no automatic recovery time is configured, you need to run the undo shutdown (interface view) command to make the interface go Up and the recovery time is displayed as --. |
remainder time(sec) |
Remaining time for the Up event, in seconds. If no automatic recovery time is configured, you need to run the undo shutdown (interface view) command to make the interface go Up and the remaining time is displayed as --. |
display interface ethernet brief
Function
The display interface ethernet brief command displays brief information about all Ethernet interfaces.
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, bandwidth, 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 all Ethernet interfaces.
<Huawei> display interface ethernet brief PHY: Physical *down: administratively down (l): loopback (b): BFD down ^down: standby (v): VirtualPort InUti/OutUti: input utility/output utility Interface PHY Auto-Neg Duplex Bandwidth InUti OutUti Trunk Ethernet1/0/0 up disable full 100M 0.01% 0.01% -- Ethernet1/0/1 down disable full 100M 0% 0% -- GigabitEthernet0/0/0 up enable full 100M 0.01% 0.01% -- GigabitEthernet0/0/1 down enable full 1000M 0% 0% -- GigabitEthernet0/0/1.1 down enable full 1000M 0% 0% -- GigabitEthernet0/0/2 up enable full 1000M 0% 0% -- GigabitEthernet0/0/3(v) up enable full 1000M 0% 0% -- GigabitEthernet0/0/3.1(v) up enable full 1000M 0% 0% --
Item |
Description |
---|---|
Interface |
Type and number of an interface. All interfaces are displayed
in alphabetical order. Information about the following interfaces
can be displayed:
If (v) is displayed behind an interface number, the interface is a virtual interface. |
PHY |
Physical status of an interface:
|
Auto-Neg |
Whether auto-negotiation is enabled on an interface:
To configure the auto-negotiation mode for an interface, run the negotiation auto command. |
Duplex |
Duplex mode of an interface:
|
Bandwidth |
Bandwidth on the interface. If the bandwidth value is not 10, 100, or 1000, the value is accurate to three decimal places. For example, if the bandwidth of an interface is 5.696 Mbit/s, this field displays 5.696 Mbit/s. If the bandwidth value is 10, 100, or 1000, decimals are not displayed, and this field displays 10 Mbit/s, 100 Mbit/s, or 1000 Mbit/s. |
InUti |
Average inbound bandwidth usage within the last 5 minutes. Average inbound bandwidth usage = Average inbound rate within the last 5 minutes/Interface bandwidth When the average bandwidth usage is smaller than 0.01% and larger than 0, the value 0.01% is displayed. When the interface bandwidth becomes smaller, for example, the bandwidth is changed using the speed command, or when an Eth-Trunk member interface becomes Down or is removed from the Eth-Trunk, the bandwidth usage may be displayed as 100% because the communication traffic is not adjusted in time. |
OutUti |
Average outbound bandwidth usage within the last 5 minutes. Average outbound bandwidth usage = Average outbound rate within the last 5 minutes/Interface bandwidth When the average bandwidth usage is smaller than 0.01% and larger than 0, the value 0.01% is displayed. When the interface bandwidth becomes smaller, for example, the bandwidth is changed using the speed command, or when an Eth-Trunk member interface becomes Down or is removed from the Eth-Trunk, the bandwidth usage may be displayed as 100% because the communication traffic is not adjusted in time. |
Trunk |
Number of the Eth-Trunk to which an interface is added. |
display port-group
Function
The display port-group command displays information about permanent port groups and interfaces in these groups.
Parameters
Parameter |
Description |
Value |
---|---|---|
all |
Displays information about all permanent port groups and interfaces in these groups. |
- |
port-group-name |
Displays information about a specified permanent port group and interfaces in the group. |
The value is a string of 1 to 32 case-insensitive characters without spaces. |
Usage Guidelines
- 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.
display port-isolate group
Function
The display port-isolate group command displays the configuration of a port isolation group.
display snmp-agent trap feature-name error-down all
Function
The display snmp-agent trap feature-name error-down all command displays the status of all traps of the error-down module.
Usage Guidelines
Usage Scenario
The Simple Network Management Protocol (SNMP) is a network management standard widely used on the TCP/IP network. It uses a central computer (a network management station) that runs network management software to manage network elements. The SNMP agent reports trap messages to the network management station so that the network management station can obtain the network status in a timely manner, and the network administrator can take measures accordingly.
Trap names supported by the error-down module. The trap names are the same as the trap names specified by the snmp-agent trap enable feature-name error-down trap-name trap-name command. Each trap name corresponds to a network element abnormality.
Trap status of the error-down module. You can check whether the trap is reported based on the trap name.
Prerequisites
SNMP has been enabled. See snmp-agent.
Example
# Display all traps of the error-down module.
<Huawei>display snmp-agent trap feature-name error-down all
------------------------------------------------------------------------------
Feature name: ERROR-DOWN
Trap number : 2
------------------------------------------------------------------------------
Trap name Default switch status Current switch status
hwErrordown on on
hwErrordownRecovery on on
Item |
Description |
---|---|
Feature name |
Name of the module that the trap belongs to. |
Trap number |
Number of traps. |
Trap name |
Name of the trap:
|
Default switch status |
Default status of the trap function:
|
Current switch status |
Status of the trap function:
|
duplex
Function
The duplex command configures the duplex mode on an Ethernet electrical interface in non-auto-negotiation mode.
The undo duplex command restores the default duplex mode on an Ethernet electrical interface in no-auto-negotiation mode.
By default, an Ethernet electrical interface works in full-duplex mode when auto-negotiation is disabled on the interface.
Usage Guidelines
Usage Scenario
- To enable an interface to send and receive packets at the same time, set the full-duplex mode on the interface.
- To disable an interface from sending and receiving packets at the same time, set the half-duplex mode on the interface.
Prerequisites
The interface works in non-auto negotiation mode.
Precautions
A GE electrical interface that works at 1000 Mbit/s supports only the full-duplex mode. A GE electrical interface and its peer interface do not need to negotiate the duplex mode.
By default, an Ethernet interface works in auto-negotiation mode, which is recommended. If the negotiation succeeds, the two interfaces work at the same duplex mode and speed. The settings of the SPEED and DUPLEX parameters and auto-negotiation mode must be the same at the local and peer ends. Otherwise, negotiation may fail. The interface auto-negotiation mode, duplex mode and speed support depend on the device.
encapsulation priority-tagged
Function
The encapsulation priority-tagged command configures the outbound interface to add a VLAN tag of VLAN 0 to packets and sets the 802.1p priority of packets.
The undo encapsulation priority-tagged command disables the outbound interface from adding a VLAN tag of VLAN 0 to packets and deletes the 802.1p priority of packets.
By default, the outbound interface does not add any VLAN tag to packets and retains the original 802.1p priority of packets.
Format
encapsulation priority-tagged [ dot1p priority-value | dot1p-transmit priority-value ]
undo encapsulation priority-tagged [ dot1p | dot1p-transmit ]
Parameters
Parameter | Description | Value |
---|---|---|
dot1p priority-value | Sets the 802.1p priority of protocol packets on the outbound interface. | The value is an integer that ranges from 0 to 7. The default value is 0. |
dot1p-transmit priority-value | Sets the 802.1p priority of data packets on the outbound interface. | The value is an integer that ranges from 0 to 7. The default value is 0. |
Usage Guidelines
Usage Scenario
You can run the encapsulation priority-tagged dot1p priority-value command to configure the outbound interface to add a VLAN tag of VLAN 0 to packets and sets the 802.1p priority of protocol packets.
In the bridge scenario, you can run the encapsulation priority-tagged dot1p-transmit priority-value command to configure the outbound interface to add a VLAN tag of VLAN 0 to packets and sets the 802.1p priority of data packets.
Prerequisites
Run the undo ip soft-forward enhance enable command in the system view to disable the enhanced forwarding function for control packets generated by the device.
Precautions
The encapsulation priority-tagged dot1p priority-value command can be used only on Layer 3 Ethernet interfaces, GE interfaces, XGE interfaces, VE interfaces.
The encapsulation priority-tagged dot1p-transmit priority-value command can be used only on Layer 3 Ethernet interfaces, GE interfaces, XGE interfaces.
The encapsulation priority-tagged dot1p-transmit priority-value command takes effect only in bridge scenarios.
Example
# Configure the outbound interface of the Eth2/0/0 to add a VLAN tag of VLAN 0 to packets and set the 802.1p priority of protocol packets to 3.
<Huawei> system-view [Huawei] undo ip soft-forward enhance enable [Huawei] interface ethernet 2/0/0 [Huawei-Ethernet2/0/0] encapsulation priority-tagged dot1p 3
# Configure the outbound interface of the Eth2/0/0 to add a VLAN tag of VLAN 0 to packets and set the 802.1p priority of data packets to 3.
<Huawei> system-view [Huawei] undo ip soft-forward enhance enable [Huawei] interface ethernet 2/0/0 [Huawei-Ethernet2/0/0] encapsulation priority-tagged dot1p-transmit 3
error-down auto-recovery
Function
The error-down auto-recovery command enables an interface in error-down state to go Up and sets the auto recovery delay.
The undo error-down auto-recovery command disables an interface in error-down state from going Up automatically.
By default, an interface in error-down state is not enabled to go Up.
An interface enters the error-down state after being shut down due to an error. Currently, errors include BPDU protection.
Format
error-down auto-recovery cause { bpdu-protection | efm-remote-failure | efm-threshold-event } interval interval-value
undo error-down auto-recovery cause { bpdu-protection | efm-remote-failure | efm-threshold-event } interval interval-value
Parameters
Parameter |
Description |
Value |
---|---|---|
cause | Indicates the cause for an interface in error-down state. |
- |
bpdu-protection | Indicates that STP BPDU protection is enabled. |
- |
efm-remote-failure | Indicates that an EFM remote failure event occurs. |
- |
efm-threshold-event | Indicates that a threshold crossing event occurs. |
- |
interval interval-value | Specifies the auto recovery delay. |
The value is an integer that ranges from 30 to 86400, in seconds.
|
Usage Guidelines
Usage Scenario
Cause for an Interface in Error-down State | Scenario | Remarks |
---|---|---|
bpdu-protection | On an STP-enabled network where BPDU protection is configured on an edge port, if malicious attackers send bogus BPDUs to attack the switching device, the switching device sets the edge port to Down immediately after the edge port receives BPDUs. As a result, all services on the edge port are interrupted. |
For details, see stp bpdu-protection. |
efm-remote-failure | The efm trigger error-down command associates an error event with an interface. When EFM detects critical-event, dying-gasp, link-fault, or timeout faults, the protocol status of the interface becomes Down and all services on the interface are interrupted. |
- |
efm-threshold-event | When link monitoring is configured for an interface on a link, the link is considered unavailable, if the number of errored frames, errored codes, or errored frame seconds detected by the interface reaches or exceeds the threshold within a period. You can associate an EFM crossing event with an interface. Then the system sets the administrative status of the interface to Down. In this manner, all services on the interface are interrupted. |
- |
By default, an interface can only be resumed by a network administrator after being shut down. To configure the interface to restore to the Up state automatically, run the error-down auto-recovery command to set an auto recovery delay. After the delay, the interface goes Up automatically.
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
<Huawei> system-view [Huawei] error-down auto-recovery cause bpdu-protection interval 50
<Huawei> system-view [Huawei] error-down auto-recovery cause efm-remote-failure interval 50
error-statistics threshold-event trigger error-down
Function
The error-statistics threshold-event trigger error-down command configures an interface to transit to the error-down state when the number of error packets received on the interface reaches the alarm threshold.
The undo error-statistics threshold-event trigger error-down command restores the default setting.
By default, an interface does not transit to the error-down state when the number of error packets received on the interface reaches the alarm threshold.
Format
error-statistics threshold-event trigger error-down
undo error-statistics threshold-event trigger error-down
Usage Guidelines
Usage Scenario
When an Ethernet interface that has the backup link configured receives error packets, packet loss occurs. To ensure that services are running properly, the interface transits to the error-down state and services are switched to the backup link when the number of error packets received on the interface reaches the alarm threshold.
Follow-up Procedure
By default, an interface that transits to the error-down state can only be restored manually using the undo shutdown command. To configure the interface to restore to the Up state automatically, run the error-down auto-recovery cause error-statistics command in the system view to set a recovery delay. After the delay, the interface goes Up automatically.
flow-control (Ethernet interface view)
Function
The flow-control command enables flow control on an Ethernet interface.
The undo flow-control command disables flow control on an Ethernet interface.
By default, flow control is disabled on an Ethernet interface.
Usage Guidelines
Usage Scenario
Network congestion causes packet loss. Flow control is a method to prevent packet loss. If network congestion occurs on the local device, the local device sends a message to the remote device, instructing the remote device to reduce the packet sending rate. After receiving the message, the remote device reduces its packet sending rate, which prevents congestion.
Precautions
If flow control is enabled on an interface, it must also be enabled on the peer interface.
If the flow-control negotiation command has been executed on an Ethernet interface to enable flow control auto-negotiation, running the flow-control command on the interface will fail.
flow-control negotiation
Function
The flow-control negotiation command enables flow control auto-negotiation on an Ethernet interface.
The undo flow-control negotiation command disables flow control auto-negotiation on an Ethernet interface.
By default, flow control auto-negotiation is disabled on an Ethernet interface.
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
The Ethernet interface works in auto-negotiation mode.
Precautions
If flow control auto-negotiation is enabled on an interface, it must also be enabled on the peer interface.
- If flow control has been enabled on an Ethernet interface using the flow-control command, run the undo flow-control command to disable flow control before running the flow-control negotiation command. Otherwise, the flow-control negotiation command fails to be executed.
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 | interface-type1 } [ to { interface-type interface-number2 | interface-type2 } ] } &<1-10>
undo group-member { { interface-type interface-number1 | interface-type1 } [ to { interface-type interface-number2 | interface-type2 } ] } &<1-10>
undo group-member all-unavailable-interface
Parameters
Parameter | Description | Value |
---|---|---|
interface-type interface-number1 [ to interface-type interface-number2 ] | Adds an Ethernet interface to a permanent port group. to specifies an interface range, indicating all the interfaces numbered between interface-number1 and interface-number2. |
interface-number2 must be greater than interface-number1. |
interface-type1 [ to interface-type2 ] | Adds an Ethernet interface to a permanent port group. to specifies an interface range, indicating all the interfaces numbered between interface-type1 and interface-type2. |
interface-type2 must be greater than interface-type1. |
Usage Guidelines
Usage Scenario
To perform the same configuration on multiple Ethernet interfaces, add these Ethernet interfaces to a port group and run commands in the port group view to configure the Ethernet interfaces in batches.
Prerequisites
A permanent port group has been created using the port-group command in the system view.
Precautions
- The E1-F and CE1/PRI interfaces cannot be added to the same permanent port group.
A maximum of 32 permanent port groups are supported by the system, and a maximum of 48 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 group-member command to add interfaces to a temporary port group to configure the interfaces in batches.
When you specify the keyword to in the group-member command:
- The interfaces specified before and after the keyword to must reside on the same interface card. To add consecutive interfaces on different interface cards to the same port group, run the group-member command or use to multiple times.
- The interfaces specified before and after the keyword to must be of the same type such as Ethernet 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 used, these limitations do not apply.
interface (Ethernet interface)
Function
Using the interface command, you can enter the specified interface view or sub-interface view.
Format
interface { ethernet | gigabitethernet | xgigabitethernet } interface-number [.subinterface-number ]
Parameters
Parameter |
Description |
Value |
---|---|---|
ethernet |
Enter the view of an FE interface. |
- |
gigabitethernet |
Enter the view of a GE interface. |
- |
xgigabitethernet |
Enter the view of a 10GE interface. |
- |
interface-number |
Specifies the number of an interface. |
The value depends on the interface type and slot ID. |
subinterface-number |
Specifies the number of a sub-interface. |
The value is an integer that ranges from 1 to 4096. |
Usage Guidelines
After enter the specified Ethernet interface view, you can set attributes for the Ethernet interface.
You can run the display device command to view the slot ID of a card to determine the value range of interface-number. Only Layer 3 Ethernet interfaces support sub-interfaces.
interface range
Function
The interface range command creates a temporary interface group and adds specified interfaces to this temporary interface group. Commands configured for a temporary interface group then automatically run on all member interfaces.
By default, no temporary interface group is created.
Format
interface range { { interface-type interface-number1 | interface-type1 } [ to { interface-type interface-number2 | interface-type2 } ] } &<1-10>
Parameters
Parameter | Description | Value |
---|---|---|
interface-type interface-number1 [ to interface-type interface-number2 ] | Specifies Ethernet interfaces to be added to a temporary
port group. to indicates an interface range. All interfaces numbered between interface-number1 and interface-number2 are added to the temporary port group. |
The value of interface-number2 must be larger than the value of interface-number1. |
interface-type1 [ to interface-type2 ] | Specifies Ethernet interfaces to be added to a temporary
port group. to indicates an interface range. All interfaces numbered between interface-type1 and interface-type2 are added to the temporary port group. |
The value of interface-type2 must be larger than the value of interface-type1. |
Usage Guidelines
Usage Scenario
Generally, a device has many Ethernet interfaces and most of them have the same configuration. Configuring these Ethernet interfaces one by one increases the configuration workload and may result in incorrect configurations. Therefore, you can add the Ethernet interfaces to be configured with the same command to a port group. After a command is run in this port group, the system executes the command on all the member interfaces. This process allows Ethernet interfaces to be configured in batches.
Precautions
- The interface range and port-group group-member commands have the same functions. Therefore, use either of the commands for configuration.
After exiting from the temporary port group view, the system deletes the temporary port group.
The interface range command is equivalent to the group-member command executed in the permanent port group view. Multiple interfaces can be added to a permanent port group in batches using the group-member command.
- E1-F and CE1/PRI interfaces cannot be added to the same temporary port group.
The system supports a maximum of 32 temporary port groups. If more than 32 users log in to the device through Telnet simultaneously, only 32 users can create temporary port groups.
A temporary port group supports a maximum of 48 member interfaces.
When you specify the keyword to in the interface range command:
- The interfaces specified by interface-number1 and interface-number2 must reside on the same LPU. To add contiguous interfaces on different LPUs 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 Ethernet 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.
ifg
Function
The ifg command configures the inter-frame gap (IFG).
The undo ifg command restores the default IFG.
By default, the IFG is 12 bytes.
Usage Guidelines
Usage Scenario
The IFG is used to differentiate two data packets. The ifg command configures the IFG to adjust data packet forwarding efficiency.
The packet forwarding rate, also called the throughput, is the data forwarding capability on an interface, expressed in packets per second. The packet forwarding rate is calculated based on the number of 64-byte data packets sent in a certain period. The payload of the frame header and IFG affects the packet forwarding rate.
Precautions
Changing the IFG on an interface is not recommended because this may cause packet loss on the interface.
log-threshold
Function
The log-threshold command sets the inbound and outbound bandwidth usage thresholds for generating a log.
The undo log-threshold command restores the default inbound and outbound bandwidth usage thresholds for generating a log.
The default inbound and outbound bandwidth usage thresholds for generating a log is 100.
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 |
---|---|---|
input-rate | Specifies the inbound bandwidth. | - |
output-rate | Specifies the outbound bandwidth. | - |
bandwidth-in-use | Specifies the bandwidth usage threshold for generating a log, prompting for a bandwidth increase request. | The value is an integer that ranges from 1 to 100. |
resume-rate resume-threshold | Specifies the bandwidth usage threshold for generating a log, indicating that bandwidth usage has been restored. | The value is an integer that ranges from 1 to the value of bandwidth-in-use. The default value is the value of bandwidth-in-use. |
Usage Guidelines
Monitoring bandwidth usage helps you learn about current device load. If the bandwidth usage exceeds a configured threshold, a log or an alarm is generated, indicating that bandwidth resources become insufficient and need an increase. For example, if bandwidth usage exceeds 95% of total bandwidth, an alarm is generated, indicating that bandwidth is exhausted. Some services may be interrupted before the bandwidth increases. To help prevent service interruption, setting two bandwidth usage thresholds, one for generating a log and the other for generating an alarm helps you increase bandwidth in time.
Outbound bandwidth usage = (Outbound interface rate/Outbound physical interface bandwidth) x 100
Inbound bandwidth usage = (Inbound interface rate/Inbound physical interface bandwidth) x 100
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.
Example
# Configure Eth2/0/0 to generate a log when the outbound interface rate exceeds 80% of the bandwidth.
<Huawei> system-view [Huawei] interface ethernet 2/0/0 [Huawei-Ethernet2/0/0] log-threshold output-rate 80
# Configure Eth2/0/0 to generate a log when the outbound interface rate exceeds 80% of the bandwidth and to generate a log indicating that bandwidth usage has been restored, when the outbound interface rate is lower than 60% of the bandwidth.
<Huawei> system-view [Huawei] interface ethernet 2/0/0 [Huawei-Ethernet2/0/0] log-threshold output-rate 80 resume-rate 60
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.
Usage Guidelines
Usage Scenario
Loopback detection can be enabled to test some special functions, for example, locating faults on the Ethernet. After loopback detection is enabled, the Ethernet interface works in full-duplex mode. After loopback detection is disabled, the original duplex mode of the Ethernet interface is restored.
After loopback detection is enabled on an interface, packets sent from the interface are sent back to this interface.
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.
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.
mac-address (Ethernet interface view)
Function
The mac-address command configures a MAC address for an Ethernet interface.
The undo mac-address command restores the default MAC address of an Ethernet interface.
By default, the MAC address of an Ethernet interface is the system MAC address.
Parameters
Parameter | Description | Value |
---|---|---|
mac-address | Specifies a MAC address for an Ethernet interface. | The value is in the format of H-H-H. Each H is a 4-digit hexadecimal number, such as 00e0 or fc01. The MAC address cannot be FFFF-FFFF-FFFF, all 0s, or a multicast MAC address. |
Views
Ethernet interface view, GE interface view, XGE interface view,Ethernet sub-interface view, GE sub-interface view, XGE sub-interface view
Usage Guidelines
Usage Scenario
The MAC address of an Ethernet interface is the system MAC address and may conflict with the MAC address of another interface. If the MAC address of an Ethernet interface conflicts with that of another interface, a loop may occur or traffic may fail to be forwarded.
You can run the mac-address command to change the MAC address of the Ethernet interface to ensure that service data flows are properly forwarded.
Configuration Impact
After the MAC address of an Ethernet interface is changed, the device proactively sends gratuitous ARP packets to update ARP entries on the remote device.
Precautions
This command can be configured only on Layer 3 Ethernet interfaces.
management-plane isolate enable
Function
The management-plane isolate enable command disables the device from accessing the IP address of the management port from service ports.
The undo management-plane isolate enable command enables the device to access the IP address of the management port from service ports.
By default, the device is disabled from accessing the IP address of the management port from service ports.
Only the AR2204EX, AR2240 (configured with the SRU100E, SRU200, SRU200E, and SRU400), AR3260 (configured with the SRU200, SRU200E, and SRU400) and AR3670 (configured with the SRUX5) support this command.
Usage Guidelines
Usage Scenario
You can run the management-plane isolate enable command on the device so that the service port will discard the packets whose destination address is the management port address. This improves network security and prevents attacks between the management port through the service ports. However, the device can access the IP address of service ports from the management port.
Precautions
The management-port isolate enable and management-plane isolate enable command functions are different. The management-port isolate enable command isolates traffic between the management port and service ports by marking the network segment routes with the outbound interface being the management port as the blackhole routes, whereas the management-plane isolate enable command isolates service ports from the management port by marking the host and broadcast routes with the outbound interface being the management port as the blackhole routes.
management-port isolate enable
Function
The management-port isolate enable command enables forwarding traffic isolation between the management port and service ports.
The undo management-port isolate enable command disables forwarding traffic isolation between the management port and service ports.
By default, forwarding traffic isolation is enabled between the management port and service ports.
Only the AR2204EX, AR2240 (configured with the SRU100E, SRU200, SRU200E, and SRU400), AR3260 (configured with the SRU200, SRU200E, and SRU400) and AR3670 (configured with the SRUX5) support this command.
Usage Guidelines
Usage Scenario
You can run the management-port isolate enable command on the device to restrict packet traffic between the management port and service ports. That is, the packets received on the management port will not be forwarded from service ports; similarly, the packets received on service ports will not be forwarded from the management port. This improves network security and prevents attacks on the management port from service ports.
Precautions
The management-port isolate enable and management-plane isolate enable command functions are different. The management-port isolate enable command isolates traffic between the management port and service ports by marking the network segment routes with the outbound interface being the management port as the blackhole routes, whereas the management-plane isolate enable command isolates service ports from the management port by marking the host and broadcast routes with the outbound interface being the management port as the blackhole routes.
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.
Parameters
Parameter |
Description |
Value |
---|---|---|
across |
Sets the MDI mode of an Ethernet electrical interface to across. |
- |
auto |
Sets the MDI mode of an Ethernet electrical interface to auto. An Ethernet electrical interface automatically identifies the network cable type. |
- |
normal |
Sets the MDI mode of an Ethernet electrical interface to normal. |
- |
Usage Guidelines
An Ethernet interface consists of eight pins. Each pin has its functions. For example, pins 1 and 2 send signals, and pins 3 and 6 receive signals. By setting the MDI mode for an interface, you can change the roles of pins in communication so that the interface adapts to the actual network cable type.
Setting the MDI mode to auto is recommended because the auto mode applies to most scenarios. When the network cable type parameters cannot be obtained, set the MDI mode to across or normal manually.
The methods to set the MDI mode manually are as follows:
- When straight-through network cables are used, the MDI modes of the interfaces on the local and peer devices must be different. For example, you can set the MDI mode of the interface on the local device to across and the MDI mode of the interface on the peer device to normal.
- When crossover network cables are used, the MDI modes of the interfaces on the local and peer devices must be the same. For example, you can set the MDI modes of the interfaces on the local and peer devices to across or normal. Alternatively, the MDI type of the interface on a device is auto and the MDI type of the interface on the other device can be set to across or normal.
mtu (Ethernet interface view)
Function
The mtu command sets the maximum transmission unit (MTU) for an Ethernet interface.
The undo mtu command restores the default MTU of an Ethernet interface.
By default, the MTU of an Ethernet interface is 1500 bytes.
Usage Guidelines
Usage Scenario
- If the MTU is too small whereas the packet size is large, the packet is split into many fragments. Therefore, the packet may be discarded due to insufficient QoS queue length.
- If the MTU is too large, packets are transmitted slowly or even lost.
Precautions
If you run the mtu command multiple times in the same Ethernet interface view, only the latest configuration takes effect.
- This command can only be used on Layer 3 Ethernet interfaces.
negotiation auto
Function
The negotiation auto command configures an Ethernet interface to work in auto-negotiation mode.
The undo negotiation auto command configures an Ethernet interface to work in non-auto-negotiation mode.
By default, an Ethernet interface works in auto-negotiation mode.
Views
MEth interface view, Ethernet interface view, GE interface view, XGE interface view, port group view
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.
- If interfaces on both ends support auto-negotiation and are required to work in auto-negotiation mode, run the negotiation auto command.
- If one of the two interfaces does not support auto-negotiation or is not required to work in auto-negotiation mode, run the undo negotiation auto command.
Precautions
By default, an Ethernet interface works in auto-negotiation mode, which is recommended. If the negotiation succeeds, the two interfaces work at the same duplex mode and speed. The settings of the SPEED and DUPLEX parameters and auto-negotiation mode must be the same at the local and peer ends. Otherwise, negotiation may fail. The interface auto-negotiation mode, duplex mode and speed support depend on the device.
- By default, GE interfaces do not support flow control auto-negotiation. You can run the flow-control negotiation command to configure flow control auto-negotiation.
- GE optical interfaces do not support auto-negotiation function after FE optical modules are installed on the interfaces.
port-down holdoff-timer
Function
The port-down holdoff-timer command sets the delay time for an interface to report the Down event.
The undo port-down holdoff-timer command configures an interface to report the Down event immediately.
By default, an interface reports the Down event immediately.
Usage Guidelines
When an interface becomes Down, services on the interface are interrupted even if this interface becomes Up soon. To prevent services from being interrupted, set the delay in reporting a Down event on the interface so that the system still considers that this interface is in Up state within the delay time.
port-group
Function
The port-group command creates a permanent port group and displays the permanent port group view.
The undo port-group command deletes permanent port groups.
By default, no permanent port group is configured.
Usage Guidelines
Usage Scenario
Generally, a device has many interfaces and most of them have the same configuration. Configuring these interfaces one by one increases the configuration workload and may result in incorrect configurations. You can add the interfaces to be configured with the same commands to a permanent port group. After a command is run in this port group, the system executes the command on all the member interfaces. This process allows interfaces to be configured in batches.
Follow-up Procedure
Run the group-member command to add Ethernet interfaces to the created permanent port group.
Precautions
The port-group-name parameter cannot be set to all.
The system supports a maximum of 32 permanent port groups and each port group supports a maximum of 48 member interfaces.
port-group group-member
Function
The port-group group-member command creates a temporary port group and adds specified Ethernet interfaces to the temporary port group. Commands configured for a temporary port group will be automatically run on all member interfaces.
By default, no temporary port group is created.
Format
port-group group-member { { interface-type interface-number1 | interface-type1 } [ to { interface-type interface-number2 | interface-type2 } ] } &<1-10>
Parameters
Parameter | Description | Value |
---|---|---|
interface-type interface-number1 [ to interface-type interface-number2 ] | Specifies Ethernet interfaces to be added to a temporary
port group. to indicates an interface range. All interfaces numbered between interface-number1 and interface-number2 are added to the temporary port group. |
The value of interface-number2 must be larger than the value of interface-number1. |
interface-type1 [ to interface-type2 ] | Specifies Ethernet interfaces to be added to a temporary
port group. to indicates an interface range. All interfaces numbered between interface-type1 and interface-type2 are added to the temporary port group. |
The value of interface-type2 must be larger than the value of interface-type1. |
Usage Guidelines
Usage Scenario
Generally, a device has many Ethernet interfaces and most of them have the same configuration. Configuring these Ethernet interfaces one by one increases the configuration workload and may result in incorrect configurations. Therefore, you can add the Ethernet interfaces to be configured with the same command to a port group. After a command is run in this port group, the system executes the command on all the member interfaces. This process allows Ethernet interfaces to be configured in batches.
Precautions
After exiting from the temporary port group view, the system deletes the temporary port group.
The port-group group-member command is equivalent to the group-member command executed in the permanent port group view. Multiple interfaces can be added to a permanent port group in batches using the group-member command.
- E1-F and CE1/PRI interfaces cannot be added to the same temporary port group.
The system supports a maximum of 32 temporary port groups. If more than 32 users log in to the device through Telnet simultaneously, only 32 users can create temporary port groups.
A temporary port group supports a maximum of 48 member interfaces.
When you specify the keyword to in the port-group group-member command:
- The interfaces specified by interface-number1 and interface-number2 must reside on the same LPU. To add contiguous interfaces on different LPUs 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 Ethernet 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.
port-isolate enable
Function
The port-isolate enable command enables port isolation.
The undo port-isolate enable command disables port isolation.
By default, port isolation is disabled.
Views
Ethernet interface view, GE interface view, Eth-Trunk interface view, port group view, XGE interface view
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.
- Inter-board port isolation is not supported on the interfaces of the 4GE-2S, 9ES2, 4ES2G-S or 4ES2GP-S interface card.
The AR100&AR120&AR150&AR160&AR200 series, AR1200 series, AR2220E, AR2201-48FE, AR2202-48FE, AR2204-51GE-P, AR2204-51GE-R, AR2204-27GE-P, AR2204-27GE, AR2204E, AR2204E-D, and AR2204 only support isolation at Layer 2 and interworking at Layer 3. GE0/0/3 to GE0/0/26 on the AR2204-51GE-P and AR2204-51GE-R cannot be isolated from GE0/0/27 to GE0/0/50.
port-isolate mode
Function
The port-isolate mode command sets the port isolation mode.
By default, ports are isolated at Layer 2 but can communicate at Layer 3.
The AR100&AR120&AR150&AR160&AR200 series, AR1200 series, AR2220E, AR2201-48FE, AR2202-48FE, AR2204-51GE-P, AR2204-51GE-R, AR2204-27GE-P, AR2204-27GE, AR2204E, AR2204E-D, and AR2204 only support isolation at Layer 2 and interworking at Layer 3. GE0/0/3 to GE0/0/26 on the AR2204-51GE-P and AR2204-51GE-R cannot be isolated from GE0/0/27 to GE0/0/50.
Usage Guidelines
Usage Scenario
To disable members in a port isolation group from communicating at Layer 2 but allow them to access public resources, such as printer and server, run the port-isolate mode command to set the port isolation mode to l2.
To disable members in a port isolation group from communicating at both Layer 2 and Layer 3, run the port-isolate mode command to set the port isolation mode to all.
Precautions
To isolate ports at both Layer 2 and Layer 3, run the port-isolate mode all command.
To isolate ports at Layer 2 but allow them to communicate at Layer 3, run the port-isolate mode l2 command.
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.
By default, an Ethernet interface works in Layer 2 mode.
Eth0/0/0 to Eth0/0/3 on the AR120 (except the AR129CV, AR129CVW, and AR129CGVW-L) and AR150 series can be changed from Layer 2 mode to Layer 3 mode.
GE0/0/0 to GE0/0/3 on the AR100 series, AR129CV, AR129CVW, AR129CGVW-L, and AR160 series can be changed from Layer 2 mode to Layer 3 mode.
Eth0/0/0 to Eth0/0/7 on the AR200 series, AR1220, AR1220V, AR1220W, AR1220VW, and AR1220F can be changed from Layer 2 mode to Layer 3 mode.
GE0/0/0 to GE0/0/7 on the AR1220C, AR1220E, AR1220EV, and AR1220EVW can be changed from Layer 2 mode to Layer 3 mode.
Eth0/0/0 and Eth0/0/47 on the AR2201-48FE and AR2202-48FE can be changed from Layer 2 mode to Layer 3 mode.
GE0/0/3 to GE0/0/50 on the AR2204-51GE-P, AR2204-51GE-R, and AR2204-51GE can be changed from Layer 2 mode to Layer 3 mode.
GE0/0/3 to GE0/0/26 on the AR2204-27GE-P, AR2204E-D-27GE, and AR2204-27GE can be changed from Layer 2 mode to Layer 3 mode.
The working modes of all interfaces on the 24GE Ethernet LAN cards can be changed from Layer 2 mode to Layer 3 mode. After the reserved VLAN ID of the 9ES2 Ethernet LAN card (excluding the 9ES2 Ethernet LAN card, 8FE1GE Ethernet electrical interface card, and 4ES2G-S Ethernet LAN card installed on the AR1200 series router) is delivered using the set reserved-vlan command, the working modes of all interfaces on the card can be changed from Layer 2 mode to Layer 3 mode.
AR2220E, AR2240, and AR3260 can run the portswitch command to change the working mode of all interfaces on the SRU200, SRU400, 4GECS, and 2X10GL from Layer 3 mode to Layer 2 mode. The interfaces that change the working mode to layer 2 only support VXLAN.
Usage Guidelines
Usage Scenario
By default, an Ethernet interface on the device works in Layer 2 mode. To enable Layer 3 functions on the interface, run the undo portswitch command on the interface.
Precautions
The minimum interval between running the portswitch and undo portswitch commands must be 30s.
set flow-statistics include-interframe
Function
The set flow-statistics include-interframe command configures traffic statistics on an interface to contain the inter-frame gap and preamble.
The undo set flow-statistics include-interframe command configures traffic statistics on an interface not to contain the inter-frame gap and preamble.
By default, traffic statistics on an interface do not contain the inter-frame gap and preamble.
Views
Ethernet interface view, GE interface view, XGE interface view, Eth-Trunk interface view, port group view
Usage Guidelines
Usage Scenario
The QoS function counts the inter-frame gap when calculating the traffic rate on an interface, but the traffic statistics on the interface do not contain the inter-frame gap. Therefore, the traffic statistics collected on an interface are different from the traffic statistics of rate limit on the interface. To solve this problem, configure the traffic statistics on an interface to contain the inter-frame gap.
Precautions
The device counts bytes in the inter-frame gap when collecting traffic statistics on a sub-interface. By default, the device does not count bytes in the inter-frame gap when collecting traffic statistics on a main interface. Therefore, traffic statistics on a main interface differ from those on its sub-interface. You can run the set flow-statistics include-interframe command on the main interface to configure the device to count bytes in the inter-frame gap and preamble when collecting traffic statistics on the main interface.
snmp-agent trap enable feature-name error-down
Function
The snmp-agent trap enable feature-name error-down command enables the trap function for the errordown module.
The undo snmp-agent trap enable feature-name error-down command disables the trap function for the errordown module.
By default, the trap function is disabled for the errordown module.
Format
snmp-agent trap enable feature-name error-down [ trap-name trap-name ]
undo snmp-agent trap enable feature-name error-down [ trap-name trap-name ]
Parameters
Parameter | Description | Value |
---|---|---|
trap-name trap-name | Indicates the trap function for a specified type
of trap messages of the errordown module:
|
- |
speed
Function
The speed command sets the rate for 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. Specially, when a GE electrical interface works in non-auto-negotiation mode, its default rate is 100 Mbit/s, not the maximum rate 1000 Mbit/s supported by the GE interface.
The rate range depends on the device.
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.
PrecautionsBy default, an Ethernet interface works in auto-negotiation mode, which is recommended. If the negotiation succeeds, the two interfaces work at the same duplex mode and speed. The settings of the SPEED and DUPLEX parameters and auto-negotiation mode must be the same at the local and peer ends. Otherwise, negotiation may fail. The interface auto-negotiation mode, duplex mode and speed support depend on the device.
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.
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 100.
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 |
---|---|---|
input-rate | Indicates inbound bandwidth. | - |
output-rate | Indicates outbound bandwidth. | - |
bandwidth-in-use | Specifies the bandwidth usage threshold for generating a trap. | The value is an integer that ranges from 1 to 100. |
resume-rate resume-threshold | Specifies the bandwidth usage threshold for clearing a trap. | The value is an integer that ranges from 1 to bandwidth-in-use. The default value is bandwidth-in-use. |
Usage Guidelines
Usage Scenario
The bandwidth usage represents the load on a device. If the bandwidth usage exceeds the threshold, bandwidth of the device is insufficient for services and needs expansion. For example, if the bandwidth usage exceeds 95%, an alarm is generated to indicate that bandwidth resources are used up. Services may be interrupted before system expansion. You can set the upper and lower thresholds for bandwidth usage. When the bandwidth usage exceeds the lower threshold, the system generates a log. When the bandwidth usage exceeds the upper threshold, the system triggers an alarm.
Outbound bandwidth usage = (Outbound interface rate/Outbound physical interface bandwidth) x 100
Inbound bandwidth usage = (Inbound interface rate/Inbound physical interface bandwidth) x 100
The interface rate and bandwidth are expressed in bits per second.
The interval for collecting statistics on the traffic rate on an interface is the value configured using the set flow-stat interval command on the interface.
To set a lower threshold, run the log-threshold command.
- 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.
Precautions
- When the bandwidth usage exceeds the threshold for generating a trap, the system generates a trap. When the bandwidth usage falls below the threshold for clearing a trap, the system clears the 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
<Huawei> system-view [Huawei] interface ethernet 2/0/0 [Huawei-Ethernet2/0/0] trap-threshold output-rate 60
# Configure Eth2/0/0 to generate a trap when the outbound bandwidth usage exceeds 80% and clear the trap when the outbound bandwidth usage falls below 60%.
<Huawei> system-view [Huawei] interface ethernet 2/0/0 [Huawei-Ethernet2/0/0] trap-threshold output-rate 80 resume-rate 60
trap-threshold error-statistics
Function
The trap-threshold error-statistics command sets the alarm threshold for error packets and alarm interval.
The undo trap-threshold error-statistics command restores the default alarm threshold for error packets and default alarm interval.
By default, the alarm threshold for error packets is 3 and the alarm interval is 10 seconds.
Format
trap-threshold error-statistics threshold-value interval interval-value
undo trap-threshold error-statistics
Parameters
Parameter |
Description |
Value |
---|---|---|
threshold-value |
Sets the alarm threshold for error packets. |
The value is an integer that ranges from 1 to 65535. |
interval interval-value |
Sets the interval for reporting alarms for error packets. |
The value is an integer that ranges from 10 to 65530 and must be a multiple of 10, in seconds. |
virtual-cable-test
Function
The virtual-cable-test command tests the cable connected to an Ethernet electrical interface and displays the test result.
Usage Guidelines
Usage Scenario
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 fault point is displayed.
Precautions
- The distance error generated during VCT detection is about 10 m. The test result is only for reference and may be inaccurate for cables of some vendors.
- Running the virtual-cable-test command may affect services on the interface in a short period of time.
- Combo electrical interfaces support cable tests.
- Before performing a cable test, shut down the remote interface or remove the network cable from the remote interface. Otherwise, signals from the remote interface may make the test result inaccurate.
Example
<Huawei> system-view [Huawei] interface ethernet 2/0/0 [Huawei-Ethernet2/0/0] virtual-cable-test Warning: The command will stop service for a while, continue[Y/N]?y 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
Item |
Description |
---|---|
Pair A/B/C/D |
Four pairs of circuits in a network cable. |
Pair A length |
Length of a network cable:
|
Pair A state |
Network cable status:
|
- am isolate
- auto duplex
- auto speed
- clock (Ethernet interface view)
- combo-port
- display error-down recovery
- display interface ethernet brief
- display port-group
- display port-isolate group
- display snmp-agent trap feature-name error-down all
- duplex
- encapsulation priority-tagged
- error-down auto-recovery
- error-statistics threshold-event trigger error-down
- flow-control (Ethernet interface view)
- flow-control negotiation
- group-member
- interface (Ethernet interface)
- interface range
- ifg
- log-threshold
- loopback
- mac-address (Ethernet interface view)
- management-plane isolate enable
- management-port isolate enable
- mdi
- mtu (Ethernet interface view)
- negotiation auto
- port-down holdoff-timer
- port-group
- port-group group-member
- port-isolate enable
- port-isolate mode
- portswitch
- set flow-statistics include-interframe
- snmp-agent trap enable feature-name error-down
- speed
- trap-threshold
- trap-threshold error-statistics
- virtual-cable-test