Vlan – Aren’t Switch Access ports tagged

trunkvlan

I've read that frames are tagged only when going over a trunk port and that access ports do not tag frames passing through them. But don't access ports actually tag frames? When I configure a particular port to be in a particular VLAN (for example VLAN 5), when traffic comes into the access port from a PC, isn't that frame then being tagged with the respective VLAN configured for that port? If the frame is not tagged by the switch's access port (assuming that the access port is not configured with a native VLAN, but another VLAN, for example VLAN5), then how would a trunk know what tag (VLAN 5) to put on that frame as it sends it across the trunk. If I'm able to configure a switch's access port to belong to a particular VLAN, then why wouldn't the switch tag the frame as it enters the switch access port? Isn't this the point of configuring an access port with a certain (non native) VLAN – to tag the frame to delimit where the frame can travel? Also, wouldn't the frame need to be tagged when entering the switch access port from the PC, so then the switch would know (if it was a broadcast) to where the broadcast should be delimited to (only ports within that VLAN)?

Best Answer

I think you're confusing what goes on internally on the switch. How it keeps track of which ports are in which VLAN is up to the manufacturer.

It's important to remember that 802.1q frames are a different format than "standard" Ethernet (802.3). Standard Ethernet frames do not have VLAN IDs. A PC or other device transmits and receives Ethernet frames (802.3) when they send/receive it to/from an access port of a switch.

When a switch transmits frames on a trunk, it uses 802.1q framing, which includes a VLAN tag. If the switch is transmitting frames with tags, then that port is a trunk port. Most hosts do not understand 802.1q frames, so they ignore them. That is why you can have tagged and untagged frames on the same port. But it's still a trunk port.

Related Topic