How to Configure a Trunk Port.
To configure a switch port as a trunk link, use the switchport mode trunk command. This command puts the interface into permanent trunking mode and negotiates to convert the neighboring switch or links into trunk links.
Note: A trunk port is a port that is configured to carry traffic for all the VLANs on a switched network,
Trunk ports mark frames traffic with unique identifying tags – either 802.1Q tags or Inter-Switch Link (ISL) tags as they move between switches.
Lets use the topology below foe a it demo.
The VLANs 10, 20, and 30 will support the management, IT, and Sales computers, PC1, PC2, and PC3. The F0/1 port on switch S1 will be configured as a trunk port and will forward traffic for VLANs 10, 20, and 30.
SW1(config-if)#switchport mode trunk
Fa0/1 is a native VLAN which is a default VLAN and is normally used to manage switches. But converting it to trunk mode is an added security!. However, you can change or modify a native VLAN. This I said earlier is added security.
Use the following command to move or assign another switch port as native VLAN:
SW1(config-if)#switchport trunk native vlan 20
The show interface fa0/1 or show running-config command reveals that the trunk has been configured or not.