Reputation: 35233
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.
Upvotes: 1
Views: 14672
Reputation: 7312
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.
Upvotes: 2