Address the LAN

NetLab lab Beginner 5 tasks 10 points

A new office LAN uses 192.168.50.0/24. Give the router R1 the first usable address on Gi0/0, then set up the two PCs so they can reach the router and each other:

  • PC1 (Windows): 192.168.50.10
  • PC2 (Linux): 192.168.50.11

Both PCs use the router as their default gateway.

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

The first usable address of 192.168.50.0/24 is .1 (.0 is the network address and .255 the broadcast). The router port needed no shutdown as well as the address. Each PC needs three things: an address in the subnet, the right mask, and the router's LAN address as its gateway. On Linux the gateway is the default route.

Show solution
[R1]
enable
configure terminal
interface g0/0
ip address 192.168.50.1 255.255.255.0
no shutdown
end
[PC1]
netsh interface ip set address "Ethernet" static 192.168.50.10 255.255.255.0 192.168.50.1
ipconfig
[PC2]
sudo ip addr add 192.168.50.11/24 dev eth0
sudo ip route add default via 192.168.50.1
ping -c 3 192.168.50.1
ping -c 3 192.168.50.10
HOME LABS COMMUNITY DASHBOARD