/ var / log / messages中的DHCP请求过多:重复DHCPINFORM,DHCPACK和DHCPREQUEST


10

我有一个为多个子网运行DHCP的CentOS 5系统。在/ var / log / messages中,我看到了恒定的DHCPINFORM,DHCPACK和DHCPREQUEST消息。我不明白为什么这些请求比其他安装更频繁。消息每隔几秒钟突发一次,从而导致日志文件非常大。

这里的大多数设备是无线手持设备(使用Windows CE TCP堆栈)。我非常感谢有任何见解来抑制持续不断的消息。

/etc/dhcpd.conf

default-lease-time 28800;
authoritative;
allow bootp;
ddns-update-style none;
option subnet-mask 255.255.255.0;
option domain-name-servers  10.1.1.3;
option domain-name "xxxinc.com";
option tftp-server-name "10.1.1.3";
option ntp-servers 17.151.16.21;

subnet 10.1.1.0 netmask 255.255.255.0 {
        range dynamic-bootp 10.1.1.120 10.1.1.211;
        option tftp-server-name "10.1.1.3";
        next-server 10.1.1.3;
        filename "/dsl/pxelinux.0";
        option routers 10.1.1.1;
}

subnet 10.1.2.0 netmask 255.255.255.0 {
        range dynamic-bootp 10.1.2.130 10.1.2.199;
        option tftp-server-name "10.1.1.3";
        next-server 10.1.1.3;
        filename "/dsl/pxelinux.0";
        option routers 10.1.2.1;
}

/ var / log / messages

Apr  4 10:59:44 General dhcpd: DHCPINFORM from 10.1.1.136 via eth0
Apr  4 10:59:44 General dhcpd: DHCPACK to 10.1.1.136 (00:16:35:07:1e:61) via eth0
Apr  4 10:59:44 General dhcpd: DHCPINFORM from 10.1.1.136 via eth0
Apr  4 10:59:44 General dhcpd: DHCPACK to 10.1.1.136 (00:16:35:07:1e:61) via eth0
Apr  4 10:59:44 General dhcpd: DHCPINFORM from 10.1.1.136 via 10.1.1.254
Apr  4 10:59:44 General dhcpd: DHCPACK to 10.1.1.136 (00:16:35:07:1e:61) via eth0
Apr  4 10:59:44 General dhcpd: DHCPINFORM from 10.1.1.136 via 10.1.1.254
Apr  4 10:59:44 General dhcpd: DHCPACK to 10.1.1.136 (00:16:35:07:1e:61) via eth0
Apr  4 10:59:44 General dhcpd: DHCPINFORM from 10.1.1.136 via 10.1.1.2
Apr  4 10:59:44 General dhcpd: DHCPACK to 10.1.1.136 (00:16:35:07:1e:61) via eth0
Apr  4 10:59:46 General dhcpd: DHCPREQUEST for 10.1.1.137 from 00:15:70:85:9b:ea via eth0
Apr  4 10:59:46 General dhcpd: DHCPACK on 10.1.1.137 to 00:15:70:85:9b:ea via eth0
Apr  4 10:59:46 General dhcpd: DHCPREQUEST for 10.1.1.137 from 00:15:70:85:9b:ea via eth0
Apr  4 10:59:46 General dhcpd: DHCPACK on 10.1.1.137 to 00:15:70:85:9b:ea via eth0
Apr  4 10:59:46 General dhcpd: DHCPREQUEST for 10.1.1.137 from 00:15:70:85:9b:ea via 10.1.1.254
Apr  4 10:59:46 General dhcpd: DHCPACK on 10.1.1.137 to 00:15:70:85:9b:ea via 10.1.1.254
Apr  4 10:59:46 General dhcpd: DHCPREQUEST for 10.1.1.137 from 00:15:70:85:9b:ea via 10.1.1.254
Apr  4 10:59:46 General dhcpd: DHCPACK on 10.1.1.137 to 00:15:70:85:9b:ea via 10.1.1.254
Apr  4 10:59:46 General dhcpd: DHCPREQUEST for 10.1.1.137 from 00:15:70:85:9b:ea via 10.1.1.2
Apr  4 10:59:46 General dhcpd: DHCPACK on 10.1.1.137 to 00:15:70:85:9b:ea via 10.1.1.2
Apr  4 10:59:47 General dhcpd: DHCPINFORM from 10.1.2.193 via 10.1.2.1
Apr  4 10:59:47 General dhcpd: DHCPACK to 10.1.2.193 (00:1a:4b:c0:e0:a4) via eth0
Apr  4 10:59:47 General dhcpd: DHCPINFORM from 10.1.1.147 via eth0
Apr  4 10:59:47 General dhcpd: DHCPACK to 10.1.1.147 (00:19:bb:d3:bc:e8) via eth0
Apr  4 10:59:47 General dhcpd: DHCPINFORM from 10.1.1.147 via eth0
Apr  4 10:59:47 General dhcpd: DHCPACK to 10.1.1.147 (00:19:bb:d3:bc:e8) via eth0
Apr  4 10:59:47 General dhcpd: DHCPINFORM from 10.1.1.147 via 10.1.1.254
Apr  4 10:59:47 General dhcpd: DHCPACK to 10.1.1.147 (00:19:bb:d3:bc:e8) via eth0
Apr  4 10:59:47 General dhcpd: DHCPINFORM from 10.1.1.147 via 10.1.1.254
Apr  4 10:59:47 General dhcpd: DHCPACK to 10.1.1.147 (00:19:bb:d3:bc:e8) via eth0
Apr  4 10:59:47 General dhcpd: DHCPINFORM from 10.1.1.147 via 10.1.1.2
Apr  4 10:59:47 General dhcpd: DHCPACK to 10.1.1.147 (00:19:bb:d3:bc:e8) via eth0
Apr  4 10:59:49 General dhcpd: DHCPREQUEST for 10.1.1.198 from 00:15:70:86:dc:b9 via eth0
Apr  4 10:59:49 General dhcpd: DHCPACK on 10.1.1.198 to 00:15:70:86:dc:b9 via eth0
Apr  4 10:59:49 General dhcpd: DHCPREQUEST for 10.1.1.198 from 00:15:70:86:dc:b9 via eth0
Apr  4 10:59:49 General dhcpd: DHCPACK on 10.1.1.198 to 00:15:70:86:dc:b9 via eth0
Apr  4 10:59:49 General dhcpd: DHCPREQUEST for 10.1.1.198 from 00:15:70:86:dc:b9 via 10.1.1.254
Apr  4 10:59:49 General dhcpd: DHCPACK on 10.1.1.198 to 00:15:70:86:dc:b9 via 10.1.1.254
Apr  4 10:59:49 General dhcpd: DHCPREQUEST for 10.1.1.198 from 00:15:70:86:dc:b9 via 10.1.1.254
Apr  4 10:59:49 General dhcpd: DHCPACK on 10.1.1.198 to 00:15:70:86:dc:b9 via 10.1.1.254
Apr  4 10:59:49 General dhcpd: DHCPREQUEST for 10.1.1.198 from 00:15:70:86:dc:b9 via 10.1.1.2
Apr  4 10:59:49 General dhcpd: DHCPACK on 10.1.1.198 to 00:15:70:86:dc:b9 via 10.1.1.2

更新

ip helper-address从一些DHCP服务器端路由器中删除了一些无关的条目。许多流量已经消退,但是我仍然收到大量DHCPINFORM,DHCPACK ...

Oct 26 17:22:23 General dhcpd: DHCPINFORM from 10.1.1.140 via eth0
Oct 26 17:22:23 General dhcpd: DHCPACK to 10.1.1.140 (00:16:35:07:1e:2c) via eth0
Oct 26 17:22:27 General dhcpd: DHCPINFORM from 10.1.1.147 via eth0
Oct 26 17:22:27 General dhcpd: DHCPACK to 10.1.1.147 (00:19:bb:d3:bc:e8) via eth0
Oct 26 17:22:27 General dhcpd: DHCPINFORM from 10.1.1.140 via eth0
Oct 26 17:22:27 General dhcpd: DHCPACK to 10.1.1.140 (00:16:35:07:1e:2c) via eth0
Oct 26 17:22:39 General dhcpd: DHCPINFORM from 10.1.1.182 via eth0
Oct 26 17:22:39 General dhcpd: DHCPACK to 10.1.1.182 (00:19:bb:d3:ec:f1) via eth0
Oct 26 17:22:43 General dhcpd: DHCPINFORM from 10.1.1.182 via eth0
Oct 26 17:22:43 General dhcpd: DHCPACK to 10.1.1.182 (00:19:bb:d3:ec:f1) via eth0
Oct 26 17:22:49 General dhcpd: DHCPINFORM from 10.1.2.198 via 10.1.2.1
Oct 26 17:22:49 General dhcpd: DHCPACK to 10.1.2.198 (00:1e:0b:79:e5:15) via eth0
Oct 26 17:23:01 General dhcpd: DHCPINFORM from 10.1.1.194 via eth0
Oct 26 17:23:01 General dhcpd: DHCPACK to 10.1.1.194 (00:1e:0b:7b:2d:d6) via eth0
Oct 26 17:23:04 General dhcpd: DHCPINFORM from 10.1.1.136 via eth0
Oct 26 17:23:04 General dhcpd: DHCPACK to 10.1.1.136 (00:16:35:07:1e:61) via eth0
Oct 26 17:23:07 General dhcpd: DHCPINFORM from 10.1.1.136 via eth0
Oct 26 17:23:07 General dhcpd: DHCPACK to 10.1.1.136 (00:16:35:07:1e:61) via eth0
Oct 26 17:23:09 General dhcpd: DHCPINFORM from 10.1.2.193 via 10.1.2.1
Oct 26 17:23:09 General dhcpd: DHCPACK to 10.1.2.193 (00:1a:4b:c0:e0:a4) via eth0
Oct 26 17:23:12 General dhcpd: DHCPINFORM from 10.1.2.179 via 10.1.2.1
Oct 26 17:23:12 General dhcpd: DHCPACK to 10.1.2.179 (00:19:bb:d3:f6:26) via eth0
Oct 26 17:23:13 General dhcpd: DHCPINFORM from 10.1.2.193 via 10.1.2.1
Oct 26 17:23:13 General dhcpd: DHCPACK to 10.1.2.193 (00:1a:4b:c0:e0:a4) via eth0
Oct 26 17:23:15 General dhcpd: DHCPINFORM from 10.1.2.179 via 10.1.2.1
Oct 26 17:23:15 General dhcpd: DHCPACK to 10.1.2.179 (00:19:bb:d3:f6:26) via eth0
Oct 26 17:23:36 General dhcpd: DHCPINFORM from 10.1.1.140 via eth0
Oct 26 17:23:36 General dhcpd: DHCPACK to 10.1.1.140 (00:16:35:07:1e:2c) via eth0
Oct 26 17:23:37 General dhcpd: DHCPINFORM from 10.1.1.147 via eth0
Oct 26 17:23:37 General dhcpd: DHCPACK to 10.1.1.147 (00:19:bb:d3:bc:e8) via eth0
Oct 26 17:23:40 General dhcpd: DHCPINFORM from 10.1.1.140 via eth0
Oct 26 17:23:40 General dhcpd: DHCPACK to 10.1.1.140 (00:16:35:07:1e:2c) via eth0
Oct 26 17:23:41 General dhcpd: DHCPINFORM from 10.1.1.147 via eth0
Oct 26 17:23:41 General dhcpd: DHCPACK to 10.1.1.147 (00:19:bb:d3:bc:e8) via eth0
Oct 26 17:23:50 General dhcpd: DHCPINFORM from 10.1.2.198 via 10.1.2.1
Oct 26 17:23:50 General dhcpd: DHCPACK to 10.1.2.198 (00:1e:0b:79:e5:15) via eth0
Oct 26 17:23:51 General dhcpd: DHCPINFORM from 10.1.1.182 via eth0
Oct 26 17:23:51 General dhcpd: DHCPACK to 10.1.1.182 (00:19:bb:d3:ec:f1) via eth0

哪些机器具有10.1.1.254和10.1.1.2?
Giovanni Toraldo 2011年

它们可能是Cisco 1700系列路由器。
ewwhite 2011年

这个问题真的开放了几个月吗?
Joseph Kern

是。几个月来一直没有答案。
ewwhite

哇。真可惜,我希望我能使您走上正轨。:-)
Joseph Kern

Answers:


8

看起来您有将客户端连接到多个子网(或将dhcp帮助程序相互中继的路由器)。由于我不了解您的拓扑,因此无法确定。

需要检查的几件事:

  1. 这会发生在所有客户身上吗?还是仅位于特定网段的那些?
  2. 这些客户端是否连接到多个子网?
  3. 您是否已验证子网之间没有桥接?

然后,您应该查看每个客户端(也许是ethreal客户端),并确定它们是否从多个路由器(可能是多个路由器)接收多个DHCPACK。


1
我在dhcp服务器的本地子网的路由器上找到了辅助地址条目。这些已被删除,我正在监视流量以查看日志是否消退。
ewwhite 2011年

是的...您的路由器似乎在重复从AND到彼此的DHCP广播,这就是为什么您看到每个广播中有两个广播中的三个。您正在创建小型DHCP广播风暴。
约瑟夫·科恩

5

如果在DHCPACK响应中未指定WPAD选项,则某些客户端(尤其是Windows 7)会不断发送DHCPINFORM消息。

您可以通过在配置中添加以下几行来为ISC DHCP修复此问题:

option wpad code 252 = text;

subnet xxx {
    option wpad "\n";
}

您可以通过将以下内容添加到dnsmasq.conf文件中来解决dnsmasq的问题:

dhcp-option=252,"\n"

1

您的DHCP服务器似乎在同一接口上使用不同的套接字多次侦听(请查看“ via”位-它谈论eth0和两个不同的IP地址)。如果已显式配置DHCP服务器的侦听套接字,请检查每个接口只有一个套接字。

除此之外,流量看起来很正常。Windows主机通常使用DHCPINFORM查询它们未缓存的其他参数,而且WinCE仍然具有非常小的缓存。


通孔部分来自网络上的本地路由器。我们在本地路由器中设置了dhcp helper条目,以访问其他子网。
ewwhite 2011年

在这种情况下,这些地址是否也应将从子网接收的消息转发回同一子网?因为那是他们似乎在做的事情。
西蒙·里希特

0

如果在该计算机上具有“ DHCP管理器” UI,是否尝试增加dhcpd守护程序的详细程度?好奇是否从此获得任何其他线索来解决问题。或在启用详细日志和事务日志的情况下重新启动:

# /etc/init.d/dhcp stop
# /usr/lib/inet/in.dhcpd -v -l 5 [options]

/etc/syslog.conf包含:

local0.notice              /var/log/dhcpsrvc 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.