(config)#interface g0/0
(config-if)#switchport mode trunk
Command rejected: An interface whose trun encapsulation is “Auto” can not be configured to “trunk” mode.
^ If the command is rejected (such as on an older switch) first configure the port to use dot1q
(config-if)#switchport trunk encapsulation dot1q
(config-if)#switchport mode trunk
#show interfaces trunk
^ Shows which ports are configured for trunking, which Vlans are allowed on the trunk, which Vlans are allowed and active
#show vlan brief
; Shows each vlan and which ports are configured to use them
#int g0/0
(config-if)#switchport trunk allowed vlan 10,30
^ Allows Vlan 10 and 30 on interface
(config-if)#switchport trunk allowed vlan add 20
^ Adds Vlan 20 to allowed list
(config-if)#switchport trunk allowed vlan remove 20
^ removes Vlan 20 from allowed list
(config-if)#switchport trunk allowed vlan all
^ Allows all Vlans on the port. This is the default state – all Vlans are allowed on trunk by default.
(config-if)#switchport trunk allowed vlan none
^ Removes all Vlans from allowed list.
(config-if)#switchport trunk native vlan 1001
^ Sets native vlan to 1001
[These are my notes from Jeremy's excellent CCNA course which can be viewed here.]