如何消除 DHCPNAK 后 dhclient 中的延迟?

如何消除 DHCPNAK 后 dhclient 中的延迟?

移动到新的 AP 后,我重新启动dhclient以切换到新网络:

DHCPREQUEST on <interface> to 255.255.255.255 port 67
DHCPNAK from <new router IP>
<delay>
DHCPDISCOVER on <interface> to 255.255.255.255 port 67 interval 6
DHCPREQUEST on <interface> to 255.255.255.255 port 67
DHCPOFFER from <new router IP>
DHCPACK from <new router IP>

如何避免延误?

答案1

在获得新租约之前明确释放租约:

dhclient -r
dhclient -d wlan0

相关内容