Trunk between two switches

NetLab lab Intermediate 4 tasks 20 points

Sales (VLAN 10) and HR (VLAN 20) now have PCs on two switches. SW1 is already set up (VLANs and access ports). Finish the job:

  • On SW2: create VLANs 10 SALES and 20 HR; Fa0/1 (PC3) in VLAN 10, Fa0/2 (PC4) in VLAN 20.
  • Make Gi0/1 a static trunk on both switches, with native VLAN 99 (create it on both, name NATIVE) and only VLANs 10, 20 and 99 allowed.

How it works: this is VulnTech NetLab, a network simulator running in your browser. Click a device in the diagram to open its console and type commands, just like on real equipment (? shows help, Tab finishes a word). Click a cable to inspect it. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Your work is kept if you reload; Reset starts the network over.

Solution explanation

VLANs are local to each switch, so SW2 needs its own VLAN 10 and 20. The trunk carries both, tagged; the native VLAN 99 is untagged and must match at both ends (until both are set, CDP logs a native VLAN mismatch). Limiting the allowed list keeps VLANs that aren't needed off the link.

Show solution
[SW2]
enable
configure terminal
vlan 10
name SALES
vlan 20
name HR
vlan 99
name NATIVE
exit
interface fa0/1
switchport mode access
switchport access vlan 10
interface fa0/2
switchport mode access
switchport access vlan 20
interface g0/1
switchport mode trunk
switchport trunk native vlan 99
switchport trunk allowed vlan 10,20,99
end
[SW1]
enable
configure terminal
vlan 99
name NATIVE
interface g0/1
switchport mode trunk
switchport trunk native vlan 99
switchport trunk allowed vlan 10,20,99
end
show interfaces trunk
[PC1]
ping 192.168.10.12
[PC2]
ping 192.168.20.12
HOME LABS COMMUNITY DASHBOARD