我有我的 DHCP 服务器,我专门将 IP 范围设置为:10.53.70.100 - 10.53.70.200,但有时我会获得此范围之外的 IP。例如,我创建的最后一个服务器的 IP 为 10.53.70.245,所以我只想知道为什么我的 IP 范围设置不起作用。
请注意,我为此使用 dnsmasq 而不是 dhcpd 服务。
以下是来自 DHCP 服务器的日志:
Mar 20 10:32:46 dhcp dnsmasq-dhcp[7657]: 1927259932 available DHCP range: 10.53.70.100 -- 10.53.70.200
Mar 20 10:32:46 dhcp dnsmasq-dhcp[7657]: 1927259932 client provides name: dnstest
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 DHCPDISCOVER(ens192) 10.53.70.245 00:50:56:8f:d4:6f
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 tags: ens192
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 DHCPOFFER(ens192) 10.53.70.177 00:50:56:8f:d4:6f
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 requested options: 1:netmask, 28:broadcast, 2:time-offset, 121:classless-static-route,
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 requested options: 15:domain-name, 6:dns-server, 12:hostname,
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 requested options: 40:nis-domain, 41:nis-server, 42:ntp-server,
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 requested options: 26:mtu, 119:domain-search, 3:router, 121:classless-static-route,
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 requested options: 249, 33:static-route, 252, 42:ntp-server
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 next server: 10.53.70.5
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 1 option: 53 message-type 2
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 4 option: 54 server-identifier 10.53.70.5
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 4 option: 51 lease-time 12h
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 4 option: 58 T1 6h
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 4 option: 59 T2 10h30m
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 4 option: 1 netmask 255.255.255.0
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 4 option: 28 broadcast 10.53.70.255
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 4 option: 6 dns-server 10.53.70.5
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 9 option: 15 domain-name example.io
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 sent size: 4 option: 3 router 10.53.70.1
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 available DHCP range: 10.53.70.100 -- 10.53.70.200
Mar 20 10:32:49 dhcp dnsmasq-dhcp[7657]: 1927259932 client provides name: dnstest
Mar 20 10:32:52 dhcp dnsmasq-dhcp[7657]: 2099714365 available DHCP range: 10.53.70.100 -- 10.53.70.200
Mar 20 10:32:52 dhcp dnsmasq-dhcp[7657]: 2099714365 client provides name: dnstest
正如你所看到的,有这样一行:
DHCPOFFER(ens192) 10.53.70.177 00:50:56:8f:d4:6f
这将是一个正确的 Ip,因为它在范围内。然而我看到了这样一行:
DHCPDISCOVER(ens192) 10.53.70.245 00:50:56:8f:d4:6f
所以,最后服务器采用了以 .245 结尾的 IP,所以我的问题是为什么它采用了允许范围之外的 IP?
谢谢。