2.0 CCNA - Network Access
2.2 Configure and verify interswitch connectivity
Trunk ports, 802.1Q, and Native VLAN
An example of the complete configuration:
switch# configure terminal switch(config)# interface FastEthernet0/1 switch(config-if)# switchport mode trunk switch(config-if)# switchport trunk allowed vlan add 10,20,30 switch(config-if)# switchport trunk native vlan 1 switch(config-if)# end switch# show interfaces FastEthernet0/1 switchport switch# write memory
Explanation of the steps involved:
Connect to the switch using a console cable or Telnet/SSH.
1. Enter global configuration mode by typing "configure terminal"
2. Identify the interface that you want to configure as a trunk port. For example, if you want to configure interface FastEthernet0/1 as a trunk port, type "interface FastEthernet0/1".
3. Configure the interface as a trunk port by typing "switchport mode trunk".
4. Configure the allowed VLANs on the trunk port by typing "switchport trunk allowed vlan add [vlan-list]", where [vlan-list] is a comma-separated list of VLAN IDs. For example, "switchport trunk allowed vlan add 10,20,30".