Introduction to VLANs

Hello Justin

Let’s say a switch has 24 access ports where ports 1-12 are on VLAN 10 and ports 13-24 are on VLAN 20. Let’s say a broadcast frame is sent on port 1. The switch will receive that frame and send it out of ports 2 to 12. Why? Because it knows that it entered port 1, therefore it is on VLAN 10, therefore it will send it out of all ports that have been configured on VLAN 10. It doesn’t even look at the details of the frame itself, because there is no data in the frame that gives the switch VLAN information. The information comes only from the fact that the egress port is on VLAN 10.

Now if we have a trunk, where multiple VLANs are used, the frame must have additional information in order for the switch to determine on which VLAN to place it. However, when a tagged frame enters a trunk port, the tag is immediately stripped, and the frame is forwarded only to ports that are configured on the VLAN of the tag that was just removed.

The CAM table has nothing to do with the VLANs that ports belong to. The CAM table will map MAC addresses to ports. If a frame enters a port on VLAN 10, with a destination MAC address of a device on VLAN 20, even if that entry is in the CAM table, the switch will not allow this frame to be forwarded due to the mismatch in VLANs.

I hope this has been helpful!

Laz

3 Likes