Two PCs on a switch
Devices: SW1, PC1, PC2
Two PCs on one switch. Open PC1 and run: ping 192.168.1.20
- Open PC1 and look at its IP settings (it's 192.168.1.10/24).
- From PC1's β¨ Prompt, ping PC2: ping 192.168.1.20
30 ready-made networking labs with step-by-step guidance, hints and scores - plus troubleshooting challenges with hidden faults. Each opens instantly in the free browser simulator.
βΆ Open the free Network LabTwo PCs on one switch. Open PC1 and run: ping 192.168.1.20
Task: configure R1 (Config tab or CLI): enable conf t int g0/0 ip add 192.168.1.1 255.255.255.0 no shut int g0/1 ip add 192.168.2.1 255.255.255.0 no shut Then ping 192.168.2.10 from PC1.
Task: put PC1+PC2 in VLAN 10 and PC3+PC4 in VLAN 20 on SW1: conf t vlan 10 vlan 20 int fa0/1 switchport access vlan 10 ... Then press β Check.
Task: the routers don't know each other's LANs. Add static routes: R1: ip route 192.168.2.0 255.255.255.0 10.0.0.2 R2: ip route 192.168.1.0 255.255.255.0 10.0.0.1
Task: route between VLAN 10 and VLAN 20 on one router port.
SW1: int g0/1 β switchport mode trunk
R1: int g0/0 β no shut
int g0/0.10 β encapsulation dot1Q 10 β ip add 192.168.10.1 255.255.255.0
int g0/0.20 β encapsulation dot1Q 20 β ip add 192.168.20.1 255.255.255.0
Task: make MLS1 route between its VLANs: conf t ip routing int vlan 10 ip add 10.10.0.1 255.255.255.0 no shut int vlan 20 ip add 10.20.0.1 255.255.255.0 no shut
Task: make R1 hand out addresses: conf t ip dhcp excluded-address 192.168.1.1 192.168.1.9 ip dhcp pool LAN network 192.168.1.0 255.255.255.0 default-router 192.168.1.1 Then on each PC: ipconfig /renew (or the DHCP button).
SRV1 runs DHCP + DNS, but it's on another subnet, so DHCP broadcasts can't reach it. Task: on R1 int g0/1 add: ip helper-address 10.0.0.10 Then renew the PCs and try: ping intranet.local
Task: run OSPF on all three routers, e.g. on each: conf t router ospf 1 network 10.0.0.0 0.0.255.255 area 0 network 192.168.0.0 0.0.255.255 area 0 Then: show ip ospf neighbor, show ip route. Try shutting a link - traffic reroutes!
Task: the routers are joined by a serial link. Run RIP v2 on both: conf t router rip version 2 no auto-summary network 172.16.0.0 network 192.168.1.0 (R2: 192.168.2.0)
The ISP has no route back to your private 192.168.1.0/24, so pings fail. Task: configure PAT on R1: conf t access-list 1 permit 192.168.1.0 0.0.0.255 ip nat inside source list 1 interface g0/0 overload int g0/1 β ip nat inside int g0/0 β ip nat outside Then: show ip nat translations
Task: block PC1 (only) from reaching SRV1 with an extended ACL on R1: conf t access-list 100 deny icmp host 192.168.1.10 host 192.168.2.100 access-list 100 permit ip any any int g0/0 ip access-group 100 in
Wireless devices join AP1; R1 already runs DHCP. Open each device and press π Get address (DHCP), then ping between them.
IPv6 is configured on every interface, but the routers don't know the remote LANs. Task: R1: ipv6 route 2001:db8:2::/64 2001:db8:12::2 R2: ipv6 route 2001:db8:1::/64 2001:db8:12::1
Task: run EIGRP AS 100 on all three routers, e.g.: conf t router eigrp 100 network 10.1.0.0 0.0.255.255 network 172.16.0.0 no auto-summary Then: show ip eigrp neighbors, show ip route (D routes). R2-R3 is a slow serial link - which path does PC2 take to PC3?
Project - build it all yourself (no hints in the steps!): - VLAN 10 Staff (PC1, PC2, LAP1) = 192.168.10.0/24, VLAN 20 Servers (SRV1) = 192.168.20.0/24 - SW1 g0/1 trunk to R1; R1 routes between VLANs (subinterfaces g0/1.10 / g0/1.20) - R1 hands out DHCP in VLAN 10 (gateway .1, DNS 8.8.8.8); SRV1 static 192.168.20.10, gateway .1 - Default route to the Internet (203.0.113.1) and PAT for both VLANs Press β Check to see which goals pass.
The Cisco router is ready (router-on-a-stick). Configure the HUAWEI switch with Huawei commands: system-view vlan batch 10 20 interface GigabitEthernet0/0/1 β port link-type access β port default vlan 10 β quit interface GigabitEthernet0/0/2 β port link-type access β port default vlan 20 β quit interface GigabitEthernet0/0/24 β port link-type trunk β port trunk allow-pass vlan 10 20 Check with: display vlan, display current-configuration
Multi-vendor OSPF. Addresses are set. Configure OSPF area 0 on both: HUAWEI R1: system-view β ospf 1 β area 0 β network 172.16.0.0 0.0.0.3 β network 10.1.1.0 0.0.0.255 CISCO R2: en β conf t β router ospf 1 β network 172.16.0.0 0.0.0.3 area 0 β network 10.2.2.0 0.0.0.255 area 0 Verify: display ospf peer (Huawei) / show ip ospf neighbor (Cisco).
Three switches in a triangle = a loop. Spanning Tree blocks one port (amber LED). Task: run show spanning-tree on each switch. Then make SW1 the root: spanning-tree vlan 1 root primary - watch which port blocks.
Two links between the switches - STP blocks one, wasting bandwidth. Task: bundle them on both switches: interface range g0/1 - 2 channel-group 1 mode active Then: show etherchannel summary and show spanning-tree (one logical link, nothing blocked).
The PCs use 192.168.1.254 as gateway - but no router owns it yet. Task: R1 g0/0: standby 1 ip 192.168.1.254 Β· standby 1 priority 110 Β· standby 1 preempt R2 g0/0: standby 1 ip 192.168.1.254 Then shut R1 g0/0 - R2 takes over and PC1 still pings .254. show standby brief.
SW1 Fa0/1 goes to a hub where PC1 sits. Lock that port to one device: int fa0/1 β switchport mode access β switchport port-security β switchport port-security mac-address sticky Then connect the rogue laptop LAP1 to the hub - the port goes err-disabled! (show port-security, show interfaces status). Recover with shutdown / no shutdown after removing it.
Task: allow only SSH to R1 with a local user: ip domain-name nanotech.local crypto key generate rsa username admin secret Cisco123 enable secret class line vty 0 4 β transport input ssh β login local Then from PC1: ssh -l admin 192.168.1.1 (password Cisco123). Try telnet 192.168.1.1 - it's refused.
NET1 is the Internet (its link to you is 203.0.113.1). Task on R1: ip route 0.0.0.0 0.0.0.0 203.0.113.1 access-list 1 permit 192.168.1.0 0.0.0.255 ip nat inside source list 1 interface g0/0 overload g0/1: ip nat inside Β· g0/0: ip nat outside Then from PC1: ping 8.8.8.8 and http www.example.com
Task: 1. On PC1 and PC2 run: ipconfig /renew6 (SLAAC builds an address from the router's prefix + MAC). 2. Run OSPFv3 on both routers: ipv6 router ospf 1, then on each interface: ipv6 ospf 1 area 0 3. Ping PC2's new IPv6 address from PC1.
Users say PC1 can reach other PCs on its LAN but nothing beyond the router. PC2 is fine. Find and fix the fault.βΆ Open this lab
PC1 and PC2 are both meant to be in VLAN 10, but they can't ping each other. Find out why.βΆ Open this lab
Both routers have static routes, yet PC1 β PC2 fails. The Events log says the request arrivesβ¦ so what's wrong?βΆ Open this lab
Router-on-a-stick is fully configured on R1, but no PC can reach its gateway. Check the switch side.βΆ Open this lab
PC1 can ping R1 but not PC2 (192.168.2.10), even though R1 routes fine. Look closely at PC1's settings.βΆ Open this lab