CentOS Stream 10
Sponsored Link

Dnsmasq : Configure DHCP Server2024/12/27

 

Enable integrated DHCP feature in Dnsmasq and Configure DHCP Server.

[1] Configure Dnsmasq for DHCP service.
[root@dlp ~]#
vi /etc/dnsmasq.conf
# line 184 : add ranges of IP address to lease and term of lease

dhcp-range=10.0.0.200,10.0.0.250,12h
# line 354 : add entries for Gateway, NTP, DNS, Subnetmask

dhcp-option=option:router,10.0.0.1
dhcp-option=option:ntp-server,10.0.0.10
dhcp-option=option:dns-server,10.0.0.10
dhcp-option=option:netmask,255.255.255.0
[root@dlp ~]#
systemctl restart dnsmasq

[2] If Firewalld is running, allow DHCP service. DHCP Server uses [67/UDP].
[root@dlp ~]#
firewall-cmd --add-service=dhcp

success
[root@dlp ~]#
firewall-cmd --runtime-to-permanent

success
[3]
That's OK.
Configure DHCP Client on client host and verify it works normally.
Matched Content