Build a DHCP server

NetLab lab Beginner 5 tasks 10 points

The PCs on this LAN are set to DHCP, but there's no server yet: PC1 has given itself an APIPA address. Make router R1 the DHCP server for 192.168.10.0/24:

  • Keep 192.168.10.1 to 192.168.10.20 for static devices (don't hand them out).
  • Pool name STAFF; gateway 192.168.10.1; DNS server 192.168.10.5.

Then get both PCs a lease.

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

Without a server, Windows falls back to APIPA (169.254.x.x). The excluded range is a global command; the pool holds network, default-router and dns-server. After that, each client just asks again: the first free address is .21, then .22.

Show solution
[R1]
enable
configure terminal
ip dhcp excluded-address 192.168.10.1 192.168.10.20
ip dhcp pool STAFF
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 192.168.10.5
end
[PC1]
ipconfig /renew
[PC2]
sudo dhclient eth0
[R1]
show ip dhcp binding
HOME LABS COMMUNITY DASHBOARD