有没有办法拒绝来自特定 ip 的 dhcp 响应?

use*_*943 6 networking

在我的网络上,我有两个 dhcp 服务器(不是我的错)。有没有办法拒绝来自特定 dhcp 服务器的 dhcp 响应?

ste*_*ver 5

根据dhclient.conf联机帮助页,应该可以通过reject/etc/dhcp/dhclient.conf文件添加指令来执行您想要的操作

\n\n
   reject cidr-ip-address [, ... cidr-ip-address ] ;\n\n   The reject statement causes the  DHCP  client  to  reject  offers  from\n   servers  whose  server identifier matches any of the specified hosts or\n   subnets.  This can be used to avoid being configured by rogue  or  mis\xe2\x80\x90\n   configured  dhcp  servers, although it should be a last resort - better\n   to track down the bad DHCP server and fix it.\n   .\n   .\n   .   \n   reject 192.168.0.0/16, 10.0.0.5;\n\nThe above example would cause offers from any server identifier in the  entire\nRFC  1918  "Class  C"  network  192.168.0.0/16, or the specific single address\n10.0.0.5, to be rejected.\n
Run Code Online (Sandbox Code Playgroud)\n\n

不过请注意联机帮助页中的注释 - 最好找到错误的 DHCP 服务器并修复它。

\n