So here are the basic principles of the switch ports.
The ports of a switch is in dynamic, desirable mode by default.
If the device connected to the port is a computer.
The mode of the port becomes access and the port is dedicated to that computer.
If the device is another switch, the mode of the port becomes a trunk.
So by default, trunk ports have access to all VLANs and pass traffic for multiple VLANs across the
same physical link generally between switches.
So switch spoofing is a type of Vlan hopping attack that works by taking advantage of an incorrectly
configured trunk port.
In a switch spoofing attack.
The network attacker configures a system to spoof itself as a switch.
So this spoofing requires the network attacker be capable of emulating 802.1 Q and Http messages.
By tricking a switch into thinking that another switch is attempting to form a trunk.
An attacker can gain access to all the VLANs allowed on the trunk port.
So the best way to prevent a basic switch spoofing attack is to turn off trunking on all ports except
the ones that specifically require trunking on the required trunking ports.
Disable DTP dynamic trunking protocol and manually enable trunking.