A trunk port on an Ethernet switch is one that is capable of forwarding Ethernet frames on multiple VLANs through the mechanism of VLAN tagging. IEEE 802.1Q specifies the standard method for VLAN tagging.
A trunk link is a connection between two devices across trunk ports. This connection can be between a router and a switch, between two switches, or between a switch and an IP telephone. Some form of trunking or forwarding multiple VLANs must be enabled to permit the IP telephone and the attached personal computer to appear on separate VLANs. The following commands enable VLAN trunking.
Table 1: Commands for VLAN trunking
Cisco IOS |
Cisco CatOS |
switchport mode trunk By default, all VLANs (1 to 4094) are enabled on the trunk port. Switches supporting ISL trunking have different commands for trunk setup. For more information, see the IOS manual. |
set trunk <mod/port> nonegotiate dot1q By default, all VLANs (1 to1005) are enabled on the trunk port. VLANs can be selectively removed with the command clear trunk <mod/port> <vid> |
Note that Cisco and other vendor switches can remove VLANs from a trunk port. This feature is highly desirable because only a maximum of two VLANs should appear on a trunk port that is connected to an IP telephone. That is, broadcasts from nonessential VLANs should not be permitted to bog down the link to the IP telephone. Cisco IOS switches can have an implicit trunk that contains only two VLANs, one for data and one for voice. You can configure an implicit trunk using the following commands: