96 CHAPTER 9: PORT BASIC CONFIGURATION
c
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.
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.
n
The access ports or hybrid ports must be added to an existing VLAN.
Ethernet Port
Configuration
Initially Configuring a
Port
Tabl e 55 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.
■ If the VLAN ID is just the
default VLAN ID, receive
the packet.
■ If the VLAN ID is not the
default VLAN ID, discard
the packet.
Deprive the tag from the packet
and send the packet.
Trunk ■ If the VLAN ID is just the
default VLAN ID, receive
the packet.
■ 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.
■ 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.
■ If the VLAN ID is just the default
VLAN ID, deprive the tag and
send the packet.
■ 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).
Tabl e 56 Initially configure a port
Operation Command Remarks
Enter system view system-view -
Enter Ethernet port view interface interface-type
interface-number
-