Professional Documents
Culture Documents
08-Port Basic Configuration Command - 204335 - 1285 - 0
08-Port Basic Configuration Command - 204335 - 1285 - 0
Table of Contents
i
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Syntax
View
Parameter
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).
In system view, the max-pps argument is in the range of 1 to 262,143.
In Ethernet port view, the max-pps argument is in the range of 1 to 148,810.
Description
1-1
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
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.
Example
# Allow incoming broadcast traffic on the Ethernet1/0/1 port to occupy at most 20% of
the bandwidth on the port.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet 1/0/1
[H3C-Ethernet1/0/1] broadcast-suppression 20
# Set the maximum number of broadcast packets that can be received per second by
the Ethernet1/0/1 port to 1000.
[H3C-Ethernet1/0/1] broadcast-suppression pps 1000
Syntax
View
System view
Parameter
1-2
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Description
Use the copy configuration command to copy the configuration on a port to some
other ports to keep consistent configuration on them.
Note:
z 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.
z 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.
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.
QoS configuration: includes rate limit, port priority, and default 802.1p priority on the
port;
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;
Generic attribute registration protocol (GARP) configuration: includes GVRP
enable/disable status, timer settings, and registration mode;
Port configuration: includes link type of the port, port rate and duplex mode.
1-3
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Example
Note:
z 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).
z 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
Parameter
Description
1-4
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Use the undo description command to remove the port description string.
By default, no description is defined for a port.
Example
Syntax
View
Any view
Parameter
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.
1-5
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
This command is similar to the display interface command, but the information it
displays is briefer.
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.
Example
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
Syntax
1-6
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
View
Any view
Parameter
Description
Example
1-7
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Field Description
Current Ethernet port status: up or
Ethernet1/0/1 current state
down
IP Sending Frames' Format Ethernet frame format
100Mbps-speed mode, full-duplex mode Current speed mode and duplex mode
Link speed type is force link, link duplex Link speed and duplex status ( force or
type is force link auto-negotiation)
Flow-control is enabled Status of flow-control on the port
Maximum frame length allowed on the
The Maximum Frame Length
port
Broadcast suppression ratio on the
Broadcast MAX-ratio
port
Unknown unicast suppression ratio on
Unicast MAX-ratio
the port
Multicast MAX-ratio Multicast suppression ratio on the port
1-8
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Field Description
Port link-type Port link type
Identify the VLANs whose packets will
Tagged VLAN ID
be forwarded with tags on the port.
Identify the VLANs whose packets will
Untagged VLAN ID
be forwarded without tags on the port.
Last 300 seconds input: 0 packets/sec 0
bytes/sec Rate and number of incoming and
outgoing packets in the last 300
Last 300 seconds output: 0 packets/sec 0 seconds
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 Statistics on the incoming and
ignored, - parity errors outgoing packets and errors on the
Output(total): 0 packets, 0 bytes port
0 broadcasts, 0 multicasts, 0 pauses The “-” indicates that the statistical
item is not supported.
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
Syntax
display loopback-detection
View
Any view
Parameter
None
1-9
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Description
Example
Field Description
Port Ethernet1/0/1 Loopback detection is enabled on the
loopback-detection is running Ethernet1/0/1.
system Loopback-detection is
Loopback detection is enabled globally.
running
Time interval for loopback detection is 30
Detection interval time is 30 seconds
seconds.
There is no port existing loopback link No loopback port exists.
Syntax
View
Any view
Parameter
Description
1-10
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
z Hardware type
z Interface type
z Wavelength
z Vendor name
z Serial number
z Transfer distance
z Current receive state: no signal or signal detected, “-“ means not supported by the
current device
Example
Syntax
View
Any view
Parameter
Description
Use the display port command to check whether there are hybrid or trunk ports in the
current system and display such ports (if available).
Example
1-11
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
The above information shows the current system has two hybrid ports: Ethernet1/0/1
and Ethernet1/0/2.
Syntax
View
Any view
Parameter
Description
Use the display unit command to display information about the ports on a specified
unit.
Example
1-12
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Field Description
Aux1/0/0 The description string of the AUX port is
Description : Aux Interface "Aux Interface".
1.1.10 duplex
Syntax
View
Parameter
1-13
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Description
Use the duplex command to set the duplex mode of the current port.
Use the undo duplex command to restore the default duplex mode, that is,
auto-negotiation.
By default, the port is in auto-negotiation mode.
Related command: speed.
Example
1.1.11 flow-control
Syntax
flow-control
undo flow-control
View
Parameter
None
Description
Use the flow-control command to enable flow control on the current Ethernet port.
Use the undo flow-control command to disable flow control on the port.
Suppose flow control is enabled on both the local and peer switches. When congestion
occurs on the local switch,
the local switch sends a message to notify the peer switch of stopping sending packets
to itself or reducing the sending rate temporarily,
the peer switch will stop sending packets to the local switch or reduce the sending rate
temporarily when it receives the message; and vice versa. By this way, packet loss is
avoided and the network service operates normally.
By default, flow control is disabled on a port.
1-14
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Example
Syntax
flow-interval interval
undo flow-interval
View
Parameter
Interval: Interval (in seconds) to perform statistics on port information. This argument
ranges from 5 to 300 (in step of 5) and is 300 by default.
Description
Use the flow-interval command to set the interval to perform statistics on port
information.
Use the undo flow-interval command to restore the default interval.
By default, this interval is 300 seconds.
When you use the display interface interface-type interface-number command to
display the information of a port, the system performs statistical analysis on the traffic
flow passing through the port during the specified interval and displays the average
rates in the interval. For example, if you set the interval to 100 seconds, the displayed
information is as follows:
Last 100 seconds input: 0 packets/sec 0 bytes/sec
Last 100 seconds output: 0 packets/sec 0 bytes/sec
Example
# Set the interval to perform statistics on the Ethernet1/0/1 port to 100 seconds.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet 1/0/1
1-15
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Syntax
View
System view
Parameter
None
Description
Use the giant-frame statistics enable command to enable the giant-frame statistics
function.
Use the undo giant-frame statistics enable command to disable the giant-frame
statistics function.
By default, the giant-frame statistics function is not enabled.
Example
1.1.14 interface
Syntax
View
System view
Parameter
1-16
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Description
Use the interface command to enter Ethernet port view. To configure parameters for a
port, you must enter the port view first.
Example
Syntax
jumboframe enable
undo jumboframe enable
View
Parameter
None
Description
Use the jumboframe enable command to allow jumbo frames that are not larger than
9216 bytes to pass through the current Ethernet port.
Use the undo jumboframe enable command to allow frames that are not larger than
1536 bytes to pass through the current Ethernet port.
1-17
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
By default, frames that are not larger than 9216 bytes are allowed to pass through the
Ethernet port.
Example
# Allow frames that are not larger than 9216 bytes to pass through
GigabitEthernet1/0/1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet 1/0/1
[H3C-Ethernet1/0/1] jumboframe enable
1.1.16 loopback
Syntax
View
Parameter
external: Performs external loop test. In the external loop test, self-loop headers
(which are made from four cores of the 8-core cables, then the packets forwarded by
the port will be received by itself.) must be used on the port of the switch. The external
loop test can locate the hardware failures on the port.
internal: Performs internal loop test. In the internal loop test, self loop is established in
the switching chip to locate the chip failure which is related to the port.
Description
Use the loopback command to perform a loopback test on the current Ethernet port to
check whether the Ethernet port works normally. The loopback test terminates
automatically after running for a specific period.
By default, no loopback test is performed on the Ethernet port.
Example
1-18
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Syntax
View
Parameter
None
Description
Example
1-19
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Syntax
loopback-detection enable
undo loopback-detection enable
View
Parameter
None
Description
Example
Syntax
1-20
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
View
System view
Parameter
time: Time interval for loopback detection, in the range of 5 to 300 (in seconds). It is 30
seconds by default.
Description
Use the loopback-detection interval-time command to set time interval for loopback
detection.
Use the undo loopback-detection interval-time command to restore the default time
interval.
Example
Syntax
View
Parameter
None
Description
1-21
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Example
# Configure the system to run loopback detection on all VLANs of the trunk port
Ethernet1/0/1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet 1/0/1
[H3C-Ethernet1/0/1] port link-type trunk
[H3C-Ethernet1/0/1] loopback-detection per-vlan enable
1.1.21 mdi
Syntax
View
Parameter
Description
Example
1.1.22 multicast-suppression
Syntax
1-22
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
View
Parameter
ratio: Maximum ratio of received multicast traffic to the total bandwidth on the Ethernet
port. The value ranges from 1 to 100 (in step of 1) and defaults to 100. The smaller the
ratio is, the less multicast traffic is allowed to be received.
max-pps: Maximum number of multicast packets allowed to be received per second on
the Ethernet port (in pps). The value ranges from 1 to 148,810.
Description
Example
# Allow the incoming multicast traffic on the Ethernet1/0/1 port to occupy at most 20%
of the bandwidth on the port.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet 1/0/1
[H3C-Ethernet1/0/1] multicast-suppression 20
# Set the maximum number of multicast packets that can be received per second by the
Ethernet1/0/1 port to 1000 pps.
[H3C-Ethernet1/0/1] multicast-suppression pps 1000
Syntax
View
1-23
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Parameter
Caution:
All access ports belong to VLAN 1, which is the default VLAN of the system, so you are
not allowed to add an access port to VLAN 1 or remove an access port from VLAN 1.
Otherwise, the system will prompt: “Can't delete ports from or add ports to the default
VLAN!”.
Description
Use the port access vlan command to add the access port into the specified VLAN.
Use the undo port access vlan command to remove the access port from the
specified VLAN.
You must specify the ID of an existing VLAN in the command.
Example
Syntax
View
Parameter
1-24
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Description
Use the port hybrid pvid vlan command to set the default VLAN ID for the hybrid port.
Use the undo port hybrid pvid command to restore the default VLAN ID of the port.
Related command: port link-type.
Caution:
You are recommended to set the default VLAN ID of the local hybrid or trunk ports to
the same value as that of the hybrid or trunk ports on the peer switch. Otherwise,
packet forwarding may fail on the ports.
Example
Syntax
View
Parameter
vlan-id-list: VLAN range to which the hybrid port will be added. vlan-id-list = [ vlan-id1
[ to vlan-id2 ] ]&<1-10>, where, vlan-id is in the range of 1 to 4094 and can be discrete,
and &<1-10> means you can input up to ten VLAN IDs/ID ranges.
tagged: Keeps VLAN tags when the packets of the specified VLANs are forwarded on
this port.
untagged: Keeps no VLAN tags when the packets of the specified VLANs are
forwarded on this port.
1-25
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Description
Use the port hybrid vlan command to add the hybrid port into specified VLANs.
Use the undo port hybrid vlan command to remove the hybrid port from specified
VLANs.
A hybrid port can belong to multiple VLANs. When you use the command several times,
all VLAN specified in the commands will be allowed to pass the port.
The VLAN specified by the vlan-id argument must be existing. Otherwise, this
command is invalid. Related command: port link-type.
Example
# Add the hybrid port Ethernet1/0/1 to VLAN 2, VLAN 4 and VLAN 50 through VLAN
100, with tags assigned to their packets.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] vlan 2
[H3C-vlan2] quit
[H3C] interface ethernet 1/0/1
[H3C-Ethernet1/0/1] port link-type hybrid
[H3C-Ethernet1/0/1] port hybrid vlan 2 4 50 to 100 tagged
Operation complete, except these VLAN(s):
Non-existent VLAN(s)
Syntax
View
Parameter
Description
Use the port link-type command to set the link type of the current Ethernet port.
Use the undo port link-type command to restore the default link type.
1-26
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Example
Syntax
View
Parameter
vlan-id-list: VLAN range to which the trunk port will be added. vlan-id-list = [ vlan-id1 [ to
vlan-id2 ] ]&<1-10>, where, vlan-id is in the range of 1 to 4094 and can be discrete, and
&<1-10> means you can input up to ten VLAN IDs/ID ranges.
all: Adds the trunk port into all VLANs.
Description
Use the port trunk permit vlan command to add the trunk port into the specified
VLAN.
Use the undo port trunk permit vlan command to remove the hybrid port from the
specified VLAN.
A trunk port can belong to multiple VLANs. When you use the command several times,
all VLAN specified in the commands will be allowed to pass the port.
Related command: port link-type.
1-27
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Example
# Add the trunk port Ethernet1/0/1 to VLAN 2, VLAN 4 and VLAN 50 through VLAN
100.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet1/0/1
[H3C-Ethernet1/0/1] port link-type trunk
[H3C-Ethernet1/0/1] port trunk permit vlan 2 4 50 to 100
Please wait... Done.
Syntax
View
Parameter
Description
Use the port trunk pvid vlan command to set the default VLAN ID for the trunk port.
Use the undo port trunk pvid command to restore the default setting.
To guarantee the proper packet transmission, the default VLAN ID of the local trunk port
must be identical with that of the trunk port on the peer switch connected with the local
trunk port.
Related command: port link-type.
Example
1-28
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Syntax
View
User view
Parameter
Description
Use the reset counters interface command to clear the statistics of the port, preparing
for a new statistics collection.
If you specify neither port type nor port number, the command clears statistics of all
ports.
If specify only port type, the command clears statistics of all ports of this type.
If specify both port type and port number, the command clears statistics of the specified
port.
The statistics of the 802.1x-enabled ports cannot be cleared.
Example
1.1.30 shutdown
Syntax
shutdown
undo shutdown
View
Parameter
None
1-29
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Description
Example
# Enable Ethernet1/0/1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet 1/0/1
[H3C-Ethernet1/0/1] shutdown
[H3C-Ethernet1/0/1] undo shutdown
1.1.31 speed
Syntax
View
Parameter
Description
Example
1-30
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet 1/0/1
[H3C-Ethernet1/0/1] speed 10
1.1.32 unicast-suppression
Syntax
View
Parameter
ratio: Maximum ratio of received unknown unicast traffic to the total bandwidth on the
Ethernet port. The value ranges from 1 to 100 (in step of 1) and defaults to 100. The
smaller the ratio is, the lesser unknown unicast traffic is allowed to be received.
max-pps: Maximum number of unknown unicast packets allowed to be received per
second on the Ethernet port (in pps). The value ranges from 1 to 148,810.
Description
Use the unicast-suppression command to limit the unknown unicast traffic allowed to
be received on the current port.
Use the undo broadcast-suppression command to restore the default unknown
unicast suppression setting on the port.
When incoming unknown unicast traffic exceeds the unknown unicast traffic threshold
you set, the system drops the packets exceeding the threshold to reduce the unknown
unicast traffic ratio to the reasonable range, so as to keep normal network service.
By default, the switch does not suppress unknown unicast traffic.
Example
# Allow unknown incoming unicast traffic on the Ethernet1/0/1 port to occupy at most
20% of the bandwidth on the port.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet 1/0/1
[H3C-Ethernet1/0/1] unicast-suppression 20
# Set the maximum number of unknown unicast packets that can be received per
second by the Ethernet1/0/1 port to 1000 pps.
1-31
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
1.1.33 virtual-cable-test
Syntax
virtual-cable-test
View
Parameter
None
Description
Use the virtual-cable-test command to enable the system to test the cable connected
to a specific port and to display the results. The system can test these attributes of the
cable:
Cable status, including normal, abnormal, abnormal-open, abnormal-short and failure
Cable length
Note:
z If the cable is in normal state, the displayed length value is the total length of the
cable.
z If the cable is in any other state, the displayed length value is the length from the
port to the faulty point.
z Currently, the following testing functions are available on an S3100-52P switch:
cable status testing and Cable length testing.
1-32
Command Manual – Port Basic Configuration Chapter 1 Port Basic Configuration
H3C S3100-52P Ethernet Switch Commands
Note:
The combo port does not support the virtual-cable-test command.
Example
1-33