Two departments, one switch
Sales and HR share switch SW1. Put them in separate VLANs:
- VLAN 10, name
SALES: Fa0/1 (PC1) and Fa0/3 (PC3) - VLAN 20, name
HR: Fa0/2 (PC2) and Fa0/4 (PC4)
Make the ports static access ports, and check that each department can still reach itself.
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
Each VLAN is its own broadcast domain and its own subnet: 192.168.10.0/24 for Sales, 192.168.20.0/24 for HR. Ports you don't touch stay in VLAN 1. To let the two departments talk you'd need a router (next module).
Show solution
[SW1]
enable
configure terminal
vlan 10
name SALES
vlan 20
name HR
exit
interface range fa0/1 , fa0/3
switchport mode access
switchport access vlan 10
interface range fa0/2 , fa0/4
switchport mode access
switchport access vlan 20
end
show vlan brief
[PC1]
ping 192.168.10.12
[PC2]
ping 192.168.20.12