Linux
如何強制 Linux 從 DHCP 伺服器重新獲取新的 IP 地址?
環境是Debian,儘管答案將適用於所有發行版。
你也可以使用這個命令:
dhclient -r interface
interface
您要為其獲取新地址的設備在哪裡。dhclient -r eth0
該
-r
標誌強制dhclient
首先釋放您擁有的任何租約,然後您可以使用此命令請求新的租約:dhclient eth0
來自
man dhclient
:-r Tell dhclient to release the current lease it has from the server. This is not required by the DHCP protocol, but some ISPs require their clients to notify the server if they wish to release an assigned IP address.