by C. Casquatch
In this blog, I walk through the lab step-by-step and include screenshots to document my process and learning.
Shoutout to Rene Molenaar for giving people access to these practices through labs like these: https://gns3vault.com/switching/vlans-and-trunks Which is what I am basing this post off of. I have tweaked only one thing and that is which interfaces I use, as mine are gigabit ethernet and not fast ethernet.
This lab builds on VLAN and trunking configuration using Gigabit interfaces between three Layer 2 switches (SW1, SW2, SW3) in a custom topology. I will configure VLANs, trunking protocols, DTP behavior, allowed VLANs, and native VLANs.
Connections:

configure terminal
vlan 10
name Engineering
vlan 20
name Marketing
vlan 30
name Research
vlan 40
name Sales
vlan 50
name Management
exit

On SW1 (Gi0/1):
interface gi0/1
switchport mode access
switchport access vlan 10
On SW2 (Gi0/1):
interface gi0/1
switchport mode access
switchport access vlan 20
Checking the access port vlan assignments on sw1 and sw2 with
show int 'interface' switchport

On SW2 and SW1:
interface gi0/2
switchport trunk encapsulation isl
switchport mode trunk
switchport trunk allowed vlan 1,10,20
Checking the trunk interfaces for sw1 and sw2 with:
show interfaces trunk

On both switches:
interface gi0/1
switchport mode trunk
switchport nonegotiate
switchport trunk allowed vlan 1,10,20,40,50
Checking the dtp interfaces with:
show dtp trunk

On both switches:
interface gi0/3 ! (SW1) or gi0/0 (SW3)
switchport mode trunk
switchport nonegotiate
switchport trunk native vlan 50
Checking the interfaces on sw1 and sw3:
show interface gi0/3 switchport (sw1)
OR
show interface gi0/0 switchport (sw3)

Check trunk status and allowed VLANs:
show interfaces trunk
show running-config interface gi0/x
SW1:

If write memory fails, use:
copy running-config startup-config