09-Port Basic Configuration Commands

Download


Chapter 1  Port Basic Configuration Commands

 

&  Note:

A new parameter kbps is added in the command storm-constrain in the software version Release 2301.

 

1.1  Port Basic Configuration Commands

1.1.1  broadcast-suppression

Syntax

broadcast-suppression { ratio | bps max-bps }

undo broadcast-suppression

View

System view, Ethernet port view

Parameter

ratio: Maximum ratio of the broadcast traffic allowed on a port to the total transmission capacity of the 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-bps: Maximum number (in Kbps) of broadcast traffic that can be received per second on an Ethernet port (in step of 64). This argument can only be configured on Ethernet port view.

l           For a 100Mbps Ethernet port, the max-bps argument is in the range 64 to 99,968.

l           For a GigabitEthernet port, the max-bps argument is in the range 64 to 1,000,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.

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.

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

 

&  Note:

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

l      With the Traffic Policing enabled, broadcast-suppression function cannot be enabled either on System view or Ethernet port view. Refer to the QoS part for information about Traffic Policing.

 

Example

# Allow incoming broadcast traffic on all port to occupy at most 20% of the total transmission capacity of the port and suppress the broadcast traffic that exceeds the specified range.

<Sysname> system-view

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

[Sysname] broadcast-suppression 20

 Note:Broadcast-suppression is set successfully on all ports except reflector ports, fabric ports and the port configured storm-constrain!

# Set the maximum incoming broadcast traffic rate allowed on Ethernet 1/0/2 to 128 kbps.

[Sysname] interface Ethernet 1/0/2

[Sysname-Ethernet1/0/2] broadcast-suppression bps 128

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

Parameter

interface-type: Port type.

interface-number: Port number.

source-agg-id: Source aggregation group number, in the range of 1 to 28. 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 28.

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 duplicate the configuration of a port to specified 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, Packets Priority Marking, Port Priority, Traffic Statistics, Traffic Redirecting, Port Rate Limiting, Priority Trust Mode, QoS Profile ( excludes qos-profile port-based ), and so on;

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           Generic attribute registration protocol (GARP) configuration: includes GVRP enable/disable status, timer settings, and registration mode;

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.

 

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

 

Example

# Duplicate the configuration of Ethernet 1/0/1 to Ethernet 1/0/2 and Ethernet 1/0/3 (Ethernet 1/0/3 is an aggregation port).

<Sysname> system-view

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

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

 Note: The following will be removed from destination port list:

 Aggregation port(s),Voice vlan port(s).

 Copying VLAN configuration...

 Copying Protocol based VLAN configuration...

 Copying LACP configuration...

 Copying QOS configuration...

 Copying GARP configuration...

 Copying STP configuration...

 Copying speed/duplex configuration...

1.1.3  description

Syntax

description text

undo description

View

Ethernet port view

Parameter

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

Description

Use the description command to set a port description string.

Use the undo description command to remove the port description string.

By default, no description is defined for a port.

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

Example

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

<Sysname> system-view

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

[Sysname] interface ethernet1/0/1

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

1.1.4  display brief interface

Syntax

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

View

Any view

Parameter

interface-type: Port type.

interface-number: Port number.

|: Specifies to use a regular expression to filter 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.

regular-expression: Regular expression, a 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 command: display interface.

Example

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

<Sysname> display brief interface Ethernet1/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

Current link state of the Ethernet port: UP, DOWN or ADMINISTRATIVELY 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

Parameter

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:

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

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

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

Example

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

<Sysname> display interface ethernet1/0/1

 Ethernet1/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 100_BASE_TX

 100Mbps-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 2048

 Broadcast MAX-bps: 128K

 Multicast MAX-pps: 128K

 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

Ethernet1/0/1 current state

Current status of the Ethernet port : UP, DOWN or ADMINISTRATIVELY DOWN

IP Sending Frames' Format

Ethernet frame format

Hardware address

Port hardware address

Media type

Media type

Port hardware type

Port hardware type

100Mbps-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-bps

Broadcast suppression ratio on the port

Multicast MAX-bps

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

Rate and number of incoming and outgoing packets in the last 300 seconds

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

Statistics on the incoming and outgoing packets and errors on the port

The “-” indicates that the statistical item is not supported.

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

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

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

 Ethernet1/0/5                    8

1.1.7  display loopback-detection

Syntax

display loopback-detection

View

Any view

Parameter

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.

Example

# Display the loopback detection status on the port.

<Sysname> display loopback-detection

Port Ethernet1/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 Ethernet1/0/1 loopback-detection is running

Loopback detection is enabled on the Ethernet1/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 port combo

Syntax

display port combo

View

Any view

Parameter

hybrid: Displays current hybrid ports.

trunk: Displays current trunk ports.

combo: Displays current the combo ports on the current device.

Description

Use the display port command to display the combo ports on the current device.

Example

# Displays current the combo ports on the device.

<Sysname> display port combo

  Combo-group       Active                     Inactive

       1       GigabitEthernet1/1/2       GigabitEthernet1/1/1

       2       GigabitEthernet1/2/2       GigabitEthernet1/2/1

For the two ports forming a combo port, the one in active state is currently enabled and the one in inactive state is currently disabled. You can refer to the shutdown command to change the state of the two ports.

 

&  Note:

For information about combo port, refer to H3C S3100 Series Ethernet Switch Installation Manual.

 

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.

Description

Use the display storm-constrain command to display the storm control configurations.

Examples

# Display the storm control configurations.

<Sysname> display storm-constrain

Flow Statistic Interval: 5(second)

PortName  StormType LowerLimit UpperLimit  Ctr-mode  Status  Trap  Log  Swi-num --------------------------------------------------------------------------

Eth1/0/1  broadcast 9         99         shutdown normal  on   off  3

Table 1-5 Description on the fields of the display storm-constrain command

Field

Description

Flow Statistic Interval

Interval to collect traffic statistics.

PortName

Name of an Ethernet port

StormType

Traffic type, which can be unicast, multicast, and broadcast

LowerLimit

Lower threshold of traffic received on the port

UpperLimit

Upper threshold of traffic received on the port

Ctr-mode

Control action to be taken when the broadcast/multicast/unicast traffic exceeds the upper threshold, which can be block or shutdown.

Status

Current status of the port, which can be normal or control.

Trap

on: trap information is output when a type of traffic received on the port exceeds the upper threshold or falls below the lower threshold.

off: trap information is not output when a type of traffic received on the port exceeds the upper threshold or falls below the lower threshold.

Log

on: log information is output when traffic received on the port exceeds the upper threshold or falls below the lower threshold

off: log information is not output when traffic received on the port exceeds the upper threshold or falls below the lower threshold

Swi-num

Number of port state switchover

 

1.1.10  display unit

Syntax

display unit