16/24-Port PoE Switch
©r------------------'
6.2.3 802.1 Q VLAN
The frames of the switch have tag frame and untag frame. Refer to the following figure for tag
position.
Destination
Source
L€'1gl
FCS (:RC
.£!..ddress
.£!..ddress
h/1)1)
Data
32)
3 b'ytes
6 :)'yi:es
2 b)les
46 ~ 1500 b)les
4 b)les
CFI
V
L
AN
ID
3 bits
I
bi
t
s
12 bits
Figure 6-5
Untag is the general Ethernet frame. The network adapter of the general PC can recognize
the frame and then communicate.
For tag frame, it adds the 4bytes vlan information after the source mac address and the
destination address. It is the blue pane(the vlan tag head) in the above figure. Usually, the
network adapter of the general PC cannot recognize this kind of frame, switch needs to use
vlan tag to distinguish different VLANs, so that different VLANs cannot communicate with
each other. Sometimes, it needs to communicate among different VLANs. So, there are
different port types to allow the VLANs to communicate.
The port has three types:
• Access type port belongs to one VLAN. It is usually to connect to the computer port.
• Trunk type port allows several VLANs to pass and can receive or send out the frame of
several VLANs. Usually it is for the ports of the switch.
• Hybrid type can allow many VLANs to pass and can receive or send out the frame of
several VLANs. It is to connect the switches and for the PCs of users.
When processing the data, the hybrid port and the trunk port are the same. The only
difference is when they are sending data: Hybrid port can send out frame of several VLANs
and without a tag, while the Trunk port can only send out the default VLAN frame without a
tag.
Refer to table 6-1 for linkage type and frame processing methods for default VLAN.
Port Type For frames without Tag For frames with Tag For the frames to be sent out
Access
Receive the frame and put When VLAN ID is the
Remove Tag and send out the
the Tag of the default VLAN. same as the default VLAf\ frame.
ID, receive current frame.
When the VLAN ID is
different from the default
VLAN ID, discard the
frame.
Port Type For frames without Tag For frames with Tag For the frames to be sent out
Trunk
Put the default VLAN ID,
When the VLAN ID is in
When VLAN ID is the same as the
when the default VLAN ID
the accepted list, receive default VLAN ID, and it is on the
is in the accepted list,
the frame.
receive the frame and put
When the VLAN ID is in
Hybrid
the default VLAN Tag.
the blocked list, discard
Put the default VLAN ID,
the frame.
when the default VLAN ID
is in the blocked list,
discard the frame.
Table 6-1
Config example.
1. Network connection
accepted list, remove the tag and
send out the frame.
When VLAN ID is on the accepted
list, send out the frame. Use "port
hybrid untagged/tagged vlan" to
set with Tag or not when sending
out.
PC1 and IPC2 belong to one department, PC2 and IPC1 belong to one department, it can
realize intercommunication within the department, but it fails to realize communication
between departments.
IPCl
2. Hardware connection
Switch[\
VJ.an 3
Part 2
Vlao 4
Port 3
Figure 6-6
Switch 8
Vlon 2
Port 2
ll'C2
(1) PC1 connects to port 1 of switch A, and it belong to vlan2, IPC1 connects to port 2 of
switch A, and it belongs to vlan3;
(2) PC2 connects to port 1 of switch B, and it belong to vlan3, IPC2 connects to port 2 of
switch B, and it belongs to vlan2;
(3) Port 3 of switch A connects to port 3 of switch B, and it belongs to vlan4.
3. Settings
switch A: Port 1 belongs to vlan2, configured as Access port, port 2 belongs to vlan3,
configured as Access port, port 3 configured as trunk port, and it belongs to vlan4, and
it allows vlan2, 3 and 4 to pass.
Switch B: Port 1 belongs to vlan2, configured as Access port, port 2 belongs to vlan3,
configured as Access port, port 3 configured as trunk port, and it belongs to vlan4, and
it allows vlan2, 3 and 4 to pass.