CentOS Stream 9
Sponsored Link

Dnsmasq : DHCP サーバーの設定2022/01/11

 
Dnsmasq 組み込みの DHCP 機能を有効にして DHCP サーバーの設定をします。
[1] Dnsmasq の設定です。
[root@dlp ~]#
vi /etc/dnsmasq.conf
# 170行目 : 貸し出すアドレスの範囲とリース期間を追記

dhcp-range=10.0.0.200,10.0.0.250,12h
# 344行目 : デフォルトゲートウェイ, NTP, DNS, サブネットマスクを定義

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] Firewalld を有効にしている場合は、DHCP サービスの許可が必要です。DHCP サーバー は [67/UDP] を使用します。
[root@dlp ~]#
firewall-cmd --add-service=dhcp

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

success
[3]
関連コンテンツ