What exactly happens when switch receives the frame with given EtherType? Does it analyze it at all or only looks if the TPID is present?
2 Answers
Switches are transparent devices, and they simply don't care about the payload of a frame. A switch is only concerned with the source and destination MAC addresses, and a VLAN tag if the frame happens to use a trunk.
A switch will use the source MAC address to build or update its MAC address table, and it will use the destination MAC address to figure out to which interface it should forward the frame by searching for the destination MAC address in its MAC address table.
-
3The switch examines EtherType, to see if the frame is a special frame called a Bridge Protocol Data Unit. Those frames are valid only between switch neighbours and they go to the CPU of the switch. All other traffic takes the forwarding path; that is, to the egress queue indicated by the destination MAC address in that VLAN's MAC address table.– vk5tuNov 22, 2016 at 4:58
-
2BPDUs are determined by the special layer-2 multicast address:
01-80-C2-00-00-01
for 802.1D compliant switches. Cisco has its own layer-2 address for PVST+.. In fact, the OUI,01-80-C2
is a special multicast OUI that an 802.1D compliant switch will not forward to other interfaces.– Ron Maupin ♦Nov 22, 2016 at 5:02 -
@vk5tu Ron's right: first, the switch needs the multicast address to get a BPDU forwarded to the CPU. It's there that the Ethertype is analyzed and the BPDU is handed over to the STP protocol engine.– Zac67 ♦Dec 3, 2018 at 21:17
-
What about trunk ports of a switch? Doesn't the switch examine TPID for ingress packets on these kind of ports to determine if the packet is dot1q/QinQ? Dec 4, 2018 at 5:34
I think TPIDs are analyzed in case the frame arrives on a Trunk port, in which case the switch has to determine the VLAN header structure (is it a Dot1q, QinQ or a native VLAN frame) in order to assign the frame to the correct VSI.