08-Port Basic Configuration Command

Download


Chapter 1  Port Basic Configuration Commands

 

l      Port Up/Down log output control feature is added to this manual. For related command, refer to section enable log updown.

l      The auto-negotiation speed configuration feature is added to the manual. For related command, refer to speed auto.

l      The storm control function is added to this manual. For related commands, refer to sections display storm-constrain, storm-constrain, storm-constrain control, storm-constrain interval, and storm-constrain enable.

l      The feature to display/clear the statistics on dropped packets is newly added. For details, refer to sections display packet-drop and reset packet-drop interface.

l      The command used to set the port state change delay was added to this manual. For details, refer to link-delay.

l      The feature to switch the state of combo port is newly added. For details, refer to sections shutdown.

 

1.1  Port Basic Configuration Commands

1.1.1  broadcast-suppression

Syntax

broadcast-suppression { ratio | pps max-pps }

undo broadcast-suppression

View

System view or Ethernet port view

Parameters

ratio: Maximum ratio of the received broadcast traffic to the total bandwidth on an Ethernet port. The value ranges from 1 to 100 (in step of 1) and defaults to 100. The smaller the ratio is, the less broadcast traffic is allowed.

max-pps: Maximum number of broadcast packets allowed to be received per second on an Ethernet port (in pps). The following are the value ranges for the argument:

l           In system view, the value range is 1 to 14,880,000.

l           In Ethernet port view, the value range is 1 to 1,488,000.

Description

Use the broadcast-suppression command to limit broadcast traffic allowed to be received on each port (in system view) or on a specified port (in Ethernet port view).

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

The broadcast-suppression command is used to enable broadcast suppression. By default, broadcast suppression is disabled.

When incoming broadcast traffic exceeds the broadcast traffic threshold you set, the system drops the packets exceeding the threshold to reduce the broadcast traffic ratio to the specified range, so as to keep normal network service.

l           You can use the undo broadcast-suppression command in system view to cancel the broadcast suppression settings on all ports, or use the broadcast-suppression command in system view to make a global setting.

l           Executing the commands in Ethernet port view only takes effect on the current port.

 

&  Note:

The global broadcast suppression setting configured by the broadcast-suppression command in system view takes effect on all Ethernet ports in the system except for the reflection ports, stack ports and ports having their own broadcast suppression settings.

If you configure broadcast-suppression command in both system view and Ethernet port view, the configuration in Ethernet port view will take effect.

 

Examples

# Allow incoming broadcast traffic on the GigabitEthernet1/0/1 port to occupy at most 20% of the bandwidth on the port.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface GigabitEthernet 1/0/1

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

# Set the maximum number of broadcast packets that can be received per second by the GigabitEthernet1/0/1 port to 1000 pps.

[Sysname-GigabitEthernet1/0/1] broadcast-suppression pps 1000

1.1.2  copy configuration

Syntax

copy configuration source { interface-type interface-number | aggregation-group source-agg-id } destination { interface-list [ aggregation-group destination-agg-id ] | aggregation-group destination-agg-id }

View

System view

Parameters

interface-type: Port type.

interface-number: Port number.

source-agg-id: Source aggregation group number, in the range of 1 to 464. The port with the smallest port number in the aggregation group is used as the source port.

destination-agg-id: Destination aggregation group number, in the range of 1 to 464.

interface-list: Destination port list, interface-list =interface-type interface-number [ to interface-type interface-number ]  &<1-10. &<1-10> means that you can input up to 10 ports/port ranges.

Description

Use the copy configuration command to copy the configuration on a port to some other ports to keep consistent configuration on them.

 

&  Note:

l      If you specify a source aggregation group ID, the system uses the port with the smallest port number in the aggregation group as the source.

l      If you specify a destination aggregation group ID, the configuration of the source port will be copied to all ports in the aggregation group and all ports in the group will have the same configuration as that of the source port.

 

The configuration that can be copied includes: VLAN configuration, protocol-based VLAN configuration, LACP configuration, QoS configuration, GARP configuration, STP configuration and initial port configuration.

l           VLAN configuration: includes IDs of the VLANs allowed on the port and the default VLAN ID of the port;

l           Protocol-based VLAN configuration: includes IDs and indexes of the protocol-based VLANs allowed on the port;

l           Link aggregation control protocol (LACP) configuration: includes LACP enable/disable status;

 

&  Note:

The copy command can only be used to copy the configuration of LACP’s enable state, but not to copy the configuration of aggregation group, i.e., you can not add a port to the aggregation group bye the command.

 

l           QoS configuration: includes traffic policing, packet priority marking, port priority, traffic accounting, traffic redirecting, VLAN mapping, port rate limiting, priority trust mode, QoS profile (the qos-profile port-based configuration cannot be duplicated), and so on.;

l           Generic attribute registration protocol (GARP) configuration: includes GVRP enable/disable status, timer settings, and registration mode;

l           STP configuration: includes STP enable/disable status on the port, link attribute on the port (point-to-point or non-point-to-point), STP priority, path cost, packet transmission rate limit, whether loop protection is enabled, whether root protection is enabled, and whether the port is an edge port;

l           Port configuration: includes link type of the port, port rate and duplex mode.

In case a configuration setting fails to be copied, the system will print the error message.

Examples

# Copy the configuration of GigabitEthernet1/0/1 to GigabitEthernet1/0/2 and GigabitEthernet1/0/3.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] copy configuration source GigabitEthernet1/0/1 destination GigabitEthernet1/0/2 GigabitEthernet1/0/3

 Copying VLAN configuration...

 Copying Protocol based VLAN configuration...

 Copying LACP configuration...

 Copying QOS configuration...

 Copying GARP configuration...

 Copying STP configuration...

 Copying speed/duplex configuration...

 

&  Note:

l      Any aggregation group port you input in the destination port list will be removed from the list and the copy command will not take effect on the port. If you want an aggregation group port to have the same configuration with the source port, you can specify the aggregation group of the port as the destination (with the destination-agg-id argument).

l      Any voice-VLAN-enabled port you input in the destination port list will be removed from the list.

 

1.1.3  description

Syntax

description text

undo description

View

Ethernet port view

Parameters

text: Port description, a string of 1 to 80 characters.

Description

Use the description command to configure a description for the port.

Use the undo description command to remove the port description.

By default, no description is configured for a port.

You can use the display brief interface command to display the configured description.

Examples

# Set description string "lanswitch-interface" for the GigabitEthernet1/0/1 port.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] interface GigabitEthernet1/0/1

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

1.1.4  display brief interface

Syntax

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

View

Any view

Parameters

interface-type: Port type.

interface-number: Port number.

|: Specifies to use a regular expression to describe the configuration information entries to be displayed.

begin: Each entry must begin with a specified character string.

include: Each entry must include a specified character string.

exclude: Each entry must not include a specified character string.

string: Regular expression, a character string of 1 to 256 characters.

 

&  Note:

For details about regular expression, refer to the “Configuration File Management” module in this manual.

 

Description

Use the display brief interface command to display the brief configuration information about one or all interfaces, including: interface type, link state, link rate, duplex attribute, link type, default VLAN ID and description string.

 

&  Note:

Currently, for the port types other than Ethernet port, this command only displays the link state, and shows "--" in all other configuration information fields.

 

Related commands: display interface.

Examples

# Display the brief configuration information about the GigabitEthernet1/0/1 port.

<Sysname> display brief interface GigabitEthernet1/0/1

Interface:

Eth  - Ethernet  GE   - GigabitEthernet TENGE - tenGigabitEthernet

Loop - LoopBack  Vlan - Vlan-interface  Cas   - Cascade

Speed/Duplex:

A - auto-negotiation

 

Interface   Link     Speed  Duplex Type   PVID Description

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

Eth1/0/1    DOWN     A      A      hybrid 1    home

Table 1-1 Description on the fields of the display brief interface command

Field

Description

Interface

Port type

Link

Link state: UP or DOWN

Speed

Link rate

Duplex

Duplex attribute

Type

Link type: access, hybrid or trunk

PVID

Default VLAN ID

Description

Port description string

 

The state of an Ethernet port can be UP, DOWN, or ADMINISTRATIVELY DOWN. The following table shows the port state transitions.

Table 1-2 Port state transitions

Initial port state

State after executing the shutdown command

State after executing the undo shutdown command

Not connected to any cable

DOWN

ADMINISTRATIVELY DOWN

DOWN

ADMINISTRATIVELY DOWN

DOWN

Connected to a cable

DOWN

DOWN

UP

UP

ADMINISTRATIVELY DOWN

UP

 

1.1.5  display interface

Syntax

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

View

Any view

Parameters

interface-type: Port type.

interface-number: Port number.

For details about the arguments, refer to the parameter description of the interface command.

Description

Use the display interface command to display port configuration.

When using this command:

l           If you specify neither port type nor port number, the command displays information about all ports.

l           If you specify only port type, the command displays information about all ports of the specified type.

l           If you specify both port type and port number, the command displays information about the specified port.

Examples

# Display the configuration information of the GigabitEthernet1/0/1 port.

<Sysname> display interface GigabitEthernet1/0/1

 GigabitEthernet1/0/1 current state : DOWN

 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0012-a990-2240

 Media type is twisted pair, loopback not set

 Port hardware type is 1000_BASE_T

 1000Mbps-speed mode, full-duplex mode

 Link speed type is force link, link duplex type is force link

 Flow-control is enabled

 The Maximum Frame Length is 9216

 Broadcast MAX-ratio: 100%

 Unicast MAX-ratio: 100%

 Multicast MAX-ratio: 100%

 Allow jumbo frame to pass

 PVID: 1

 Mdi type: auto

 Port link-type: access

  Tagged   VLAN ID : none

  Untagged VLAN ID : 1

 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 broadcasts, 0 multicasts, - pauses

 Input(normal):  - packets, - bytes

          - broadcasts, - multicasts, - pauses

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

          0 frame,  - overruns, 0 aborts, 0 ignored, - parity errors

 Output(total): 0 packets, 0 bytes

          0 broadcasts, 0 multicasts, 0 pauses

 Output(normal): - packets, - bytes

          - broadcasts, - multicasts, - pauses

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

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

          0 lost carrier, - no carrier

Table 1-3 Description on the fields of the display interface command

Field

Description

GigabitEthernet1/0/1 current state

Current Ethernet port status: up or down

IP Sending Frames' Format

Ethernet frame format

Hardware address

Port hardware address

Media type

Media type

Port hardware type

Port hardware type

1000Mbps-speed mode, full-duplex mode

Current speed mode and duplex mode

Link speed type is force link, link duplex type is force link

Link speed and duplex status ( force or auto-negotiation)

Flow-control is enabled

Status of flow-control on the port

The Maximum Frame Length

Maximum frame length allowed on the port

Broadcast MAX-ratio

Broadcast suppression ratio on the port

Unicast MAX-ratio

Unknown unicast suppression ratio on the port

Multicast MAX-ratio

Multicast suppression ratio on the port

Allow jumbo frame to pass

Whether Jumbo frame is allowed on the port.

PVID

Default VLAN ID of the port

Mdi type

Network cable type

Port link-type

Port link type

Tagged VLAN ID

Identify the VLANs whose packets will be forwarded with tags on the port.

Untagged VLAN ID

Identify the VLANs whose packets will be forwarded without tags on the port.

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

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

Average input and output rates (in pps and Bps) in the last 300 seconds

Input(total):  0 packets, 0 bytes

          0 broadcasts, 0 multicasts, - pauses

Count in packets and in bytes of total incoming traffic on the port, including incoming normal packets, abnormal packets, and normal PAUSE frames

The number of incoming broadcast packets, the number of incoming multicast packets, and the number of incoming PAUSE frames on the port.

Input(normal):  - packets, - bytes

          - broadcasts, - multicasts, - pauses

Count in packets and in bytes of incoming normal packets on the port, including incoming normal packets and normal PAUSE frames

The number of normal incoming broadcast packets, the number of normal incoming multicast packets, and the number of normal incoming PAUSE frames of the port

A hyphen (-) indicates that the statistical item is not supported

input errors

The total number of incoming error frames

runts

The number of incoming runt frames

A runt frame is of less than 64 bytes but has the correct format and CRC field

giants

The number of incoming giant frames

(A giant frame is of more than 1518 bytes if untagged or more than 1522 bytes if tagged.)

 - throttles

The number of throttles that occurred on the port

(A throttle occurs when a port is shut down due to buffer or memory overload.)

CRC

The number of CRC error frames received in correct length

frame

The number of incoming CRC error frames with non-integer number of bytes

 - overruns

The number of packets dropped because the receiving rate of the port exceeds the processing capability of the input queues

aborts

The total number of incoming illegal packets, including:

l      Fragments: CRC error frames of less than 64 bytes (integer or non-integer).

l      Jabber frames: CRC error frames of more than 1518 bytes if untagged or 1522 bytes if tagged (integer or non-integer).

l      Symbol error frames: frames with at least one symbol error.

l      Unknown operator frames: MAC control frames that are not Pause frames

l      Length error frames: frames whose actual length (46-1500 bytes) is inconsistent with the length field in the 802.3 header.

ignored,

The number of packets dropped due to insufficient receive buffer on the port

- parity errors

The number of incoming parity error frames

Output(total): 0 packets, 0 bytes

          0 broadcasts, 0 multicasts, 0 pauses

Count in packets and in bytes of total outgoing traffic on the port, including normal packets, abnormal packets, and normal Pause frames

The number of outgoing broadcast packets, the number of outgoing multicast packets, and the number of outgoing Pause frames on the port

Output(normal): - packets, - bytes

          - broadcasts, - multicasts, - pauses

Count in packets and in bytes of outgoing normal packets on the port, including outgoing normal packets and normal Pause frames.

The number of normal outgoing broadcast packets, the number of normal outgoing multicast packets, and the number of normal outgoing Pause frames on the port.

A hyphen (-) indicates that the statistical item is not supported.

output errors

The total number of outgoing error frames

 - underruns

The number of packets dropped because the transmitting rate of the port exceeds the processing capacity of the output queue, which is a rare hardware error.

 - buffer failures

The number of packets dropped due to insufficient transmit buffer on the port

aborts

The number of transmission failures due to various reasons, such as collisions

deferred

The number of first transmission attempts delayed because of detection of collisions

collisions

The number of detected collisions

(Transmission of a frame will be aborted upon detection of a collision.)

late collisions

The number of detected late collisions

(A late collision occurs if the transmission of a frame defers due to detection of collision after its first 512 bits have been transmitted.)

lost carrier

The lost carrier counter applicable to serial WAN interfaces

The counter increases by 1 upon each carrier loss detected during frame transmission.

 - no carrier

The no carrier counter applicable to serial WAN interfaces

The counter increases by 1 upon each carrier detection failure for frame transmission.

 

1.1.6  display link-delay

Syntax

display link-delay

View

Any view

Parameters

None

Description

Use the display link-delay command to display the information about the ports with the link-delay command configured, including the port name and the configured delay.

Related commands: link-delay.

Examples

# Display the information about the ports with the link-delay command configured.

<Sysname> display link-delay

 Interface               Time Delay

 ===================== ==============

 GigabitEthernet1/0/10            8

 GigabitEthernet1/0/11            6

1.1.7  display loopback-detection

Syntax

display loopback-detection

View

Any view

Parameters

None

Description

Use the display loopback-detection command to display the loopback detection status on the port. If loopback detection is enabled, this information will also be displayed: time interval for loopback detection and the loopback ports.

Examples

# Display the loopback detection status on the port.

<Sysname> display loopback-detection

Port GigabitEthernet1/0/1 loopback-detection is running

system Loopback-detection is running

 Detection interval time is 30 seconds

 There is no port existing loopback link

Table 1-4 Description on the fields of the display loopback-detection command

Field

Description

Port GigabitEthernet1/0/1 loopback-detection is running

Loopback detection is enabled on the GigabitEthernet1/0/1.

system Loopback-detection is running

Loopback detection is enabled globally.

Detection interval time is 30 seconds

Time interval for loopback detection is 30 seconds.

There is no port existing loopback link

No loopback port exists.

 

1.1.8  display packet-drop

Syntax

display packet-drop { interface [ interface-type interface-number ] | summary }

View

Any view

Parameters

interface-type: Port type.

interface-number: Port number.

summary: Specifies to display the summary information about the packets dropped on all the ports.

Description

Use the display packet-drop command to display the statistics on the packets dropped on a port or all the ports.

If the interface type and interface number arguments are not provided, this command displays the statistics on the packets dropped on all ports. Otherwise, the command displays the statistics of the packets dropped on the port identified by the interface type and interface number argument.

Related commands: reset packet-drop interface.

Examples

# Display the statistics on the packets dropped on GigabitEthernet1/0/1.

<Sysname> display packet-drop interface GigabitEthernet 1/0/1

GigabitEthernet1/0/1:

  Packets dropped By GBP full or insufficient bandwidth: 0

  Packets dropped By others: 0

# Display the summary information about the packets dropped on all the ports.

<Sysname> display packet-drop summary

All GigabitEthernet interfaces:

  Packets dropped By GBP full or insufficient bandwidth: 0

  Packets dropped By others: 0

Table 1-5 Description on the fields of the display packet-drop command

Filed

Description

Packets dropped By GBP full or insufficient bandwidth

Number of packets dropped because the GBP is full or the bandwidth is insufficient.

Packets dropped By others

Number of the packets dropped for other reasons.

 

1.1.9  display storm-constrain

Syntax

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

View

Any view

Parameters

interface-type: Port type.

interface-number: Port number.

|: Uses a regular expression to filter the output configuration information.

begin: Displays the configurations that begin with the string specified by regular-expression.

exclude: Displays the configurations that do not contain the string specified by regular-expression.

include: Displays the configurations that contain the string specified by regular-expression.

regular-expression: Regular expression.

Table 1-6 Special characters used in a regular expression

Character

Meaning

Description

^

Matches the stri