
dhclient
構成ファイル ( )の一部の構成を編集した後、/etc/dhcp/dhclient.conf
マシンを再起動するまで変更は有効にならないようです。 はdhclient
バックグラウンドで実行されているため、実際に構成ファイルを再度読み取り、変更を適用するには、プロセスを再起動する必要があると考えられます。
それを達成するための最善の方法は何でしょうか?
man ページでdhclient
次のオプションを見つけました:
-r Release the current lease and stop the running DHCP client as
previously recorded in the PID file. When shutdown via this
method dhclient-script will be executed with the specific reason
for calling the script set. The client normally doesn't release
the current lease as this is not required by the DHCP protocol
but some cable ISPs require their clients to notify the server
if they wish to release an assigned IP address.
私の理解が正しければ、このオプションは を強制終了しdhclient
、リースを解放して起動時に構成ファイルを再度読み取ることになります ( を呼び出すのと同じくらい簡単かどうかはわかりませんdhclient &
)。
プロセス ツリーを確認すると、dhclient
が の子プロセスであることにも気付きましたnetwork-manager
。 を実行すると、新しい構成で を再度開始sudo service network-manager restart
するよりクリーンな方法になりますか?dhclient
答え1
接続を再度アクティブ化します。
たとえば、nmcli connection up $NAME
NetworkManager のその他のクライアントを介してなど。
通常は NetworkManager を再起動する必要はありません。