Trunking is a term used to describe connecting two switches together. Trunking is important when you configure VLANs that span multiple switches as shown in the diagram.
Be aware of the following facts regarding trunking and VLANs:
- In the above graphic, each switch has two VLANs. One port on each switch has been assigned to each VLAN.
- Workstations in VLAN 1 can only communicate with workstations in VLAN 1. This means that the two workstations connected to the same switch cannot communicate with each other. Communications within the VLAN must pass through the trunk link to the other switch.
- Trunk ports identify which ports are connected to other switches.
- Trunk ports are automatically members of all VLANs defined on the switch.
- Typically, Gigabit Ethernet ports are used for trunk ports.
When trunking is used, frames that are sent over a trunk port are tagged with the VLAN ID number so that the receiving switch knows to which VLAN the frame belongs. Cisco supports two trunking protocols that are used for tagging frames.
Cisco switches have the ability to automatically detect ports that are trunk ports, and to negotiate the trunking protocol used between devices. Switches use the Dynamic Trunking Protocol (DTP) to detect and configure trunk ports. For example, when you connect two switches together, they will automatically recognize each other and select the trunking protocol to use.