如何强制Linux从DHCP服务器重新获取新的IP地址?

如何强制Linux从DHCP服务器重新获取新的IP地址?,第1张

概述环境是 Debian,但答案将适用于所有发行版. 您也可以使用此命令: dhclient -r interface 其中interface是您想要获取地址的设备. dhclient -r eth0 -r标志强制dhclient首先释放您拥有的任何租约,然后您可以使用此命令请求新租约: dhclient eth0 来自man dhclient: -r Tell dhclient to 环境是 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.
总结

以上是内存溢出为你收集整理的如何强制Linux从DHCP服务器重新获取新的IP地址?全部内容,希望文章能够帮你解决如何强制Linux从DHCP服务器重新获取新的IP地址?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1045251.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存