>I'm sure Linux has simple commend to do this. May be I didn't make the question clearer, in windows the commends to release an IP is "IPCONFIG /release". Is there one equivalent for Linux?
Ken
Can I force RH7.3 DHCP client to release (not renew) the IP from the ISP (using cable modem)? If so, how do I do that?
Ken
>I'm sure Linux has simple commend to do this. May be I didn't make the question clearer, in windows the commends to release an IP is "IPCONFIG /release". Is there one equivalent for Linux?
Ken
It should be as simple as shutting down the network and/or dhcp services. With Redhat, the command is:
/sbin/service <servicename> stop
as root or su, of course.
If yuou are using dhcpcd, this is from the manpage:
-k Sends SIGHUP signal to the dhcpcd process that is currently running. If dhcpcd receives SIGHUP it will send DCHP_RELEASE message to the server and destroy dhcpcd cache. In a case dhcpcd receives SIGTERM which is normally used by shutdown(8) when rebooting the system dhcpcd will not send DHCP_RELEASE and will not destroy cache. When system boots dhcpcd will use cache to request the same IP address from DHCP server which was assigned before the system went down
I can't test this, I am not running dhcp right now.
Jim H
For sure DHCPCD doesn't releases the IP during normal shutdown. I've done that. The way it works (I think) with my cable ISP, the DHCP server register the MAC address of the NIC when it hands out the IP address on the first request. If it doesn't receive a "RELEASE IP" from the client, this IP will stay in the cache along with the MAC address. When a dhcpcd request comes in again, it compares the MAC of the request to the MAC saved in the cache. It will respone to the request if the MAC address is the same. If I simply shutdown the original machine and plug the cable to another box, it will not get a IP address. I've been calling the helpdesk to reset the connection, it's a pain :P. they do not support Linux. Many Windows users tell me to do the RELEASE first before switching to another computer. Hence for the post.
Jim, I'm still running RH7.1. It uses PUMP for the dhcpcd. Does it work the same as the DHCPCD? I'm trying to move to a newer version in a different box.
If the problem is the MAC address, find out the one that is cached and change the MAC address of the interface you are using with ifconfig.
$ /sbin/ifconfig eth0 hw c0:ff:ee:c0:ff:ee
Bookmarks