Title | Size | Downloads |
---|---|---|
H3C S3100 Series Ethernet Switches Operation Manual-Release 22XX Series(V1.00)-Port Basic Configuration Operation.pdf | 142.57 KB |
- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
09-Port Basic Configuration Operation | 142.57 KB |
Table of Contents
Configuring Port Auto-Negotiation Speed
Limiting Traffic on individual Ports
Enabling Flow Control on a Port
Duplicating the Configuration of a Port to Other Ports
Configure loopback detection for Ethernet port(s)
Enabling the System to Test Connected Cable
Configuring the Interval to Perform Statistical Analysis on Port Traffic
Disabling Up/Down Log Output on a Port
Configuring Storm Control on a Port
Setting the Port State Change Delay
Displaying and Maintaining Basic Port Configuration
Ethernet Port Configuration Example
Troubleshooting Ethernet Port Configuration
Ethernet Port Configuration
Combo Port Configuration
Introduction to Combo port
A Combo port can operate as either an optical port or an electrical port. Inside the device there is only one forwarding interface. For a Combo port, the electrical port and the corresponding optical port are TX-SFP multiplexed. You can specify a Combo port to operate as an electrical port or an optical port. That is, a Combo port cannot operate as both an electrical port and an optical port simultaneously. When one is enabled, the other is automatically disabled.
Configuring Combo port state
Follow these steps to configure the state of a Combo port:
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Enable a specified Combo port |
undo shutdown |
Optional By default, of the two ports in a Combo port, the one with a smaller port ID is enabled. |
In case of a 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, the electrical port will be inactive automatically, and vice versa.
Initially Configuring a Port
Table 1-1 Initially configure a port
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Enable the Ethernet port |
undo shutdown |
Optional By default, the port is enabled. Use the shutdown command to disable the port. |
Set the description string for the Ethernet port |
description text |
Optional By default, the description string of an Ethernet port is null. |
Set the duplex mode of the Ethernet port |
duplex { auto | full | half } |
Optional By default, the duplex mode of the port is auto (auto-negotiation). |
Set the speed of the Ethernet port |
speed { 10 | 100 | 1000 | auto } |
Optional l By default, the speed of an Ethernet port is determined through auto-negotiation (the auto keyword). l Use the 1000 keyword for Gigabit Ethernet ports only. |
Set the medium dependent interface (MDI) mode of the Ethernet port |
mdi { across | auto | normal } |
Optional Be default, the MDI mode of an Ethernet port is auto. |
Set the maximum frame size allowed on the Ethernet port to 2048 bytes (Only S3100-EI Series switches support this feature) |
jumboframe enable |
Optional By default, the maximum frame size allowed on an Ethernet port is 2048 bytes. |
Configuring Port Auto-Negotiation Speed
You can configure an auto-negotiation speed for a port by using the speed auto command.
Take a 10/100/1000 Mbps port as an example.
l If you expect that 10 Mbps is the only available auto-negotiation speed of the port, you just need to configure speed auto 10.
l If you expect that 10 Mbps and 100 Mbps are the available auto-negotiation speeds of the port, you just need to configure speed auto 10 100.
l If you expect that 10 Mbps and 1000 Mbps are the available auto-negotiation speeds of the port, you just need to configure speed auto 10 1000.
Follow these steps to configure auto-negotiation speeds for a port:
To do... |
Use the command... |
Remarks |
system-view |
— |
|
Enter Ethernet interface view |
interface interface-type interface-number |
— |
Configure the available auto-negotiation speed(s) for the port |
speed auto [ 10 | 100 | 1000 ]* |
Optional By default, the port speed is determined through auto-negotiation. |
l After you configure auto-negotiation speed(s) for a port, if you execute the undo speed command or the speed auto command, the auto-negotiation speed setting of the port restores to the default setting.
l The effect of executing speed auto 10 100 1000 equals to that of executing speed auto, that is, the port is configured to support all the auto-negotiation speeds: 10 Mbps, 100 Mbps, and 1000 Mbps.
Limiting Traffic on individual Ports
By performing the following configurations, you can limit the incoming broadcast/ unknown multicast/unknown unicast traffic on individual ports. When a type of incoming traffic exceeds the threshold you set, the system drops the packets exceeding the traffic limit to reduce the traffic ratio of this type to the reasonable range, so as to keep normal network service.
Table 1-2 Limit traffic on port
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Limit broadcast traffic received on each port |
broadcast-suppression { ratio | pps max-pps } |
Optional By default, the switch does not suppress broadcast traffic. |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Limit broadcast traffic received on the current port |
broadcast-suppression { ratio | bps max-bps | pps max-pps } |
Optional By default, the switch does not suppress broadcast traffic. |
Limit unknown multicast and unknown unicast traffic received on the current port |
multicast-suppression bps max-bps |
Optional The switch will suppress the unknown multicast and unknown unicast traffic simultaneously after the configuration. By default, the switch does not suppress unknown multicast and unknown unicast traffic. |
Enabling Flow Control on a Port
Flow control is enabled on both the local and peer switches. If congestion occurs on the local switch:
l The local switch sends a message to notify the peer switch of stopping sending packets to itself or reducing the sending rate temporarily.
l 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.
Table 1-3 Enable flow control on a port
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Enable flow control on the Ethernet port |
flow-control |
By default, flow control is not enabled on the port. |
Duplicating the Configuration of a Port to Other Ports
To make other ports have the same configuration as that of a specific port, you can duplicate the configuration of a port to specific ports.
Specifically, the following types of port configuration can be duplicated from one port to other ports: VLAN configuration, protocol-based VLAN configuration, LACP configuration, QoS configuration, GARP configuration, STP configuration and initial port configuration. For the detailed copy content, please refer to the Command Manual.
Table 1-4 Duplicate the configuration of a port to specific ports
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Duplicate the configuration of a port to specific ports |
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 } |
Required |
l If you specify a source aggregation group ID, the system will use 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.
Configure loopback detection for Ethernet port(s)
Loopback detection is used to monitor if a port of a switch is looped back.
After you enable loopback detection on Ethernet ports, the switch can monitor if an external loopback occurs on them. If there is a loopback port found, the switch will deal with the loopback port according to your configuration.
1) If a loop is found on an access port, the system will set the port to the block state (ports in this state cannot forward data packets), send log and trap messages to the terminal, and remove the corresponding MAC forwarding entry.
l If you have additionally enabled the loopback port auto-shutdown function on the port, the system will shut down the port, and send log and trap messages to the terminal. After the loop is removed, you need to use the undo shutdown command to bring up the port.
l If you have not enabled the loopback port auto-shutdown function on the port, the port will automatically resume the normal forwarding state after the loop is removed.
2) If a loop is found on a trunk or hybrid port, the system sends log and trap messages to the terminal. If you have additionally enabled the loopback port control function or the loopback port auto-shutdown function, the system will deal with the port accordingly:
l If the loopback port control function is enabled on the port, the system will set the port to the block state (ports in this state cannot forward data packets), send log and trap messages to the terminal, and remove the corresponding MAC forwarding entry. After the loop is removed, the port will automatically resume the normal forwarding state.
l If the loopback port auto-shutdown function is enabled on the port, the system will shut down the port and send log and trap messages to the terminal. After the loop is removed, you need to use the undo shutdown command to bring up the port.
You cannot enable both the loopback port control function and the loopback port auto-shutdown function on a port. If you do so, the function configured later will take effect.
Table 1-5 Configure loopback detection for Ethernet port(s)
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Enable loopback detection globally |
loopback-detection enable |
Optional By default, the global loopback detection function is enabled if the device boots with the default configuration file (config.def); if the device boots with null configuration, this function is disabled. |
Enable loopback detection on the specified ports in bulk |
loopback-detection interface-list enable |
Optional By default, the loopback detection function is enabled on ports if the device boots with the default configuration file (config.def); if the device boots with null configuration, this function is disabled. |
Set the interval for performing port loopback detection |
loopback-detection interval-time time |
Optional The default is 30 seconds. |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Enable loopback detection on a specified port |
loopback-detection enable |
Optional By default, the loopback detection function is enabled on ports if the device boots with the default configuration file (config.def); if the device boots with null configuration, this function is disabled. |
Enable loopback port control on the trunk or hybrid port |
loopback-detection control enable |
Optional By default, the loopback port control function is enabled on ports if the device boots with the default configuration file (config.def); if the device boots with null configuration, this function is disabled. |
Enable the loopback port auto-shutdown function |
loopback-detection shutdown enable |
Optional By default, the loopback port auto-shutdown function is enabled on ports if the device boots with the default configuration file (config.def); if the device boots with null configuration, this function is disabled. |
Configure the system to run loopback detection on all VLANs of the current trunk or hybrid port |
loopback-detection per-vlan enable |
Optional By default, the system runs loopback detection only on the default VLAN of the current trunk or hybrid port. |
l To enable loopback detection on a specific port, you must use the loopback-detection enable command in both system view and the specific port view.
l After you use the undo loopback-detection enable command in system view, loopback detection will be disabled on all ports.
Enabling Loopback Test
You can configure the Ethernet port to run loopback test to check if it operates normally. The port running loopback test cannot forward data packets normally. The loopback test terminates automatically after a specific period.
Table 1-6 Enable loopback test
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Enable loopback test |
loopback { external | internal } |
Optional |
l external: Performs external loop test. In the external loop test, self-loop headers must be used on the port of the switch ( for 100M port, the self-loop headers are made from four cores of the 8-core cables, for 1000M port, the self-loop header are made from eight cores of the 8-core cables, then the packets forwarded by the port will be received by itself.). The external loop test can locate the hardware failures on the port.
l 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.
Note that:
l After you use the shutdown command on a port, the port cannot run loopback test.
l You cannot use the speed, duplex, mdi and shutdown commands on the ports running loopback test.
l Some ports do not support loopback test, and corresponding prompts will be given when you perform loopback test on them.
Configuring a Port Group
To make the configuration task easier for users, certain devices allow users to configure on a single port as well as on multiple ports in a port group. In port group view, the user only needs to input the configuration command once on one port and that configuration will apply to all ports in the port group. This effectively reduces redundant configurations.
A Port group could be manually created by users. Multiple Ethernet ports can be added to the same port group but one Ethernet port can only be added to one port group.
Table 1-7 Configuring a Port Group
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Create a port group or enter the specified port group view |
port-group group-id |
Required |
Add an Ethernet port to a specified port group |
port interface-list |
Required |
l Only S3100-EI Series Ethernet Switches support Port Group feature.
l A port can not be added to a port group if it has been added to an aggregation group, and vice versa.
Enabling the System to Test Connected Cable
You can enable the system to test the cable connected to a specific port. The test result will be returned in five seconds. The system can test these attributes of the cable: Receive and transmit directions (RX and TX), short circuit/open circuit or not, the length of the faulty cable.
Table 1-8 Enable the system to test connected cables
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Enable the system to test connected cables |
virtual-cable-test |
Required |
l Currently, the device is only capable of testing the cable status and cable length. For the testing items that are currently not supported, “-” is displayed in the corresponding output fields.
l Cable test cannot be performed on an optical port.
Configuring the Interval to Perform Statistical Analysis on Port Traffic
By performing the following configuration, you can set the interval to perform statistical analysis on the traffic of a port.
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 this 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
Table 1-9 Set the interval to perform statistical analysis on port traffic
Operation |
Command |
Description |
Enter system view |
system-view |
— |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Set the interval to perform statistical analysis on port traffic |
flow-interval interval |
Optional By default, this interval is 300 seconds. |
Disabling Up/Down Log Output on a Port
An Ethernet port has two physical link statuses: UP and Down. When the physical link status of an Ethernet port changes, the switch will send log to the log server, which in turn acts accordingly. If the status of Ethernet ports in a network changes frequently, large amount of log information may be sent, which increases work load of the log server and consumes more network resources.
You can limit the amount of the log information sent to the log server by disabling the Up/Down log output function on Ethernet ports.
Disable Up/Down log output on a port
Table 1-10 Disable UP/Down log output on a port
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Disable a port from outputting UP/Down Log Information |
undo enable log updown |
Required By default, UP/Down log information output is enabled. |
Configuration example
# By default, a port is allowed to output the Up/Down log information. Execute the shutdown command or the undo shutdown command on Ethernet 1/0/1, and the system outputs Up/Down log information of Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] shutdown
%Apr 5 07:25:37:634 2000 Sysname L2INF/5/PORT LINK STATUS CHANGE:- 1 -
Ethernet1/0/1 is DOWN
[Sysname-Ethernet1/0/1] undo shutdown
%Apr 5 07:25:56:244 2000 Sysname L2INF/5/PORT LINK STATUS CHANGE:- 1 -
Ethernet1/0/1 is UP
# After you disable Ethernet 1/0/1 from outputting Up/Down log information and execute the shutdown command or the undo shutdown command on Ethernet 1/0/1, no Up/Down log information is output for Ethernet 1/0/1.
[Sysname-Ethernet1/0/1] undo enable log updown
[Sysname-Ethernet1/0/1] shutdown
[Sysname-Ethernet1/0/1] undo shutdown
Configuring Storm Control on a Port
The storm control function is used to control traffic received on an Ethernet port.
l With traffic upper and lower thresholds specified on a port, the system periodically collects statistics about the broadcast/multicast traffic on the port. Once it finds that a type of traffic exceeds the specified upper threshold, it blocks this type of traffic on the port or directly shuts down the port, and outputs trap/log information according to your configuration.
l When a type of traffic on the port falls back to the specified lower threshold, the system cancels the blocking of this type of traffic on the port or brings up the port to restore traffic forwarding for the port, and outputs log/trap information according to your configuration.
Follow these steps to configure storm control on a port:
To do... |
Use the command... |
Remarks |
Enter system view |
system-view |
— |
Set the interval at which the port collects traffic statistics |
storm-constrain interval interval-value |
Optional It is 10 seconds by default. |
Enter Ethernet port view |
interface interface-type interface-number |
— |
Set the upper and lower thresholds of broadcast/multicast traffic received on the port |
storm-constrain { broadcast | multicast } max-packets min-packets { pps | kbps } |
Required |
Set the action to be taken when a type of traffic received on the port exceeds the upper threshold. |
storm-constrain control { block | shutdown } |
Optional By default, no action is taken when a type of traffic reaches the upper threshold. |
Enable log/trap information to be output when a type of traffic received on the port exceeds the upper threshold or falls below the lower threshold |
storm-constrain enable { log | trap } |
Optional Enabled by default. |
l If the broadcast-suppression command, or multicast-suppression command is configured on a port, you cannot configure the storm control function on the port, and vice versa.
l You are not recommended to set the upper and lower traffic thresholds to the same value.
l If you specify the block keyword when executing the storm-constrain control command, only the packets beyond the upper thresholds are blocked when the overall traffic exceeds the upper threshold. In this case, the blocked packets are still taken into account when generating traffic statistics. If you specify the shutdown keyword when executing the command, the port will be shut down when the traffic passing through the port exceeds the upper threshold. You bring up the port again by executing the undo shutdown or the undo storm-constrain { all | broadcast | multicast } command.
Setting the Port State Change Delay
During a short period after you connect your switch to another device, the connecting port may go up and down frequently due to hardware compatibility, resulting in service interruption.
To avoid situations like this, you may introduce a port state change delay.
The port state change delay takes effect when the port goes down but not when the port goes up.
Table 1-11 set the port state change delay
Operation |
Command |
Remarks |
Enter system view |
system-view |
— |
Enter Ethernet interface view |
interface interface-type interface-number |
— |
Set the port state change delay |
link-delay delay-time |
Required Defaults to 0, which indicates that no delay is introduced. |
The delay configured in this way does not take effect for ports in DLDP down state. For information about the DLDP down state, refer to DLDP.
Displaying and Maintaining Basic Port Configuration
Table 1-12 Display and maintain basic port configuration
Operation |
Command |
Remarks |
Display port configuration information |
display interface [ interface-type | interface-type interface-number ] |
You can execute the display commands in any view. |
Display the enable/disable status of port loopback detection |
display loopback-detection |
|
Display information for a specified port group (Only S3100-EI Series switches support this feature) |
display port-group group-id |
|
Display brief information about port configuration |
display brief interface [ interface-type [ interface-number ] ] [ | { begin | include | exclude } regular-expression ] |
|
Display the combo ports on the current device |
display port combo |
|
Display port information about a specified unit |
display unit unit-id interface |
|
Display the storm control configurations. |
display storm-constrain [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ] |
|
Display the information about the port with the link-delay command configured |
display link-delay |
|
Clear port statistics |
reset counters interface [ interface-type | interface-type interface-number ] |
You can execute the reset command in user view. After 802.1x is enabled on a port, clearing the statistics on the port will not work. |
Ethernet Port Configuration Example
Network requirements
l Switch A and Switch B are connected to each other through two trunk port (Ethernet 1/0/1).
l Configure the default VLAN ID of both Ethernet 1/0/1 to 100.
l Allow the packets of VLAN 2, VLAN 6 through VLAN 50 and VLAN 100 to pass both Ethernet 1/0/1.
Network diagram
Figure 1-1 Network diagram for Ethernet port configuration
Configuration procedure
l Only the configuration for Switch A is listed below. The configuration for Switch B is similar to that of Switch A.
l This example supposes that VLAN 2, VLAN 6 through VLAN 50 and VLAN 100 have been created.
# Enter Ethernet 1/0/1 port view.
<Sysname> system-view
[Sysname] interface ethernet1/0/1
# Set Ethernet 1/0/1 as a trunk port.
[Sysname-Ethernet1/0/1] port link-type trunk
# Allow packets of VLAN 2, VLAN 6 through VLAN 50 and VLAN 100 to pass Ethernet1/0/1.
[Sysname-Ethernet1/0/1] port trunk permit vlan 2 6 to 50 100
# Configure the default VLAN ID of Ethernet1/0/1 to 100.
[Sysname-Ethernet1/0/1] port trunk pvid vlan 100
Troubleshooting Ethernet Port Configuration
Symptom: Fail to configure the default VLAN ID of an Ethernet port.
Solution: Take the following steps.
l Use the display interface or display port command to check if the port is a trunk port or a hybrid port.
l If the port is not a trunk or hybrid port, configure it to be a trunk or hybrid port.
l Configure the default VLAN ID of the port.