![如何使用 ISC KEA DHCP 向我的 DHCPv4 客户端通知“DNS”和“网关”?](https://linux22.com/image/137871/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20ISC%20KEA%20DHCP%20%E5%90%91%E6%88%91%E7%9A%84%20DHCPv4%20%E5%AE%A2%E6%88%B7%E7%AB%AF%E9%80%9A%E7%9F%A5%E2%80%9CDNS%E2%80%9D%E5%92%8C%E2%80%9C%E7%BD%91%E5%85%B3%E2%80%9D%EF%BC%9F.png)
为了说明这一点,我将介绍 ISC KEA DHCP (DHCPv4) 和 DHCP 客户端的配置。以下是我当前用于 ISC KEA DHCP (DHCPv4) 的配置:
$ cat /usr/local/etc/kea/kea-dhcp4.conf
{
"Dhcp4": {
"interfaces-config": {
"interfaces": ["enp0s17"]
},
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea-dhcp4-ctrl.sock"
},
"lease-database": {
"type": "memfile",
"lfc-interval": 1800
},
"expired-leases-processing": {
"reclaim-timer-wait-time": 10,
"flush-reclaimed-timer-wait-time": 25,
"hold-reclaimed-time": 3600,
"max-reclaim-leases": 100,
"max-reclaim-time": 250,
"unwarned-reclaim-cycles": 5
},
"valid-lifetime": 4000,
"renew-timer": 1000,
"rebind-timer": 2000,
"subnet4": [{
"interface": "enp0s17",
"subnet": "192.168.56.0/24",
"pools": [{
"pool": "192.168.56.3 - 192.168.56.254"
}],
"option-data": [{
"name": "domain-name-servers",
"data": "192.168.56.1"
}, {
"name": "routers",
"data": "192.168.56.1"
}]
}]
},
"Logging": {
"loggers": [{
"name": "kea-dhcp4",
"output_options": [{
"output": "/usr/local/var/log/kea-dhcp4.log"
}],
"severity": "INFO",
"debuglevel": 0
}]
}
}
这是我在客户端中的网络接口配置......
$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s17
BOOTPROTO=dhcp
DEVICE=enp0s17
IPV6INIT=NO
USERCTL=NO
ZONE=public
通过此配置 - 不使用 ISC KEA DHCP (DHCPv4) - 我的客户端可以完美运行。
$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s17
BOOTPROTO=static
DEVICE=enp0s17
DNS1=192.168.56.1
GATEWAY=192.168.56.1
IPADDR=192.168.56.100
IPV6INIT=NO
NETMASK=255.255.255.0
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
USERCTL=NO
我究竟做错了什么?