IEEE 802.1Q is the networking standard that supports virtual LANs (VLANs) on an Ethernet network. The standard defines a system of VLAN tagging for Ethernet frames and the accompanying procedures to be used by bridges and switches in handling such frames.
802.1Q frame tagging
Configuration:
Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Swith(config)#int fastEthernet 0/1 Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk encapsulation dot1q
DTP
The Dynamic Trunking Protocol (DTP) is a proprietary networking protocol developed by Cisco Systems for the purpose of negotiating trunking on a link between two VLAN-aware switches, and for negotiating the type of trunking encapsulation to be used.
Administrative Mode Combinations and their Operational Modes
DTP is not recommended by Cisco. To disable auto-negotiation which is enabled by default run command:
Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int fastEthernet 0/1 Switch(config-if)#switchport nonegotiate
Troubleshooting commands:
Switch#show interface fastEthernet 0/1 switchport ! Switch#show interface trunk