What is the difference between tagged and untagged VLAN

This tutorial explains the difference between tagged and untagged vlans.

The content is a preview from the book – 250 Networking Interview questions and answers

Buy from Amazon

Take a scenario where a switch port is a member of untagged vlan 2 and tagged
vlan 3 and vlan 4. The generic design of the switch states that a port can be a
member of only 1 untagged vlan and multiple tagged vlan. Assume that the switch
port is connected to a hub, on which there are three PC‟s. PC1 is a member of vlan
2, PC2 is a member of vlan 3 and PC3 is a member of vlan 4. When the data from
the PC‟s (ethernet frames) reaches the switch port, the switch would consider that
all the frames are members of vlan 2, since the port is a member of untagged vlan
2. So how can we differentiate. The network cards on PC2 and PC3 should be
configured with 802.1q tagged frames with the appropriate vlan numbers as 3 & 4.
When this is configured, the data (frames) send by PC2 and PC3 would be 802.1q
encapsulated with the appropriate vlan numbers. This is known as tagged frames.
When the tagged frames reach the port on the switch, the differentiation can be
made by looking into the value ( 3 or 4) inside the frame. Earlier since the frames
were not tagged, the differentiation was not possible making the switch believe that
all traffic belonged to untagged vlan 2

The content is a preview from the book – 250 Networking Interview questions and answers