01-Access Volume

01-Ethernet Interface Commands

Chapters Download  (180.04 KB)

01-Ethernet Interface Commands


General Ethernet Interface Configuration Commands

broadcast-suppression

Syntax

broadcast-suppression { ratio | pps max-pps | kbps max-bps }

undo broadcast-suppression

View

Ethernet interface view, port group view

Default Level

2: System level

Parameters

ratio: Maximum percentage of broadcast traffic to the total transmission capability of an Ethernet interface, in the range 1 to 100. The smaller the ratio, the less broadcast traffic is allowed

pps max-pps: Specifies the maximum number of broadcast packets that can be forwarded on an Ethernet port per second (in pps, representing packets per second).

l          For a Gigabit port, the value range is 1 to 1488100.

l          For a 10-Gigabit port, the value range is 1 to 1488100.

kbps max-bps: Specifies the maximum number of broadcast bits that can be forwarded on an Ethernet port per second (in kbps, representing kilobits per second).

l          For a Gigabit port, the value range is 1 to 1024000.

l          For a 10-Gigabit port, the value range is 1 to 10240000..

Note that:

l          When a suppression granularity larger than 1 is specified on the device, the value of the pps or kbps keyword should be no smaller than and an integral multiple of the granularity. The broadcast suppression threshold value configured through this keyword on an Ethernet interface may not be the one that actually takes effect. To display the actual broadcast suppression threshold value on an Ethernet interface, you can use the display interface command.

l          When no suppression granularity is specified or the suppression granularity is set to 1, the value of the pps or kbps keyword should be no smaller than 1, and the broadcast suppression threshold value is the one that actually takes effect on the Ethernet interface.

Description

Use the broadcast-suppression command to set a broadcast traffic threshold on one or multiple Ethernet ports.

Use the undo broadcast-suppression command to restore the default.

By default, broadcast traffic is not suppressed.

If you execute this command in Ethernet interface view, the configuration takes effect only on the current interface. If you execute this command in port-group view, the configuration takes effect on all the ports in the port group.

When broadcast traffic exceeds the broadcast traffic threshold, the system begins to discard broadcast packets until the broadcast traffic drops below the threshold to ensure operation of network services.

l          If you set different suppression ratios in Ethernet interface view or port-group view for multiple times, the latest configuration takes effect.

l          Do not use the broadcast-suppression command along with the storm-constrain command. Otherwise, the broadcast storm suppression ratio configured may get invalid.

 

Examples

# For Ethernet interface GigabitEthernet1/0/1, allow broadcast traffic equivalent to 20% of the total transmission capability of GigabitEthernet1/0/1 to pass.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] broadcast-suppression 20

# Configure manual port group named group1 so that each port in the port group allows broadcast traffic equivalent to up to 20% of its total transmission capability to pass and suppresses excessive broadcast packets.

<Sysname> system-view

[Sysname] port-group manual group1

[Sysname-port-group manual group1] group-member gigabitethernet 1/0/2

[Sysname-port-group manual group1] group-member gigabitethernet 1/0/3

[Sysname-port-group manual group1] broadcast-suppression 20

description

Syntax

description text

undo description

View

Ethernet interface view

Default Level

2: System level

Parameters

text: Description of an Ethernet interface, a string of 1 to 80 characters. Currently, the device supports the following types of characters or symbols: standard English characters (numbers and case-sensitive letters), special English characters, spaces, and other characters or symbols that conform to the Unicode standard.

 

l          A port description can be the mixture of English characters and other Unicode characters. The mixed description cannot exceed the specified length.

l          To use a type of Unicode characters or symbols in a port description, you need to install the corresponding Input Method Editor (IME) and log in to the device through remote login software that supports this character type.

l          Each Unicode character or symbol (non-English characters) takes the space of two regular characters. When the length of a description string reaches or exceeds the maximum line width on the terminal software, the software starts a new line, possibly breaking a Unicode character into two. As a result, garbled characters may be displayed at the end of a line.

 

Description

Use the description command to set the description string of the current interface.

Use the undo description command to restore the default.

By default, the description of an interface is the interface name followed by the “interface” string, GigabitEthernet1/0/1 Interface for example.

Related commands: display interface.

Examples

# Configure the description string of interface GigabitEthernet1/0/1 as lanswitch-interface.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] description lanswitch-interface

display brief interface

Syntax

display brief interface [ interface-type [ interface-number ] ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default Level

1: Monitor level

Parameters

interface-type: Type of a specified interface.

interface-number: Number of a specified interface.

|: Uses a regular expression to filter output information. For detailed description on regular expression, refer to Basic System Configuration in the System Volume.

begin: Displays the line that matches the regular expression and all the subsequent lines.

exclude: Displays the lines that do not match the regular expression.

include: Displays the lines that match the regular expression.

regular-expression: Regular expression, a string of 1 to 256 characters. Note that this argument is case-sensitive.

Description

Use the display brief interface command to display brief interface information.

l          If neither interface type nor interface number is specified, all interface information will be displayed.

l          If only interface type is specified, then only information of this particular type of interface will be displayed.

l          If both interface type and interface number are specified, then only information of the specified interface will be displayed.

Related commands: interface.

Examples

# Display the brief information of interfaces.

<Sysname> display brief interface

The brief information of interface(s) under route mode:

Interface          Link      Protocol-link  Protocol type   Main IP

Interface            Link      Protocol-link  Protocol type    Main IP

Loop1                UP        UP(spoofing)   LOOP             2.2.2.1

NULL0                UP        UP(spoofing)   NULL             --

Vlan1                UP        UP             ETHERNET         192.168.0.153

Vlan10               DOWN      DOWN           ETHERNET         1.1.1.1

Vlan100              ADM DOWN  DOWN           ETHERNET         --

 

The brief information of interface(s) under bridge mode:

 

BAGG1                DOWN      auto         auto     access     1

GE1/0/1              DOWN      auto         auto     access     1

GE1/0/2              DOWN      auto         auto     access     1

GE1/0/3              DOWN      auto         auto     access     1

GE1/0/4              UP        1G(a)        full(a)  access     1

GE1/0/5              DOWN      auto         auto     access     1

GE1/0/6              DOWN      auto         auto     access     1

GE1/0/7              DOWN      auto         auto     access     1

GE1/0/8              DOWN      auto         auto     access     1

GE1/0/9              DOWN      auto         auto     access     1

GE1/0/10             DOWN      auto         auto     access     1

GE1/0/11             DOWN      auto         auto     trunk      1

GE1/0/12             DOWN      auto         auto     trunk      1

# Display the information of interfaces beginning with the string “spoof”.

<Sysname> display brief interface | begin spoof

The brief information of interface(s) under route mode:

Interface            Link      Protocol-link  Protocol type    Main IP

Loop0                UP        UP(spoofing)   LOOP             5.5.5.5

NULL0                UP        UP(spoofing)   NULL             --

Vlan999              UP        UP             ETHERNET         10.1.1.1

# Display the brief information of all UP interfaces.

<Sysname> display brief interface | include UP

The brief information of interface(s) under route mode:

Interface            Link     Protocol-link  Protocol type    Main IP

Loop0                UP       UP(spoofing)   LOOP             5.5.5.5

NULL0                UP       UP(spoofing)   NULL             --

Vlan999              UP       UP             ETHERNET         10.1.1.1

 

The brief information of interface(s) under bridge mode:

Interface            Link     Speed      Duplex   Link-type  PVID

GE1/0/7               UP       100M(a)    full(a)  trunk      303

GE1/0/9               UP       100M(a)    full(a)  access     999

# Display the brief information of all interfaces excluding Ethernet interfaces.

<Sysname> display brief interface | exclude Eth

The brief information of interface(s) under route mode:

Loop1                UP        UP(spoofing)   LOOP             2.2.2.1

NULL0                UP        UP(spoofing)   NULL             --

Vlan1                UP        UP             ETHERNET         192.168.0.153

Vlan10               DOWN      DOWN           ETHERNET         1.1.1.1

Vlan100              ADM DOWN  DOWN           ETHERNET         --

Table 1-1 display brief interface command output description

Field

Description

Interface

Abbreviated interface name

Link

Interface physical link state, which can be up or down

Protocol-link

Interface protocol link state, which can be up or down

Protocol type

Interface protocol type

Speed

Interface rate, in bps

Duplex

Duplex mode, which can be half (half duplex), full (full duplex), or auto (auto-negotiation).

PVID

Default VLAN ID

 

display interface

Syntax

display interface [ interface-type [ interface-number ] ]

View

Any view

Default Level

1: Monitor level

Parameters

interface-type: Type of a specified interface.

interface-number: Number of a specified interface.

Description

Use the display interface command to display the current state of a specified interface and related information.

l          If neither interface type nor interface number is specified, all interface information will be displayed.

l          If only interface type is specified, then only information of this particular type of interface will be displayed.

l          If both interface type and interface number are specified, then only information of the specified interface will be displayed.

Related commands: interface.

Examples

# Display the current state of Layer 2 interface GigabitEthernet1/0/1 and related information.

<Sysname> display interface gigabitethernet 1/0/1

 GigabitEthernet1/0/1 current state: DOWN

 IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 00e0-fc00-5832

 Description: GigabitEthernet1/0/1 Interface

 Loopback is not set

 Media type is twisted pair, Port hardware type is 1000_BASE_T

 Unknown-speed mode, unknown-duplex mode

 Link speed type is autonegotiation, link duplex type is autonegotiation

 Flow-control is not enabled

 The Maximum Frame Length is 10240

 Broadcast MAX-ratio: 100%

 Unicast MAX-ratio: 100%

 Multicast MAX-ratio: 100%

 PVID: 1

 Mdi type: auto

 Port link-type: access

  Tagged   VLAN ID : none

  Untagged VLAN ID : 1

 Port priority: 0

 Peak value of input: 0 bytes/sec, at 00-00-00 00:00:00

 Peak value of output: 0 bytes/sec, at 00-00-00 00:00:00

 Last 300 seconds input:  0 packets/sec 0 bytes/sec      -%

 Last 300 seconds output:  0 packets/sec 0 bytes/sec     -%

 Input (total):  0 packets, 0 bytes

          0 unicasts, 0 broadcasts, 0 multicasts

 Input (normal):  0 packets, 0 bytes

          0 unicasts, 0 broadcasts, 0 multicasts

 Input:  0 input errors, 0 runts, 0 giants, 0 throttles

          0 CRC, 0 frame, 0 overruns, 0 aborts

          0 ignored, 0 parity errors

 Output (total): 0 packets, 0 bytes

          0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses

 Output (normal): 0 packets, 0 bytes

          0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses

 Output: 0 output errors, 0 underruns, 0 buffer failures

          0 aborts, 0 deferred, 0 collisions, 0 late collisions

          0 lost carrier, 0 no carrier

Table 1-2 display interface command output description

Field

Description

GigabitEthernet1/0/1 current state

Current physical link state of the Ethernet interface

IP Packet Frame Type

Frame type of the Ethernet interface

Description

Description of the interface

Unknown-speed mode

Unknown-speed mode, in which mode speed is negotiated between the current host and the peer.

unknown-duplex mode

Unknown-duplex mode, in which mode speed is negotiated between the current host and the peer.

The Maximum Frame Length

The maximum frame length allowed on an interface

Broadcast MAX-ratio

Broadcast storm suppression ratio (the maximum ratio of allowed number of broadcast packets to overall traffic through an interface)

Unicast MAX-ratio

Unicast storm suppression ratio (the maximum ratio of allowed number of unknown unicast packets to overall traffic over an interface)

Multicast MAX-ratio

Multicast storm suppression ratio (the maximum ratio of allowed number of multicast packets to overall traffic through an interface)

PVID

Default VLAN ID

Mdi type

Cable type

Port link-type

Interface link type, which could be access, trunk, and hybrid.

Tagged   VLAN ID

VLANs whose packets are sent through the port with VLAN tag kept

Untagged VLAN ID

VLANs whose packets are sent through the port with VLAN tag stripped off

Peak value of input

Peak value of inbound traffic, in bytes/sec.

Peak value of output

Peak value of outbound traffic, in bytes/sec.

Last 300 seconds input:  0 packets/sec 0 bytes/sec

 Last 300 seconds output:  0 packets/sec 0 bytes/sec

Average rate of input and output traffic in the last 300 seconds, in pps and Bps

Input (total):  0 packets, 0 bytes

          0 unicasts, 0 broadcasts, 0 multicasts

Packet statistics on the inbound direction of the interface, including the statistics of normal packets, and abnormal packets, in packets and bytes

Number of unicast packets, broadcast packets, and multicast packets on the inbound direction of the interface

Input (normal):  0 packets, 0 bytes

          0 unicasts, 0 broadcasts, 0 multicasts

Normal packet statistics on the inbound direction of the interface, including the statistics of normal packets, in packets and bytes

Number of unicast packets, broadcast packets, and multicast packets on the inbound direction of the interface,

input errors

Input packets with errors

runts

Frames received that were shorter than 64 bytes, yet in correct formats, and contained valid CRCs

giants

Frames received that were longer than 1536 bytes (without VLAN tags) or 151540 bytes (with VLAN tags)

throttles

The number of times the receiver on the interface was disabled, possibly because of buffer or CPU overload

CRC

Total number of packets received that had a normal length, but contained checksum errors

frame

Total number of frames that contained checksum errors and a non-integer number of bytes

overruns

Number of times the receive rate of the interface exceeded the capacity of the input queue, causing packets to be discarded

aborts

Total number of illegal packets received, including:

l      Fragment frames: Frames that were shorter than 64 bytes (with an integral or non-integral length) and contained checksum errors

l      Jabber frames: Frames that were longer than 1536 or 1540 bytes and contained checksum errors (the frame lengths in bytes may or may not be integers)

l      Symbol error frames: Frames that contained at least one undefined symbol

l      Unknown operation code frames: Frames that were MAC control frames but not pause frames

l      Length error frames: Frames whose 802.3 length fields did not match the actual frame lengths (46 bytes to 1500 bytes)

ignored

Number of received packets ignored by the interface because the interface hardware ran low on internal buffers

parity errors

Total number of frames with parity errors

Output (total): 0 packets, 0 bytes

          0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses

Packet statistics on the outbound direction of the interface, including the statistics of normal packets, abnormal packets, and normal pause frames, in packets and bytes

Number of unicast packets, broadcast packets, multicast packets, and pause frames on the outbound direction of the interface

Output (normal): 0 packets,0 bytes

          0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses

Normal packet statistics on the outbound direction of the interface, including the statistics of normal packets and pause frames, in packets and bytes

Number of unicast packets, broadcast packets, multicast packets, and pause frames on the outbound direction of the interface

output errors

Output packets with errors

underruns

Number of times the transmit rate of the interface exceeded the capacity of the output queue, causing packets to be discarded. This is a very rare hardware-related problem.

buffer failures

Number of packets dropped because the interface ran low on output buffers

aborts

Number of packets that failed to be transmitted due to causes such as Ethernet collisions

deferred

Number of frames whose first transmission attempt was delayed, due to traffic on the network media, and that were successfully transmitted later

collisions

Number of times frames were delayed due to Ethernet collisions detected during the transmission

late collisions

Number of times frames were delayed due to the detection of collisions after the first 512 bits of the frames were already on the network

lost carrier

Number of times the carrier was lost during transmission. This counter applies to serial WAN interfaces.

no carrier

Number of times the carrier was not present in the transmission. This counter applies to serial WAN interfaces.

 

display loopback-detection

Syntax

display loopback-detection

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

Use the display loopback-detection command to display loopback detection information on a port.

If loopback detection is already enabled, this command will also display the detection interval and information on the ports currently detected with a loopback.

Examples

# Display loopback detection information on a port.

<Sysname> display loopback-detection

Loopback-detection is running

Detection interval time is 30 seconds

No port is detected with loopback

display port combo

Syntax

display port combo

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

Use the display port combo command to display the Combo ports of a device and the corresponding optical ports and electrical ports.

Examples

# Display the Combo ports of the device and the corresponding optical ports and electrical ports.

<Sysname> display port combo

  Combo-group         Active                      Inactive

          1         GigabitEthernet1/0/47       GigabitEthernet1/0/49

          2         GigabitEthernet1/0/48       GigabitEthernet1/0/50

Table 1-3 display port combo command output description

Field

Description

Combo-group

Combo ports of the device, represented by Combo port number, which is generated by the system.

Active

Ports of the Combo ports that are active

Inactive

Ports of the Combo ports that are inactive

 

As for the optical port and the electrical port of a Combo port, the one with the smaller port number is active by default. You can determine whether a port is an optical port or an electrical port by checking the “Media type is” field of the display interface command.

display port-group manual

Syntax

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

View

Any view

Default Level

2: System level

Parameters

all: Specifies all the manual port groups.

name port-group-name: Specifies the name of a manual port group, a string of 1 to 32 characters.

Description

Use the display port-group manual command to display the information about a manual port group or all the manual port groups.

l          If you provide the port-group-name argument, this command displays the details for a specified manual port group, including its name and the Ethernet interface ports included.

l          If you provide the all keyword, this command displays the details for all manual port groups, including their names and the Ethernet interface ports included.

l          Absence of parameters indicates that the names of all the port groups will be displayed.

Examples

# Display the names of all the port groups.

<Sysname> display port-group manual

The following manual port group exist(s):

group1                                    group2

# Display details of all the manual port groups.

<Sysname> display port-group manual all

Member of group1:

 GigabitEthernet1/0/3            GigabitEthernet1/0/4            GigabitEthernet1/0/5

 GigabitEthernet1/0/6            GigabitEthernet1/0/7            GigabitEthernet1/0/8

 

Member of group2:

None

# Display details of the port group named group1.

<Sysname> display port-group manual name group1

Member of group1:

 GigabitEthernet1/0/3            GigabitEthernet1/0/4            GigabitEthernet1/0/5

 GigabitEthernet1/0/6            GigabitEthernet1/0/7            GigabitEthernet1/0/8

Table 1-4 display port-group manual command output description

Field

Description

Member of group

Member of the manual port group

 

display storm-constrain

Syntax

display storm-constrain [ broadcast | multicast | unicast ] [ interface interface-type interface-number ]

View

Any view

Default Level

1: Monitor level

Parameters

broadcast: Displays the information about storm constrain for broadcast packets.

multicast: Displays the information about storm constrain for multicast packets.

unicast: Displays the information about storm constrain for unicast packets.

interface interface-type interface-number: Specifies an interface by its type and number.

Description

Use the display storm-constrain command to display the information about storm constrain.

If you provide no argument or keyword, this command displays the information about storm constrain for all types of packets on all the interfaces.

Examples

# Display the information about storm constrain for all types of packets on all the interfaces.

<Sysname> display storm-constrain

Abbreviation: BC - broadcast; MC - multicast; UC - unicast

Flow Statistic Interval: 5(second)

PortName      Type LowerLimit UpperLimit CtrMode Status  Trap Log SwiNum Unit

--------------------------------------------------------------------------

GE1/0/2       BC   1          2          N/A      normal  on   on  0      pps

GE1/0/2       MC   1          5          N/A      normal  on   on  0      pps

Table 1-5 display storm-constrain command output description

Field

Description

Flow Statistic Interval

Interval for generating storm constrain statistics

PortName

Abbreviated port name

StormType

Type of the packets for which storm constrain function is enabled, which can be broadcast (for broadcast packets), multicast (for multicast packets), and unicast (for unicast packets).

LowerLimit

Lower threshold (in pps)

UpperLimit

Upper threshold (in pps)

Ctr-mode

Action to be taken when the upper threshold is reached, which can be block, shutdown, and N/A.

Status

Interface state, which can be normal (indicating the interface operates properly), control (indicating the interface is blocked or shut down).

Trap

State of trap messages sending. “on” indicates trap message sending is enabled; “off” indicates trap message sending is disabled.

Log

State of log sending. “on” indicates log sending is enabled; “off” indicates log sending is disabled.

Swi-num

Number of the forwarding state switching.

This field is numbered modulo 65,535.

Unit

Threshold unit

 

duplex

Syntax

duplex { auto | full | half }

undo duplex

View

Ethernet interface view

Default Level

2: System level

Parameters

auto: Indicates that the interface is in auto-negotiation state.

full: Indicates that the interface is in full-duplex state.

half: Indicates that the interface is in half-duplex state. The optical interface of a Combo port and the electrical interfaces of Ethernet ports whose port rate is configured as 1000 Mbps do not support the half keyword.

Description

Use the duplex command to configure the duplex mode for an Ethernet interface.

Use the undo duplex command to restore the duplex mode for an Ethernet interface to the default.

By default, the duplex mode for an Ethernet interface is auto.

Related commands: speed.

Examples

# Configure the interface GigabitEthernet1/0/1 to work in full-duplex mode.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] duplex full

10-Gigabit Ethernet ports do not support the duplex command.

 

flow-control

Syntax

flow-control

undo flow-control

View

Ethernet interface view

Default Level

2: System level

Parameters

None

Description

Use the flow-control command to enable flow control on an Ethernet interface.

Use the undo flow-control command to disable flow control on an Ethernet interface.

By default, flow control on an Ethernet interface is disabled.

 

The flow control function takes effect on the local Ethernet interface only when it is enabled on both the local and peer devices.

 

Examples

# Enable flow control on interface GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] flow-control

flow-interval

Syntax

flow-interval interval

undo flow-interval

View

Ethernet interface view

Default Level

2: System level

Parameters

interval: Interval at which the interface collects statistics. It ranges from 5 to 300 seconds and must be a multiple of 5. The default value is 300 seconds.

Description

Use the flow-interval command to configure the time interval for collecting interface statistics.

Use the undo flow-interval command to restore the default interval.

 

Examples

# Set the time interval for collecting interface statistics to 100 seconds.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] flow-interval 100

group-member

Syntax

group-member interface-list

undo group-member interface-list

View

Port group view

Default Level

2: System level

Parameters

interface-list: Ethernet interface list, in the form of interface-type interface-number [ to interface-type interface-number ] &<1-10>, where &<1-10> indicates that you can specify up to 10 port or port ranges.

Description

Use the group-member command to assign an Ethernet interface or a list of Ethernet interfaces to the manual port group.

Use the undo group-member command to remove an Ethernet interface or a list of Ethernet interfaces from the manual port group.

By default, there is no Ethernet interface in a manual port group.

Examples

# Add interface GigabitEthernet1/0/1 to the manual port group named group1.

<Sysname> system-view

[Sysname] port-group manual group1

[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1

interface

Syntax

interface interface-type interface-number

View

System view

Default Level

2: System level

Parameters

None

Description

Use the interface command to enter interface view.

Examples

# Enter GigabitEthernet1/0/1 interface view (assuming that the interface is a Ethernet interface).

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname- GigabitEthernet1/0/1]

jumboframe enable

Syntax

jumboframe enable

undo jumboframe enable

View

System view

Default Level

2: System level

Parameters

None

Description

Use the jumboframe enable command to allow frames no longer than 9216 bytes to pass through an Ethernet interface.

Use the undo jumboframe enable command to prevent frames longer than 1536 bytes from passing through an Ethernet interface.

By default, the device allows jumbo frames with the length of 9216 bytes to pass through all Ethernet interfaces.

Examples

# Enable jumbo frames to pass through all the Ethernet interfaces.

<Sysname> system-view

[Sysname] jumboframe enable

loopback

Syntax

loopback { external | internal }

View

Ethernet interface view

Default Level

2: System level

Parameters

external: Enables external loopback testing on an Ethernet interface.

internal: Enables internal loopback testing on an Ethernet interface.

Description

Use the loopback command to enable Ethernet interface loopback testing.

By default, Ethernet interface loopback testing is disabled.

 

l          Ethernet interface loopback testing should be enabled while testing certain functionalities, such as during the initial identification of any network failure.

l          While enabled, Ethernet interface loopback testing will work in full-duplex mode. The interface will return to its original state upon completion of the loopback testing.

 

Examples

# Enable loopback testing on GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] loopback internal

loopback-detection control enable

Syntax

loopback-detection control enable

undo loopback-detection control enable

View

Ethernet interface view

Default Level

2: System level

Parameters

None

Description

Use the loopback-detection control enable command to enable loopback detection for a Trunk port or Hybrid port.

Use the undo loopback-detection control enable command to restore the default.

By default, loopback detection for a Trunk port or Hybrid port is disabled.

l          When the loopback detection is enabled, if a port has been detected with loopback, it will be shut down. A Trap message will be sent to the terminal and the corresponding MAC address forwarding entries will be deleted.

l          When the loopback detection is disabled, if a port has been detected with loopback, a Trap message will be sent to the terminal. The port is still working properly.

Note that this command is inapplicable to an Access port as its loopback detection is enabled by default.

Examples

# Enable loopback detection for the trunk port GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] loopback-detection enable

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] port link-type trunk

[Sysname-GigabitEthernet1/0/1] loopback-detection enable

[Sysname-GigabitEthernet1/0/1] loopback-detection control enable

loopback-detection enable

Syntax

loopback-detection enable

undo loopback-detection enable

View

System view, Ethernet interface view

Default Level

2: System level

Parameters

None

Description

Use the loopback-detection enable command to enable loopback detection globally or on a specified port.

Use the undo loopback-detection enable command to disable loopback detection globally or on a specified port.

By default, loopback detection is disabled for an Access, Trunk, or Hybrid port.

l          If an Access port has been detected with loopback, the device puts the port in control mode. In this mode, inbound packets on the port are all discarded, while outbound packets on the port are forwarded normally. Meanwhile, the device sends trap messages to the terminal, and deletes the corresponding MAC address forwarding entry.

l          If a Trunk port or Hybrid port has been detected with loopback, the device sends trap messages and log information to the terminal. If loopback detection control is also enabled on the port, the device operates on the port according to the pre-configured loopback detection actions, sends trap messages and log information to the terminals, and deletes the corresponding MAC address forwarding entry.

Related commands: loopback-detection control enable.

 

l          Loopback detection on a given port is enabled only after the loopback-detection enable command has been configured in both system view and interface view of the port.

l          Loopback detection on all ports will be disabled after the configuration of the undo loopback-detection enable command in system view.

 

Examples

# Enable loopback detection on the interface GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] loopback-detection enable

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] loopback-detection enable

loopback-detection interval-time

Syntax

loopback-detection interval-time time

undo loopback-detection interval-time

View

System view

Default Level

2: System level

Parameters

time: Time interval for performing port loopback detection, in the range 5 to 300 (in seconds).

Description

Use the loopback-detection interval-time command to configure time interval for performing port loopback detection.

Use the undo loopback-detection interval-time command to restore the default time interval for port loopback detection, which is 30 seconds.

Related commands: display loopback-detection.

Examples

# Set the time interval for performing port loopback detection to 10 seconds.

<Sysname> system-view

[Sysname] loopback-detection interval-time 10

loopback-detection per-vlan enable

Syntax

loopback-detection per-vlan enable

undo loopback-detection per-vlan enable

View

Ethernet interface view

Default Level

2: System level

Parameters

None

Description

Use the loopback-detection per-vlan enable command to enable loopback detection in all VLANs with Trunk ports or Hybrid ports.

Use the undo loopback-detection per-vlan enable command to enable loopback detection in the default VLAN with Trunk ports or Hybrid ports.

By default, loopback detection is only enabled in the default VLAN(s) with Trunk ports or Hybrid ports.

Note that the loopback-detection per-vlan enable command is not applicable to Access ports.

Examples

# Enable loopback detection in all the VLANs to which the Hybrid port GigabitEthernet1/0/1 belongs.

<Sysname> system-view

[Sysname] loopback-detection enable

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] loopback-detection enable

[Sysname-GigabitEthernet1/0/1] port link-type trunk

[Sysname-GigabitEthernet1/0/1] loopback-detection per-vlan enable

mdi

Syntax

mdi { across | auto | normal }

undo mdi

View

Ethernet interface view

Default Level

2: System level

Parameters

across: Specifies the MDI mode as across, that is,the Ethernet interface recognizes crossover cables..

auto: Specifies the MDI mode as auto, that is, the Ethernet interface determines the cable type through negotiation.

normal: Specifies the MDI mode as normal, the Ethernet interface recognizes straight-through cables.

Description

Use the mdi command to configure the MDI mode for an Ethernet interface.

Use the undo mdi command to restore the system default.

By default, the MDI mode of an Ethernet interface is auto, that is, the Ethernet interface determines the physical pin roles (transmit or receive) through negotiation.

 

The command is not applicable to Combo ports operating as optical interfaces or 10-Gigabit Ethernet ports.

 

Examples

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

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] mdi across

multicast-suppression

Syntax

multicast-suppression { ratio | pps max-pps | kbps max-bps }

undo multicast-suppression

View

Ethernet interface view, port group view

Default Level

2: System level

Parameters

ratio: Maximum percentage of multicast traffic to the total transmission capability of an Ethernet interface, in the range 1 to 100. The smaller the ratio is, the less multicast traffic is allowed to pass through the interface.

pps max-pps: Specifies the maximum number of multicast packets allowed on an Ethernet port per second ( in pps, representing packets per second).

l          For a Gigabit port, the value range is 1 to 1488100.

l          For a 10-Gigabit port, the value range is 1 to 1488100.

kbps max-bps: Specifies the maximum number of multicast bits that can be forwarded on an Ethernet port per second (in kbps, representing kilobits per second).

l          For a Gigabit port, the value range is 1 to 1024000.

l          For a 10-Gigabit port, the value range is 1 to 10240000.

Note that:

l          When a suppression granularity larger than 1 is specified on the device, the value of the pps or kbps keyword should be no smaller than and an integral multiple of the granularity. The multicast suppression threshold value configured through this keyword on an Ethernet interface may not be the one that actually takes effect. To display the actual multicast suppression threshold value on an Ethernet interface, you can use the display interface command.

l          When no suppression granularity is specified or the suppression granularity is set to 1, the value of the pps or kbps keyword should be no smaller than 1, and the multicast suppression threshold value is the one that actually takes effect on the Ethernet interface.

Description

Use the multicast-suppression command to configure multicast storm suppression ratio on an interface.

Use the undo multicast-suppression command to restore the default multicast suppression ratio.

By default, multicast traffic is not suppressed.

If you execute this command in Ethernet interface/subinterface view, the configurations take effect only on the current interface/subinterface. If you execute this command in port-group view, the configurations take effect on all ports in the port group.

Note that when multicast traffic exceeds the maximum value configured, the system will discard the extra packets so that the multicast traffic ratio can drop below the limit to ensure that the network functions properly.

l          If you set different suppression ratios in Ethernet interface view or port-group view for multiple times, the latest configuration takes effect.

l          Do not use the multicast-suppression command along with the storm-constrain command. Otherwise, the multicast storm suppression ratio configured may get invalid.

 

Examples

# For Ethernet interface GigabitEthernet1/0/1, allow multicast traffic equivalent to 20% of the total transmission capability of GigabitEthernet1/0/1 to pass.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] multicast-suppression 20

# Configure manual port group named group1 so that each port in the port group allows multicast  traffic equivalent to up to 20% of its total transmission capability to pass and suppresses excessive multicast packets.

<Sysname> system-view

[Sysname] port-group manual group1

[Sysname-port-group manual group1] group-member gigabitethernet 1/0/2

[Sysname-port-group manual group1] group-member gigabitethernet 1/0/3

[Sysname-port-group manual group1] multicast-suppression 20

port-group manual

Syntax

port-group manual port-group-name

undo port-group manual port-group-name

View

System view

Default Level

2: System level

Parameters

port-group-name: Specifies name of a manual port group, a string of 1 to 32 characters.

Description

Use the port-group manual command to create a manual port group and enter manual port group view.

Use the undo port-group manual command to remove a manual port group.

By default, no manual port group is created.

Examples

# Create a manual port group named group1.

<Sysname> system-view

[Sysname] port-group manual group1

[Sysname-port-group-manual-group1]

port auto-power-down

Syntax

port auto-power-down

undo port auto-power-down

View

Ethernet interface view, port group view

Default Level

2: System level

Parameters

None

Description

Use the port auto-power-down command to enable auto power down on an Ethernet interface.

Use the undo port auto-power-down to restore the default.

By default, auto power down is not enabled on an Ethernet interface.

For an S5810 series Ethernet switch, the configuration of auto power down does not take effect on GigabitEthernet 1/0/45 through GigabitEthernet 1/0/48.

 

Examples

# Enable auto power down on GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] port auto-power-down

# Enable auto power down on all member ports of manual port group group1.

<Sysname> system-view

[Sysname] port-group manual group1

[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/2

[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/3

[Sysname-port-group-manual-group1] port auto-power-down

port bridge enable

Syntax

port bridge enable

undo port bridge enable

View

Ethernet interface view

Default Level

2: System level

Parameters

None

Description

Use the port bridge enable command to enable bridging on an Ethernet port. When bridging is enabled on an Ethernet port, the device forwards packets received on the interface through the receiving interface itself when both the following conditions are met:

l          The destination MAC addresses of the received packets are already in the MAC address table of the device.

l          The egress interfaces in the corresponding MAC address table entries are the receiving interface.

Use the undo port bridge enable command to disable bridging on an Ethernet interface.

By default, bridging is not enabled on an Ethernet interface.

Examples

# Enable bridging on Ethernet interface GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] port bridge enable

reset counters interface

Syntax

reset counters interface [ interface-type [ interface-number ] ]

View

User view

Default Level

2: System level

Parameters

interface-type: Interface type.

interface-number: Interface number.

Description

Use the reset counters interface command to clear the statistics of an interface/subinterface.

Before sampling network traffic within a specific period of time on an interface, you need to clear the existing statistics.

l          If neither interface type nor interface number is specified, this command clears the statistics of all the interfaces.

l          If only the interface type is specified, this command clears the statistics of the interfaces that are of the interface type specified.

l          If both the interface type and interface/subinterface number are specified, this command clears the statistics of the specified interface/subinterface.

Examples

# Clear the statistics of GigabitEthernet1/0/1.

<Sysname> reset counters interface gigabitethernet 1/0/1

shutdown

Syntax

shutdown

undo shutdown

View

Ethernet interface view

Default Level

2: System level

Parameters

None

Description

Use the shutdown command to shut down an Ethernet interface.

Use the undo shutdown command to bring up an Ethernet interface.

By default, an Ethernet interface is in the up state.

In certain circumstances, modification to the interface parameters does not immediately take effect, and therefore, you need to shut down the relative interface to make the modification work.

Note that in case of a double Combo port, only one interface (either the optical port or the electrical port) is active at a time. That is, once the optical port is active (after you execute the undo shutdown command), the electrical port will be inactive automatically, and vice versa.

Examples

# Shut down interface GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] shutdown

# Bring up interface GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] undo shutdown

speed

Syntax

speed { 10 | 100 | 1000 | auto }

undo speed

View

Ethernet interface view

Default Level

2: System level

Parameters

10: Specifies the interface rate as 10 Mbps. The optical interface of a Combo port does not support the 10 keyword.

100: Specifies the interface rate as 100 Mbps.

1000: Specifies the interface rate as 1,000 Mbps.

auto: Specifies to determine the interface rate through auto-negotiation.

Description

Use the speed command to configure Ethernet interface data rate.

Use the undo speed command to restore Ethernet interface data rate.

The default, the rate of an Ethernet interface is determined through auto negotiation.

Related commands: duplex, speed auto.

Examples

# Configure the interface rate as 100 Mbps for interface GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] speed 100

10-Gigabit Ethernet ports do not support the speed command.

 

storm-constrain

Syntax

storm-constrain { broadcast | multicast | unicast } { pps | kbps | ratio } max-values min-values

undo storm-constrain { all | broadcast | multicast | unicast }

View

Layer 2 Ethernet interface view

Default Level

2: System level

Parameters

all: Disables the storm constrain function for all types of packets (that is, unicast packets, multicast packets, and broadcast packets).

broadcast: Enables/Disables the storm constrain function for broadcast packets.

multicast: Enables/Disables the storm constrain function for multicast packets.

unicast: Enables/Disables the storm constrain function for unicast packets.

pps: Specifies the storm constrain threshold in packets.

kbps: Specifies the storm constrain threshold in kilobits per second (kbps).

ratio: Specifies the storm constrain threshold in percentage of the received packets to the whole transmission capacity.

max-values: Upper threshold to be set, in pps, kbps, or percentage.

min-values: Lower threshold to be set, in pps, kbps, or percentage.

Description

Use the storm-constrain command to enable the storm constrain function for specific type of packets and set the upper and lower thresholds.

Use the undo storm-constrain command to disable the storm constrain function for specific type of packets.

By default, the storm constrain function is not enabled.

 

l          Do not use the storm-constrain command along with the unicast-suppression command, the multicast-suppression command, or the broadcast-suppression command. Otherwise, traffics may be suppressed in an unpredictable way.

l          An upper threshold cannot be less than the corresponding lower threshold. Besides, do not configure the two thresholds as the same value.

 

Examples

# Enable the storm constrain function for unicast packets on GigabitEthernet1/0/1, setting the upper and lower threshold to 200 pps and 150 pps.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] storm-constrain unicast pps 200 150

storm-constrain control

Syntax

storm-constrain control { block | shutdown }

undo storm-constrain control

View

Ethernet interface view

Default Level

2: System level

Parameters

block: Blocks the traffic of a specific type on a port when the traffic detected exceeds the upper threshold.

shutdown: Shuts down a port when a type of traffic exceeds the corresponding upper threshold. A port shut down by the storm constrain function stops forwarding all types of packets.

Description

Use the storm-constrain control command to set the action to be taken when a type of traffic exceeds the corresponding upper threshold.

Use the undo storm-constrain control command to restore the default.

By default, no action is taken when a type of traffic exceeds the corresponding threshold.

Examples

# Configure to block interface GigabitEthernet1/0/1 when a type of traffic reaching it exceeds the corresponding upper threshold.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] storm-constrain control block

storm-constrain enable log

Syntax

storm-constrain enable log

undo storm-constrain enable log

View

Ethernet interface view

Default Level

2: System level

Parameters

None

Description

Use the storm-constrain enable log command to enable log sending. With log sending enabled, the system sends log when traffic reaching a port exceeds the corresponding threshold or the traffic drops down below the lower threshold after exceeding the upper threshold.

Use the undo storm-constrain enable log command to disable log sending.

By default, log sending is enabled.

Examples

# Disable log sending for GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] undo storm-constrain enable log

storm-constrain enable trap

Syntax

storm-constrain enable trap

undo storm-constrain enable trap

View

Ethernet interface view

Default Level

2: System level

Parameters

None

Description

Use the storm-constrain enable trap command to enable trap message sending. With trap message sending enabled, the system sends trap messages when traffic reaching a port exceeds the corresponding threshold or the traffic drops down below the lower threshold after exceeding the upper threshold.

Use the undo storm-constrain enable trap command to disable trap message sending.

By default, trap message sending is enabled.

Examples

# Disable trap message sending for GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] undo storm-constrain enable trap

storm-constrain interval

Syntax

storm-constrain interval seconds

undo storm-constrain interval

View

System view

Default Level

2: System level

Parameters

seconds: Interval for generating traffic statistics, in the range 1 to 300 (in seconds).

Description

Use the storm-constrain interval command to set the interval for generating traffic statistics.

Use the undo storm-constrain interval command to restore the default.

By default, the interval for generating traffic statistics is 10 seconds.

 

l          The interval set by the storm-constrain interval command is specifically for the storm constrain function. It is different form that set by the flow-interval command.

l          For network stability consideration, configure the interval for generating traffic statistics to a value that is not shorter than the default.

 

Examples

# Set the interval for generating traffic statistics to 60 seconds.

<Sysname> system-view

[Sysname] storm-constrain interval 60

unicast-suppression

Syntax

unicast-suppression { ratio | pps max-pps | kbps max-bps }

undo unicast-suppression

View

Ethernet interface view, port group view

Default Level

2: System level

Parameters

ratio: Maximum percentage of unicast traffic to the total transmission capability of an Ethernet interface, in the range of 1 to 100. The smaller the ratio is, the less unicast traffic is allowed through the interface.

pps max-pps: Specifies the maximum number of multicast packets allowed on an Ethernet port per second ( in pps, representing packets per second).

l          For a Gigabit port, the value range is 1 to 1488100.

l          For a 10-Gigabit port, the value range is 1 to 1488100.

kbps max-bps: Specifies the maximum number of multicast bits that can be forwarded on an Ethernet port per second (in kbps, representing kilobits per second).

l          For a Gigabit port, the value range is 1 to 1024000.

l          For a 10-Gigabit port, the value range is 1 to 10240000.

Note that:.

l          When a suppression granularity larger than 1 is specified on the device, the value of the pps or kbps keyword should be no smaller than and an integral multiple of the granularity. The unicast suppression threshold value configured through this keyword on an Ethernet interface may not be the one that actually takes effect. To display the actual unicast suppression threshold value on an Ethernet interface, you can use the display interface command.

l          When no suppression granularity is specified or the suppression granularity is set to 1, the value of the pps or kbps keyword should be no smaller than 1, and the unicast suppression threshold value is the one that actually takes effect on the Ethernet interface.

Description

Use the unicast-suppression command to configure a unicast storm suppression ratio.

Use the undo unicast-suppression command to restore the default unicast suppression ratio.

By default, unicast traffic is not suppressed.

If you execute this command in Ethernet interface view, the configurations take effect only on the current interface. If you execute this command in port-group view, the configurations take effect on all ports in the port group

Note that when unicast traffic exceeds the maximum value configured, the system will discard the extra packets so that the unknown unicast traffic ratio can drop below the limit to ensure that the network functions properly.

 

l          If you set different suppression ratios in Ethernet interface view or port-group view repeatedly, the latest configuration takes effect.

l          Do not use the unicast-suppression command along with the storm-constrain command. Otherwise, the unicast storm suppression ratio configured may get invalid.

 

Examples

# For Ethernet interface GigabitEthernet1/0/1, allow unknown unicast traffic equivalent to 20% of the total transmission capability of the interface to pass and suppress the excessive unknown unicast packets.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] unicast-suppression 20

# Configure manual port group named group1 so that each port in the port group allows unicast  traffic equivalent to up to 20% of its total transmission capability to pass and suppresses excessive unicast packets..

<Sysname> system-view

[Sysname] port-group manual group1

[Sysname-port-group manual group1] group-member gigabitethernet 1/0/2

[Sysname-port-group manual group1] group-member gigabitethernet 1/0/3

[Sysname-port-group manual group1] unicast-suppression 20

virtual-cable-test

Syntax

virtual-cable-test

View

Ethernet interface view

Default Level

2: System level

Parameters

None

Description

Use the virtual-cable-test command to test the cable connected to the Ethernet interface once and to display the testing result. The tested items include:

Note that:

l          When the cable is functioning properly, the cable length in the test result represents the total cable length;

l          When the cable is not functioning properly, the cable length in the test result represents the length from the current interface to the failed position.

 

l          10-Gigabit ports and Combo ports operating as optical interfaces do not support this command.

l          The test result is for your information only. The maximum error in the tested cable length is 5 m. A hyphen “-” indicates that the corresponding test item is not supported.

 

Examples

# Enable the virtual cable test for the interface GigabitEthernet1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] virtual-cable-test

Cable status: normal, 1 metres

Pair Impedance mismatch: -

Pair skew: - ns

Pair swap: -

Pair polarity: -

Insertion loss: - db

Return loss: - db

Near-end crosstalk: - db

H3C reserves the right to modify its collaterals without any prior notice. For the latest information of the collaterals, please consult H3C sales or call 400 hotline.