| Device | Interface | IP / Config | Details |
|---|---|---|---|
| PC1 | Eth0 | 192.168.10.10/24 | GW: 192.168.10.1 |
| PC2 | Eth0 | 192.168.20.10/24 | GW: 192.168.20.1 |
| SW1 | Fa0/1 | Access VLAN 10 | To PC1 |
| SW1 | Fa0/2 | Access VLAN 20 | To PC2 |
| SW1 | Fa0/24 | Trunk (802.1Q) | To R1 |
| R1 | Fa0/0.10 | 192.168.10.1/24 | VLAN 10 gateway |
| R1 | Fa0/0.20 | 192.168.20.1/24 | VLAN 20 gateway |
You need: vlan and name commands in global config mode.
On SW1, enter privileged EXEC (enable), then configure terminal. Use vlan 10 to create VLAN 10, name SALES to name it, then exit. Repeat for VLAN 20 with name HR.
Commands: interface, switchport mode access, switchport access vlan
Enter each interface, set it to access mode, then assign the VLAN. Fa0/1 connects to PC1 (VLAN 10), Fa0/2 connects to PC2 (VLAN 20). Access ports carry only one VLAN's traffic.
You need: interface and switchport mode trunk
The link between SW1 (Fa0/24) and R1 must carry multiple VLANs. Set the port to trunk mode so it uses 802.1Q tagging.
Commands: interface fa0/0.10, encapsulation dot1q, ip address
On R1, create subinterface Fa0/0.10. The encapsulation dot1q 10 command maps it to VLAN 10. Then assign IP 192.168.10.1 with mask 255.255.255.0 — this becomes the default gateway for VLAN 10.
encapsulation dot1q command is what actually maps it to VLAN 10.Same pattern as Task 4 — different VLAN and IP.
Create Fa0/0.20, encapsulate for VLAN 20, and assign IP 192.168.20.1/24.
You need: interface fa0/0 and no shutdown
Subinterfaces inherit the up/down state of the physical interface. You must bring up Fa0/0 for the subinterfaces (.10 and .20) to function.
Click on PC1 and use the ping command.
Open PC1's command prompt. Ping PC2's IP (192.168.20.10). If all VLANs, access ports, trunk, and subinterfaces are correctly configured, the ping should succeed.
Expected: 4 replies from 192.168.20.10. If it fails, verify with show vlan brief on SW1 and show ip interface brief on R1.