06-Port Basic Configuration Operation

Download


Chapter 1  Port Basic Configuration

1.1  Ethernet Port Overview

1.1.1  Types and Numbers of Ethernet Ports

Table 1-1 lists the types and numbers of the Ethernet ports and the numbers of the expansion slots available on the S3100-SI series Ethernet switches.

Table 1-1 Description of Ethernet ports and expansion slots

Device Model

Type and number of fixed ports

Number of expansion slots

S3100-26T-SI Ethernet switch

24 ´ 10/100BASE-TX auto-sensing ports

Two 10/100/1000BASE-T ports

None

S3100-16T-SI Ethernet switch

16 ´ 10/100BASE-TX auto-sensing ports

One 10/100/1000BASE-T port

None

S3100-8T-SI Ethernet switch

Eight 10/100BASE-TX auto-sensing ports

One 10/100/1000BASE-T port

None

S3100-26C-SI Ethernet switch

24 ´ 10/100BASE-TX auto-sensing ports

2

S3100-16C-SI Ethernet switch

16 ´ 10/100BASE-TX auto-sensing ports

2

S3100-8C-SI Ethernet switch

Eight 10/100BASE-TX auto-sensing ports

1

 

The Ethernet ports of the S3100-SI series switches have the following characteristics:

l           The 10/100BASE-TX Ethernet ports support MDI/MDI-X autosensing. By manual configuration or autonegotiation, they can operate in 100 Mbps half-duplex/full-duplex or 10 Mbps half-duplex/full-duplex.

l           The 10/100/1000BASE-T Ethernet ports support manual MDI/MDI-X configuration. By manual configuration or autonegotiation, they can operate in 1000 Mbps full-duplex, 100 Mbps half-duplex/full-duplex and 10 Mbps half-duplex/full-duplex.

1.1.2  Link Types of Ethernet Ports

An Ethernet port of the S3100-SI switch can operate in three different link types:

l           Access: An access port can belong to only one VLAN, and is generally used to connect user PCs.

l           Trunk: A trunk port can belong to more than one VLAN. It can receive/send packets from/to multiple VLANs, and is generally used to connect another switch.

l           Hybrid: A hybrid port can belong to more than one VLAN. It can receive/send packets from/to multiple VLANs, and can be used to connect either a switch or user PCs.

 

&  Note:

A hybrid port allows the packets of multiple VLANs to be sent without tags, but a trunk port only allows the packets of the default VLAN to be sent without tags.

 

You can configure all the three types of ports on the same device. However, note that you cannot directly switch a port between trunk and hybrid and you must set the port as access before the switching. For example, to change a trunk port to hybrid, you must first set it as access and then hybrid.

1.1.3  Configuring the Default VLAN ID for an Ethernet Port

An access port can belong to only one VLAN. Therefore, the VLAN an access port belongs to is also the default VLAN of the access port. A hybrid/trunk port can belong to several VLANs, and so a default VLAN ID for the port is required.

l           After you configure default VLAN IDs for Ethernet ports, the packets passing through the ports are processed in different ways depending on different situations:

Table 1-2 Processing of incoming/outgoing packets

Port type

Processing of an incoming packet

Processing of an outgoing packet

If the packet does not carry a VLAN tag

If the packet carries a VLAN tag

Access

Receive the packet and add the default tag to the packet.

l      If the VLAN ID is just the default VLAN ID, receive the packet.

l      If the VLAN ID is not the default VLAN ID, discard the packet.

Deprive the tag from the packet and send the packet.

Trunk

l      If the VLAN ID is just the default VLAN ID, receive the packet.

l      If the VLAN ID is not the default VLAN ID but is one of the VLAN IDs allowed to pass through the port, receive the packet.

l      If the VLAN ID is neither the default VLAN ID, nor one of the VLAN IDs allowed to pass through the port, discard the packet.

l      If the VLAN ID is just the default VLAN ID, deprive the tag and send the packet.

l      If the VLAN ID is not the default VLAN ID, keep the original tag unchanged and send the packet.

Hybrid

Send the packet if the VLAN ID is allowed to pass through the port. Use the port hybrid vlan command to configure whether the port tags the packet when sending a packet in this VLAN (including default VLAN).

 

  Caution:

To guarantee the proper packet forwarding, the default VLAN ID of the local hybrid port or trunk port should be identical with that of the hybrid port or trunk port on the peer switch.

 

1.1.4  Adding an Ethernet Port to Specified VLANs

You can add the specified Ethernet port to a specified VLAN. After that, the Ethernet port can forward the packets of the specified VLAN, so that the VLAN on this switch can intercommunicate with the same VLAN on the peer switch.

An access port can only be added to one VLAN, while hybrid and trunk ports can be added to multiple VLANs.

Note that the port shall be added to an existing VLAN.

1.2  Configuring Ethernet Ports

1.2.1  Making Basic Port Configuration

Table 1-3 Make basic port configuration

Operation

Command

Remarks

Enter system view

system-view

Enter Ethernet port view

interface interface-type interface-number

Enable the Ethernet port

undo shutdown

By default, the port is enabled.

Use the shutdown command to disable the port.

Set the description of the Ethernet port

description text

By default, no description is defined for an Ethernet port.

Set the duplex mode of the Ethernet port

duplex { auto | full | half }

The port defaults to auto (autonegotiation) mode.

Set the rate of the Ethernet port

speed { 10 | 100 | 1000 | auto }

By default, the speed of the port is set to auto mode.

Set the MDI attribute of the Ethernet port

mdi { across | auto | normal }

Be default, the MDI attribute of the port is relevant to the port type.

 

The MDI attribute that the port supported is relevant to the port type. Please refer to Table 1-4 (Y for supported and N for not supported).

Table 1-4 Port type and MDI attribute

Port type

MDI auto

MDI across

MDI normal

Default

100Mbps fixed electrical port

Y

Y

Y

Normal

Currently, the mdi auto command is not supported. However, an port operates in MDI auto-sensing mode automatically when the duplex setting or speed setting is set to auto.

1000Mbps fixed electrical port

Y

N

N

auto

1000Mbps electrical port of expansion interface card

N

Y

Y

normal

All optical ports

N

N

N

POE interface card

N

N

Y

normal

Stack card

N

N

N

 

1.2.2  Setting the Ethernet Port Broadcast Suppression Ratio

You can use the broadcast-suppression commands to restrict the broadcast traffic allowed to pass through a port. After that, if the broadcast traffic on the port exceeds the value you set, the system will maintain an appropriate broadcast traffic ratio by discarding the overflow traffic, so as to suppress broadcast storm, avoid network congestion and ensure normal network services.

You can execute the broadcast-suppression command in system view or Ethernet port view:

l           If you execute the command in system view, the command takes effect on all ports.

l           If you execute the command in Ethernet port view, the command takes effect only on current port.

Table 1-5 Set the Ethernet port broadcast suppression ratio

Operation

Command

Remarks

Enter system view

system-view

Set the global broadcast suppression ratio

broadcast-suppression ratio

By default, the ratio is 100%, that is, the system does not suppress broadcast traffic globally.

Enter Ethernet port view

interface interface-type interface-number

Set the broadcast suppression ratio on current port

broadcast-suppression ratio

By default, the ratio is 100%, that is, the system does not suppress broadcast traffic on the port.

 

1.2.3  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-6 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.

 

1.2.4  Configuring Access Port Attribute

Table 1-7 Configure access port attribute

Operation

Command

Remarks

Enter system view

system-view

Enter Ethernet port view

interface interface-type interface-number

Configure the link type for the port as access

port link-type access

By default, the link type for the port is access.

Add the current access port into the specified VLAN

port access vlan vlan-id

Optional

 

1.2.5  Configuring Hybrid Port Attribute

Table 1-8 Configure hybrid port attribute

Operation

Command

Remarks

Enter system view

system-view

Enter Ethernet port view

interface interface-type interface-number

Set the link type for the port as hybrid

port link-type hybrid

Required

Set the default VLAN ID for the hybrid port

port hybrid pvid vlan vlan-id

Optional

By default, the VLAN of a hybrid port is VLAN 1.

Add the current hybrid port into the specified VLAN

port hybrid vlan vlan-id-list { tagged | untagged }

Optional

For a hybrid port, you can configure to tag the packets of specific VLANs, based on which the packets of those VLANs can be processed in differently ways.

 

1.2.6  Configuring Trunk Port Attribute

Table 1-9 Configure trunk port attribute

Operation

Command

Remarks

Enter system view

System-view

Enter Ethernet port view

interface interface-type interface-number

Set the link type for the port as trunk

port link-type trunk

Required

Set the default VLAN ID for the trunk port

port trunk pvid vlan vlan-id

Optional

By default, the VLAN of a trunk port is VLAN 1.

Add the current trunk port into the specified VLAN

port trunk permit vlan { vlan-id-list | all }

Optional

 

1.2.7  Copying Port Configuration to Other Ports

To keep the configuration of some other ports consistent with a specified port, you can copy the configuration of the specified port to these ports.

The configuration may include:

l           VLAN settings: Includes the permitted VLAN types and default VLAN ID.

l           QoS settings: Includes traffic limiting, priority marking and default 802.1p priority.

l           STP settings: Includes STP enabling/disabling, link attribute (point-to-point or not), STP priority, path cost, maximum transmission speed, loop protection, root protection, and edge port or not.

l           Port setting: Includes port link type, port speed, and duplex mode.

Table 1-10 Copy port configuration to other ports

Operation

Command

Remarks

Enter system view

system-view

Copy port configuration to other 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 }

Optional

 

&  Note:

l      If you specify the 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 the destination aggregation ID, the configuration of the source port will be copied to all ports in the aggregation group.

 

1.2.8  Setting Loopback Detection for an Ethernet Port

Loopback detection is used to monitor if loopback occurs on a switch port.

After you enable loopback detection on Ethernet ports, the switch can monitor if external loopback occurs on them. If there is a loopback port found, the switch will put it under control.

l           If loopback is found on an access port, the system disables the port, sends a Trap message to the client and removes the corresponding MAC forwarding entry.

l           If loopback is found on a trunk or hybrid port, the system sends a Trap message to the client. When the loopback port control function is enabled on these ports, the system disables the port, sends a Trap message to the client and removes the corresponding MAC forwarding entry.

Table 1-11 Set loopback detection for an Ethernet port

Operation

Command

Remarks

Enter system view

system-view

Enable loopback detection globally

loopback-detection enable

Optional

By default, loopback detection is not enabled globally.

Set time interval for port loopback detection

loopback-detection interval-time time

Optional

The default interval is 30 seconds.

Enter Ethernet port view

interface interface-type interface-number

Enable loopback detection on current port

loopback-detection enable

Optional

By default, port loopback detection is not enabled.

Enable loopback port control on the current trunk or hybrid port

loopback-detection control enable

Optional

By default, loopback port control is not enabled.

Configure the system to run loopback detection on all VLANs for the current trunk or hybrid ports

loopback-detection per-vlan enable

Optional

By default, the system runs loopback detection only on the default VLAN for the trunk or hybrid ports.

Display port loopback detection information

display loopback-detection

Optional

You can use the command in any view.

 

  Caution:

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.

 

1.2.9  Configuring the Ethernet Port to Run 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-12 Configure the Ethernet port to run loopback test

Operation

Command

Remarks

Enter system view

system-view

Enter Ethernet port view

interface interface-type interface-number

Configure the Ethernet port to run loopback test

loopback { external | internal }

Optional

 

&  Note:

l      external: Performs external loop test. In the external loop test, self-loop headers (which are made from four cores of the 8-core cables) must be used on the port of the switch. 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.

 

After you use the shutdown command on a port, the port cannot run loopback test. You cannot use the speed, duplex, mdi and shutdown commands on the ports running loopback test. Some ports do not support loopback test, and corresponding prompts will be given when you perform loopback test on them.

1.2.10  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 minutes. 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-13 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

 

1.2.11  Enabling Giant-Frame Statistics Function

The giant-frame statistics function is used to ensure transmission of network traffic and to facilitate statistics and analysis of unusual traffic on the network.

Table 1-14 Enable the giant-frame statistics function

Operation

Command

Description

Enter system view

system-view

Enable the giant-frame statistics function

giant-frame statistics enable

Optional

By default, the giant-frame statistics function is not enabled.

 

1.2.12  Displaying and Debugging Ethernet Port

After the above configuration, enter the display commands in any view to display the running of the Ethernet port configuration, and thus verify your configuration.

Enter the reset counters command in user view to clear the statistics of the port.

Table 1-15 Display and debug Ethernet port

Operation

Command

Remarks

Display port configuration information

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

You can use the commands in any view.

Display port loopback detection state

display loopback-detection

Display brief configuration information about one or all ports

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

Display hybrid or trunk ports

display port { hybrid | trunk | combo }

Clear the statistics of the port

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

After 802.1X is enabled, the port information cannot be reset.

 

1.3  Ethernet Port Configuration Example

I. Network requirements

l           Switch A is connected to Switch B through trunk port Ethernet1/0/1.

l           Configure the default VLAN ID for the trunk port as 100.

l           Allow the packets of VLAN 2, VLAN 6 through VLAN 50 and VLAN 100 to pass the port.

II. Network diagram

Figure 1-1 Network diagram for default VLAN ID configuration

III. Configuration procedure

 

&  Note:

The following configuration is used for Switch A. Configure Switch B in the similar way.

 

# Enter Ethernet1/0/1 port view.

[H3C] interface Ethernet1/0/1

# Set Ethernet1/0/1 as a trunk port and allow the packets of VLAN 2, VLAN 6 through VLAN 50 and VLAN 100 to pass the port.

[H3C-Ethernet1/0/1] port link-type trunk

[H3C-Ethernet1/0/1] port trunk permit vlan 2 6 to 50 100

# Create VLAN 100.

[H3C] vlan 100

# Configure the default VLAN ID of Ethernet1/0/1 as 100.

[H3C-Ethernet1/0/1] port trunk pvid vlan 100

1.4  Troubleshooting Ethernet Port Configuration

Symptom: Default VLAN ID configuration failed.

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. If not, configure it as a trunk port or a hybrid port.

l           Configure the default VLAN ID.

 


download
>

Related Documentation