What's new

VLAN tags within switches

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

eosis

New Around Here
I have been using a VLAN to separate my VoIP and data networks for a while now, and have just begun to wonder about the behaviour of the 802.1q tags within the switch itself.

The switch I'm using is a Netgear GS108E, which accomplishes VLANs through assigning ports to different VLANS

I have been wondering, though, if an 802.1q VLAN tag is added or removed to packets entering the switch before being interpreted, or if the switch just knows that it shouldn't forward packets between certain ports.

Ie, if a packet arrived into the switch with a VLAN tag already present in its ethernet header, would this tag be changed inside the switch, or just remain the same?


Any knowledge would be appreciated.
 
All depends on whether the switch you are connecting to supports VLAN tags.
 
A switch makes the decision based on VLAN, then MAC address.

Scenario:

Frame received on port 1 (access port: VLAN 100) from MAC A destined for MAC B.

Switch:

  • Adds MAC A on Port 1 to MAC table
  • checks MAC table for VLAN 100 to see if MAC B is there
  • if yes, sends to port assignment in MAC table
  • if no, floods to all ports assigned to VLAN 100 except the one it was received on
  • The frame that leaves the interface will be tagged or untagged according to how the port/VLAN is configured
The switch would ignore a MAC B match in other VLANs. Frames received on "wrong" VLANs would likely be dropped, depending on how the switch is configured.

Given that the tag/untagged status will change depending on the egress port, we can safely assume that the frame header will change then if necessary, but any time before that is speculative. I doubt it, primarily for reasons of efficiency.
 
If a tagged packet arrives at a port that is not tagged for that VLAN, then that packet will be untagged. It will then be assigned to the VLAN of that ports PVID. Now it will go to the other ports of the switch in that VLAN.

Either that or it will be dropped. I don't think it will be dropped though.
 
Similar threads
Thread starter Title Forum Replies Date
D VLAN Config Query using pfSense and Unifi Switches, NICs and cabling 18

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top