特定の IP からの DHCP 応答を拒否する方法はありますか?

特定の IP からの DHCP 応答を拒否する方法はありますか?

私のネットワークには 2 つの DHCP サーバーがあります (私のせいではありません)。特定の DHCP サーバーからの DHCP 応答を拒否する方法はありますか?

答え1

マニュアルページによると、ファイルにディレクティブdhclient.confを追加することで、必要な操作を実行できるはずです。reject/etc/dhcp/dhclient.conf

   reject cidr-ip-address [, ... cidr-ip-address ] ;

   The reject statement causes the  DHCP  client  to  reject  offers  from
   servers  whose  server identifier matches any of the specified hosts or
   subnets.  This can be used to avoid being configured by rogue  or  mis‐
   configured  dhcp  servers, although it should be a last resort - better
   to track down the bad DHCP server and fix it.
   .
   .
   .   
   reject 192.168.0.0/16, 10.0.0.5;

The above example would cause offers from any server identifier in the  entire
RFC  1918  "Class  C"  network  192.168.0.0/16, or the specific single address
10.0.0.5, to be rejected.

ただし、man ページのコメントに注意してください - 問題のある DHCP サーバーを追跡して修正する方がよいでしょう。

関連情報