我使用此配置在我的 ubuntu 服务器上设置了一个 dhcpd:请注意,运行 dhcpd 的 ubuntu 服务器的静态 IP 为 192.168.1.50
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.50;
option domain-name-servers 192.168.1.50;
option netbios-name-servers 192.168.1.50;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.150 192.168.1.200;
}
现在,当我尝试从我的 ubuntu 客户端计算机从 dhcpd 服务器获取 ip 时,服务器从 192.168.1.150 池中提供了一个 ip,但客户端似乎没有接收到它,而是触发新请求,直到发生超时:
Listening on LPF/eth0/00:24:8c:1d:fb:40
Sending on LPF/eth0/00:24:8c:1d:fb:40
Sending on Socket/fallback
DHCPRELEASE on eth0 to 195.130.132.102 port 67
Internet Systems Consortium DHCP Client V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/00:24:8c:1d:fb:40
Sending on LPF/eth0/00:24:8c:1d:fb:40
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPOFFER of 192.168.1.150 from 192.168.1.50
DHCPREQUEST of 192.168.1.150 on eth0 to 255.255.255.255 port 67
DHCPREQUEST of 192.168.1.150 on eth0 to 255.255.255.255 port 67
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPOFFER of 192.168.1.150 from 192.168.1.50
DHCPREQUEST of 192.168.1.150 on eth0 to 255.255.255.255 port 67
DHCPREQUEST of 192.168.1.150 on eth0 to 255.255.255.255 port 67
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPOFFER of 192.168.1.150 from 192.168.1.50
DHCPREQUEST of 192.168.1.150 on eth0 to 255.255.255.255 port 67
DHCPREQUEST of 192.168.1.150 on eth0 to 255.255.255.255 port 67
...
tcpdump 信息:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
19:04:18.431422 IP 94.227.60.1.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
19:05:10.316903 IP 94.224.188.1.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
服务器和客户端的 iptables 信息是相同的:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
有任何想法吗??