im struggling to understand how VLAN dot1q tags are handled internaly on the switch. When a frame enters an access port in say vlan 5 is it tagged ingress on the switch so the switch knows what vlan it belongs to. what about with a dot1q when a frame is received tagged on a dot1q trunk is the tag retained so the switch knows how to handle the packet internaly.
Any clarrification on this appreciated.
When a switch receives a tagged frame on a trunk port the tag is removed and the frame then forwarded to either
1) the mac-address of the destination in that vlan
2) all ports in that vlan if the destination mac-address is unknown. This may also include other trunk links in which case the packet will have a tag added to it again.
Switches keep a per vlan mac-address table so once the tag has been removed the switch simply refers to the mac-address table for that vlan.