如果 DHCP Release 中任何参数错误,DHCP 客户端是否会收到 DHCP NAK?

发布于 2024-08-12 04:22:42 字数 246 浏览 1 评论 0原文

我正在 Ubuntu 9.04 上使用 C 构建 dhcp 客户端。现在我向 dhcp 服务器发送 dhcp 版本,它没有按预期发送 ack。我想知道如果任何参数错误,它是否会发送任何 DHCP NAK。

还有一个问题。发送 DHCP 释放后,我的互联网仍然正常工作。另外,当我执行 ifconfig 时,它仍然显示 eth0 的 IP 地址。 但是当我执行 dhclient -r 时,互联网无法工作,并且 ifconfig 不显示 eth0 的 IP 地址。

I am building a dhcp client using C on Ubuntu 9.04. Now I send a dhcp release to the dhcp server, it sends no ack as expected. I was wondering if it sends any DHCP NAK if any of the parameters are wrong.

There is one more problem. After sending DHCP Release my internet is still working. Also when I do ifconfig it still shows the ip address of eth0.
But when I do dhclient -r internet does not work and ifconfig does not show the ip address of eth0.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜雨飘雪 2024-08-19 04:22:42

您在调试握手时是否使用 tcpdump 来检查数据包流量?这应该会告诉您服务器的实现是否发送了 NAK。
RFC 2131:动态主机配置协议表示存在 DHCPNAK。

DHCPNAK——服务器向客户端指示客户端的网络地址概念不正确(例如,客户端已移至新的子网)或客户端的租约已过期。

Are you using tcpdump to inspect the packet traffic while you debug the handshake? That should show you if your server's implementation sends a NAK.
RFC 2131: Dynamic Host Configuration Protocol indicates that there is a DHCPNAK.

DHCPNAK -- Server to client indicating client's notion of network address is incorrect (e.g., client has moved to new subnet) or client's lease as expired.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文