DHCP設定をテストするユーティリティを探しています

DHCP設定をテストするユーティリティを探しています

isc-dhcp-server最近、職場にDHCP サーバー ( ) をインストールしました。

リモートマシンからネットワークDHCP設定をテストするためのユーティリティを探しています(dhclient/を使用しないiptables /renew)。

  • 応答サーバーの表示(同僚が誤って DHCP サービスをインストールすることがあります)
  • MAC アドレスを提供する機能 (プールの予約をテストするため)
  • 応答の簡単な表示

例えば:

$> [utility name] [source mac address | optional] ...

RESPONSE (DHCP Server is 192.168....)
    IP: 192.168.....
    SUBNET: 255.255.....
    DEFAULT GATEWAY: 192.168.....
    ...

答え1

「dhcping」ユーティリティを試すことができます。CentOS/RHEL では、EPEL リポジトリへの接続を取得した後、「yum install it」オプションを使用できます。コマンド オプションを確認してください。これらは、ニーズに非常に関連しているようです。

dhcping(8)                  General Commands Manual                 dhcping(8)

NAME
   dhcping - send a DHCP request to DHCP server to see if it’s up and running

SYNOPSIS
   dhcping [-v] [-q] [-i] [-r] -t maxwait -c client-IP-address -s server-IP-address -h client-hardware-address [-g gateway-
   IP-address]

DESCRIPTION
   This command allows the system administrator to check if a remote DHCP server is still functioning.

   Options are:

   -v   Verbose, print some information.

   -i   Use DHCPINFORM packets.

   -r   Use DHCPREQUEST packets (default behaviour).

   -q   Quiet, print nothing on the screen.

   -t maxwait
        Maximum time to wait for an answer from the server in seconds.  Default is 3 seconds.

   -c client-IP-address
        Request this IP address. Note that this is also the IP address the answer will be sent to.

   -s server-IP-address
        Send the DHCP packet to this IP address.

   -h client-hardware-address
        Use this hardware-address in the DHCP request. It can be up to sixteen octets seperated by colons (i.e. 01:02:03:04)

   -g gateway-IP-address
        Use this IP address for the gateway IP address in the DHCP packet.  This option is currently broken

ではごきげんよう!

+ダニエル。

答え2

これは古いスレッドですが、私の投票はhttp://blog.thecybershadow.net/2013/01/10/dhcp-test-client/ ブログより:

ホーム ネットワークをセットアップしようとしていたとき、DHCP サーバーをテストする簡単な方法がないことにがっかりしました。パケットのスヌーピングは、既存のトラフィックを調べることに限られています。

DHCP テスト ツールは存在しますが (DHCPing と dhquery)、どちらも古く、最新バージョンの要件では動作せず、どちらも Windows では動作しません。

私は、ブロードキャストされた DHCP 応答を受信して​​デコードし、DHCP「検出」パケットを送信できるシンプルな DHCP「クライアント」を作成しました。このツールはクロスプラットフォームであり、Windows および主要な POSIX システムで動作するはずです。

ダウンロードしたのはhttps://github.com/Cyber​​Shadow/dhcptestそしてそれをコンパイルしました。彼は Windows 用にコンパイルされたバージョンを提供していますが、Linux では自分でコンパイルする必要がありますが、わかりやすい説明があれば非常に簡単です。

関連情報