No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

AR500, AR510, and AR530 V200R007

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Ethernet Interface Configuration Commands

Ethernet Interface Configuration Commands

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>

Parameters

Parameter

Description

Value

interface-type interface-number

Specifies the type and number of the interface from which the current interface is isolated unidirectionally.

  • interface-type specifies the type of the interface.
  • interface-number specifies the number of the interface.
-

Views

Ethernet interface view, GE 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.

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:

An interface on the device can be isolated from a maximum of 32 interfaces unidirectionally.

Example

# Isolate Eth0/0/1 from Eth1/0/0 unidirectionally.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] am isolate ethernet 1/0/0

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.

Format

auto duplex { half | full }*

undo auto duplex

Parameters

Parameter

Description

Value

half Sets the duplex mode on an Ethernet electrical interface in auto-negotiation mode to half-duplex. -
full Sets the duplex mode on an Ethernet electrical interface in auto-negotiation mode to full-duplex. -

Views

Ethernet interface view, GE interface view, port group view

Default Level

2: Configuration level

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

  • 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.

NOTE:

The interfaces on both ends of a link must have the same duplex mode.

Example

# Configure Ethernet electrical interface Eth0/0/1 in auto-negotiation mode to work in half-duplex mode.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] auto duplex half
Related Topics

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

NOTE:

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.

-

Views

Ethernet interface view, GE interface view, port group view

Default Level

2: Configuration level

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.

Prerequisites

The Ethernet interface works in auto-negotiation mode. For details, see negotiation auto.

Example

# Configure Ethernet electrical interface Eth0/0/1 to work at a rate of 100 Mbit/s in auto-negotiation mode.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] auto speed 100
Related Topics

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 electrical mode.

Format

combo-port { auto | copper | fiber }

undo combo-port

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:
  • If the electrical interface becomes Up first, the combo interface works in electrical mode.
  • If the optical interface becomes Up first, the combo interface works in optical mode.
-
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. -

Views

Ethernet interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Combo interfaces are logic interfaces. One combo interface can work as a FE electrical interface or a FE 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.

Prerequisites

This command takes effect only on combo interfaces.

Precautions

If a combo interface is configured to work in a different mode from the remote interface, the two interfaces cannot communicate.

After the working mode of a combo interface is switched, the configuration takes effect after the device restarts.

If you have specified the interface attributes (such as auto-negotiation mode, rate, and duplex mode) on a combo interface, the system may automatically generate the port media type fiber and port media type copper configurations to determine whether an interface configuration item belongs to the optical interface or electrical interface. If the combo interface works in one mode (such as the electrical mode), the configuration for the other mode (such as the optical mode) will not be lost.

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.

Example

# Configure Ethernet0/0/7 to work in electrical mode.
<Huawei> system-view
[Huawei] interface ethernet 0/0/7
[Huawei-Ethernet0/0/7] combo-port copper

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.

NOTE:

An interface enters the error-down state after being shut down due to an error. Currently, errors include BPDU protection.

Format

display error-down recovery [ interface interface-type interface-number ]

Parameters

Parameter

Description

Value

interface-type interface-number

Displays the specified port in error-down state.

  • interface-type specifies the interface type.

  • interface-number specifies the interface number.

-

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)
----------------------------------------------------------------------------
Ethernet0/0/1                bpdu-protection            30         10
Table 4-12  Description of the display error-down recovery command output

Item

Description

interface

Interface name.

error-down cause

Cause of the error-down event, including:
  • efm-threshold-event
  • bpdu-protection

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.

Format

display interface ethernet brief [ main ]

Parameters

Parameter

Description

Value

main

Displays brief information about all Ethernet main interfaces.

-

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, 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                                                                  
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%    --
Table 4-13  Description of the display interface ethernet brief command output

Item

Description

Interface

Type and number of an interface. All interfaces are displayed in alphabetical order. Information about the following interfaces can be displayed:
  • Ethernet interface

  • GE interface

PHY

Physical status of an interface:
  • up: indicates that the interface works properly.

  • down: indicates that the physical layer of the interface fails.

  • *down: refers to Administratively Down, indicating that the administrator has run the shutdown (interface view) command on the interface.

  • ^down: refers to standby, indicating that this interface is a backup interface.

  • (l): refers to loopback, indicating that the loopback function is enabled on the interface.

  • (b): indicates that the physical layer of the interface is in BFD Down state.

Auto-Neg

Whether auto-negotiation is enabled on an interface:
  • enable: indicates that auto-negotiation is enabled on the interface.

  • disable: indicates that auto-negotiation is disabled on the interface.

To configure the auto-negotiation mode for an interface, run the negotiation auto command.

Duplex

Duplex mode of an interface:
  • full: indicates the full-duplex mode.

  • half: indicates the half-duplex mode.

  • In auto-negotiation mode, use the auto duplex command to configure the duplex mode of an interface.
  • In non-auto negotiation mode, use the duplex command to configure the duplex mode of an interface.

Bandwidth

Bandwidth on the interface.

The bandwidth value accuracy is 1 Mbit/s. The value is rounded down to the nearest integer when it is less than 1 Mbit/s. For example, if the bandwidth of an interface is 5.9 Mbit/s, this field displays 5 Mbit/s. If the bandwidth is less than 1 Mbit/s, this field displays 0 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.

NOTE:

The AR502G-L-D-H, AR502GR-L-D-H do not support port groups.

Format

display port-group [ all | port-group-name ]

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.

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: port1  
ethernet2/0/0
ethernet2/0/1
Table 4-14  Description of the display port-group command output

Item

Description

Portgroup

Name of a permanent port group.

display port-isolate group

Function

The display port-isolate group command displays the configuration of a port isolation group.

Format

display port-isolate group { group-id | all }

Parameters

Parameter

Description

Value

group-id

Displays the configuration of a specified port isolation group.

The value is an integer that ranges from 1 to 64.

all

Displays the configurations of all port isolation groups.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The port isolation feature isolates interfaces in a VLAN. By adding 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.

<Huawei> display port-isolate group all
  The ports in isolate group 1:                                                 
Ethernet2/0/0                                                                   
  The ports in isolate group 2:                                                 
Ethernet2/0/1 
Related Topics

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.

Format

duplex { full | half }

undo duplex

Parameters

Parameter

Description

Value

full

Configures the Ethernet interface to work in full-duplex mode when auto-negotiation is disabled on the interface.

-

half

Configures the Ethernet interface to work in half-duplex mode when auto-negotiation is disabled on the interface.

-

Views

Ethernet interface view, GE interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The duplex mode of an interface needs to be set in the following scenarios:
  • 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.

NOTE:

The interfaces on both ends of a link must have the same duplex mode.

Example

# Configure Ethernet electrical interface Eth0/0/1 to work in half-duplex mode when non-auto negotiation is disabled on the interface.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] undo negotiation auto
[Huawei-Ethernet0/0/1] duplex half

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 protocol 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 protocol packets.

By default, the outbound interface does not add any VLAN tag to packets and retains the original 802.1p priority of protocol packets.

Format

encapsulation priority-tagged [ dot1p priority-value ]

undo encapsulation priority-tagged

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.

Views

Ethernet interface view, GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the encapsulation priority-tagged 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.

Prerequisites

Run the undo ip soft-forward enhance enable command in the syetem view to disable the enhanced forwarding function for control packets generated by the device.

Precautions

This command can be used only on Layer 3 Ethernet interfaces, GE interfaces.

When the dot1p parameter is not specified in the encapsulation priority-tagged command, the 802.1p priority of protocol packets is set to 0 by default.

Example

# Configure the outbound interface of the Eth0/0/1 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 0/0/1
[Huawei-Ethernet0/0/1] encapsulation priority-tagged dot1p 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.

NOTE:

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 }

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.
  • A smaller value indicates a higher frequency at which an interface alternates between Up and Down states.
  • A larger value indicates longer traffic interruption.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An interface enters the error-down state in the following scenarios.

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

# 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

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.

Format

flow-control

undo flow-control

Parameters

None

Views

Ethernet interface view, GE interface view

Default Level

2: Configuration level

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.

Example

# Enable flow control on Eth0/0/1.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] flow-control

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.

Format

flow-control negotiation

undo flow-control negotiation

Parameters

None

Views

GE interface 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

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.

Example

# Enable flow control auto-negotiation on GE1/0/0.
<Huawei> system-view
[Huawei] interface gigabitethernet 1/0/0
[Huawei-GigabitEthernet1/0/0] negotiation auto
[Huawei-GigabitEthernet1/0/0] flow-control negotiation

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.

NOTE:

The AR502G-L-D-H, AR502GR-L-D-H do not support port groups.

Format

group-member { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-5>

undo group-member { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-5>

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.

Views

Port group view

Default Level

2: Configuration level

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.

Example

# Add Eth0/0/1 and Eth2/0/1 to port group portgroup1.
<Huawei> system-view
[Huawei] port-group portgroup1
[Huawei-port-group-portgroup1] group-member ethernet 0/0/1 to ethernet 2/0/1

interface (Ethernet interface)

Function

Using the interface command, you can enter the specified interface view or sub-interface view.

Format

interface { ethernet | gigabitethernet } interface-number [.subinterface-number ]

Parameters

Parameter

Description

Value

ethernet

Enter the view of an FE interface.

-

gigabitethernet

Enter the view of a GE 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.

Views

System view

Default Level

2: Configuration level

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.

Example

# Enter the view of Eth0/0/1.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1]
Related Topics

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.

NOTE:

The AR502G-L-D-H, AR502GR-L-D-H do not support port groups.

Format

interface range { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-5>

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.

Views

System view

Default Level

2: Configuration level

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.

  • 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.

Example

# Add Eth2/0/0 and 2/0/1 to a temporary port group.
<Huawei> system-view
[Huawei] interface range ethernet 0/0/1 to ethernet 2/0/1
[Huawei-port-group]

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.

Views

Ethernet interface view, GE interface view

Default Level

2: Configuration level

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.

NOTE:

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 Eth0/0/1 to generate a log when the outbound interface rate exceeds 80% of the bandwidth.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] log-threshold output-rate 80

# Configure Eth0/0/1 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 0/0/1
[Huawei-Ethernet0/0/1] log-threshold output-rate 80 resume-rate 60
Related Topics

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

internal

Configures internal loopback detection on a specified interface.

-

Views

Ethernet interface view, GE interface view, port group view

Default Level

2: Configuration level

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.

Example

# Configure loopback detection on Eth0/0/1.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] loopback internal
Related Topics

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.

Format

mac-address mac-address

undo 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, Ethernet sub-interface view, GE sub-interface view

Default Level

2: Configuration level

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.

Only the device running V200R007C02 or a later version supports configuring this command on sub-interfaces.

Example

# Set the MAC address of GE1/0/0 to 0001-2345-abcd.

<Huawei> system-view
[Huawei] interface gigabitethernet 1/0/0
[Huawei-GigabitEthernet1/0/0] mac-address 0001-2345-abcd
Related Topics

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

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.

-

Views

Ethernet interface view, GE interface view, port group view

Default Level

2: Configuration level

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.

Example

# Set the MDI mode of Eth0/0/1 to across.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] mdi across

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.

Format

mtu mtu

undo mtu

Parameters

Parameter Description Value
mtu Specifies the MTU of an Ethernet interface.

The value is an integer that ranges from 46 to 1610, in bytes.

Views

Ethernet interface view, GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The size of data packets is limited at the network layer. Upon receiving an IP packet to be sent, the network layer checks to which local interface the packet needs to be sent and obtains the maximum transmission unit (MTU) configured on the interface. Then the network layer compares the MTU with the packet length. If the packet length is longer than the MTU, the network layer disassembles the packet to fragments, each no longer than the MTU.
  • 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.

Example

# Set the MTU of GE1/0/0 to 1200 bytes.

<Huawei> system-view
[Huawei] interface gigabitethernet 1/0/0
[Huawei-GigabitEthernet1/0/0] mtu 1200
[Huawei-GigabitEthernet1/0/0] restart
Related Topics

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.

Format

negotiation auto

undo negotiation auto

Parameters

None

Views

Ethernet interface view, GE interface view, port group 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.

You can configure an interface to work in auto-negotiation mode only when interfaces on both ends support the auto-negotiation mode.
  • 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, 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.

Example

# Configure Eth0/0/1 to work in non-auto-negotiation mode.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] undo negotiation auto
Related Topics

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.

Format

port-down holdoff-timer holdoff-timer

undo port-down holdoff-timer

Parameters

Parameter

Description

Value

holdoff-timer

Specifies the delay time for an interface to report the Down event.

The value is an integer that ranges from 50 to 3000, in milliseconds.

Views

Ethernet interface view, GE interface view

Default Level

2: Configuration level

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.

Example

# Set the delay time for an interface to report the Down event to 100 ms.

<Huawei> system-view
[Huawei] interface 
[Huawei-Ethernet2/0/0] port-down holdoff-timer 100

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.

NOTE:

The AR502G-L-D-H, AR502GR-L-D-H do not support port groups.

Format

port-group port-group-name

undo port-group { all | port-group-name }

Parameters

Parameter

Description

Value

port-group-name

Specifies the name of a permanent port group.

The value is a string of 1 to 32 case-insensitive characters without spaces.

NOTE:

A permanent port group cannot be named group.

all

Deletes all port groups.

-

Views

System view

Default Level

2: Configuration level

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.

Example

# Create port group portgroup1 and enter the port group view.

<Huawei> system-view
[Huawei] port-group portgroup1
[Huawei-port-group-portgroup1]

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.

NOTE:

The AR502G-L-D-H, AR502GR-L-D-H do not support port groups.

Format

port-group group-member { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-5>

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.

Views

System view

Default Level

2: Configuration level

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.

  • 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.

Example

# Add Eth2/0/0 and Eth2/0/1 to a temporary port group.
<Huawei> system-view
[Huawei] port-group group-member ethernet 0/0/1 to ethernet 2/0/1
[Huawei-port-group]

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.

Format

port-isolate enable [ group group-id ]

undo port-isolate enable [ group group-id ]

Parameters

Parameter

Description

Value

group group-id

Specifies the ID of a port isolation group.

The value is an integer that ranges from 1 to 8.

Views

Ethernet interface view, GE interface view, Eth-Trunk interface view, port group 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

  • Interfaces in a port isolation group are isolated from each other, but interfaces in different port isolation groups can communicate.

  • The device supports only Layer 2 isolation and Layer 3 communication.

Example

# Enable port isolation on Eth0/0/1.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] port-isolate enable group 1

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.

NOTE:

Format

port-isolate mode { l2 | all }

Parameters

Parameter

Description

Value

l2

Indicates that ports are isolated at Layer 2 but can communicate at Layer 3.

-

all

Indicates that ports are isolated at both Layer 2 and Layer 3.

-

Views

System view

Default Level

2: Configuration level

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.

Example

# Configure Layer 2 isolation and Layer 3 communication.

<Huawei> system-view
[Huawei] port-isolate mode l2

port-monitor enable

Function

The port-monitor enable command enables the interface monitoring function on an interface.

The undo port-monitor enable command disables the interface monitoring function on an interface.

By default, the interface monitoring function is disabled on an interface.

Format

port-monitor enable

undo port-monitor enable

Parameters

None

Views

Ethernet interface view, GE interface view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To protect a device against malicious access, you can run the port-monitor enable command to enable the interface monitoring function on interfaces to be protected.

After the interface monitoring function is enabled on an interface, the device detects that the physical link status of the interface changes from Up to Down and automatically configures the shutdown command to shut down the interface.

Precautions

After the interface monitoring function is enabled on an interface, the interface is shut down and stops transmitting data. To make the interface work properly, run the undo shutdown command to manually re-enable the interface.

Example

# Enable the interface monitoring function on GE1/0/0.

<Huawei> system-view
[Huawei] interface gigabitethernet 1/0/0
[Huawei-GigabitEthernet1/0/0] port-monitor enable

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.

NOTE:

On the AR531-2C-H or AR531-F2C-H, the Layer 2/Layer 3 mode switching function of interfaces can not be used on the router by default. To use this function, apply for and purchase the AR530 Value-added Router Package from the Huawei local office.

GE0/0/0 to GE0/0/3 on the AR509GW-L-D-H and AR509G-L-D-H can be changed from Layer 2 mode to Layer 3 mode.

Eth0/0/0, GE0/0/0, and GE0/0/1 on the enAR531G-U-D-H can be changed from Layer 2 mode to Layer 3 mode.

Format

portswitch

undo portswitch

Parameters

None

Views

Ethernet interface view, GE interface view, Eth-Trunk interface view

Default Level

2: Configuration level

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.

Example

# Change the working mode of GE0/0/0 from Layer 2 mode to Layer 3 mode.
<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/0
[Huawei-GigabitEthernet0/0/0] undo portswitch

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.

The undo set flow-statistics include-interframe command configures traffic statistics on an interface not to contain the inter-frame gap.

By default, traffic statistics on an interface do not contain the inter-frame gap.

Format

set flow-statistics include-interframe

undo set flow-statistics include-interframe

Parameters

None

Views

Ethernet interface view, GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

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 when collecting traffic statistics on the main interface.

Example

# Configure traffic statistics on Eth0/0/1 to contain the inter-frame gap.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] set flow-statistics include-interframe
Related Topics

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.

Format

speed { 10 | 100 | 1000 | 10000 }

Parameters

Parameter

Description

Value

10

Indicates that the interface works at 10 Mbit/s.

NOTE:

GE optical interfaces do not support this parameter.

-

100

Indicates that the interface works at 100 Mbit/s.

NOTE:

SRG2340E do not support this parameter.

-

1000

Indicates that the interface works at 1000 Mbit/s.

NOTE:

FE interfaces do not support this parameter.

-

10000

Indicates that the interface works at 10000 Mbit/s.

NOTE:

Only the port groups support this parameter.

-

Views

Ethernet interface view, GE 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.

Example

# Configure GE2/0/0 to work at 100 Mbit/s in non-auto negotiation mode.
<Huawei> system-view
[Huawei] interface gigabitethernet 2/0/0
[Huawei-GigabitEthernet2/0/0] undo negotiation auto
[Huawei-GigabitEthernet2/0/0] speed 100

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.

Views

Ethernet interface view, GE interface view

Default Level

2: Configuration level

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.

NOTE:

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.

To set a lower threshold, run the log-threshold command.

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.

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

# Configure Eth0/0/1 to generate a trap when the outbound bandwidth usage exceeds 60%.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] trap-threshold output-rate 60

# Configure Eth0/0/1 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 0/0/1
[Huawei-Ethernet0/0/1] trap-threshold output-rate 80 resume-rate 60
Related Topics

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.

Views

Ethernet interface view, GE interface 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 Eth0/0/1 to 10 and the alarm interval to 30 seconds.

<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] trap-threshold error-statistics 10 interval 30

virtual-cable-test

Function

The virtual-cable-test command tests the cable connected to an Ethernet electrical interface and displays the test result.

Format

virtual-cable-test

Parameters

None

Views

Ethernet interface view, GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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 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

# Test the cable connected to Eth0/0/1.
<Huawei> system-view
[Huawei] interface ethernet 0/0/1
[Huawei-Ethernet0/0/1] 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  
Table 4-15  Description of the virtual-cable-test command output

Item

Description

Pair A/B/C/D

Four pairs of circuits in a network cable.

Pair A length

Length of a network cable:
  • The length is the distance between the interface and the fault point if a fault occurs.
  • The length is the actual length of the cable when the cable works properly.
  • The default length is 0 m if the interface is not connected to any network cable.

Pair A state

Network cable status:
  • Ok: indicates that the circuit pair is terminated normally.
  • Open: indicates that the circuit pair is not terminated.
  • Short: indicates that the circuit pair is short-circuited.
  • Crosstalk: indicates that the circuit pairs interfere with each other.
  • Unknown: indicates that the circuit pair has an unknown fault.
Translation
Download
Updated: 2019-02-18

Document ID: EDOC1000097293

Views: 36120

Downloads: 101

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next