Link to home
Start Free TrialLog in
Avatar of kyiu
kyiu

asked on

need linux commands

Does anyone know the equivalent commands in linux for "ipconfig /release" and "ipconfig /renew"?
Avatar of SunBow
SunBow
Flag of United States of America image

How about "dhcpcd -k" (kill) and "dhcpcd" (start, which usually acts same as renew)

I think this remains dependent on what product was loaded from what vendor, for what client, for what server, which distro, which ftp site.  So you might try "man dhcpcd" first. Generally, client initial request for address is network packet akin to client request for renewal of existing address, so server treats them the same (if subnetted properly). Server should continue to retain address mapping for a period after the release, permitting the same address assignment if user/client restarts dhcp service in a reasonable time frame.
Avatar of kyiu
kyiu

ASKER

"The server continue to retain the address mapping" is exactly the problem with my ISP.  It wouldn't renew my IP address if I change the NIC, unless I release the old one first.  In Windows, it is done quite easily...send "ipconfig /release", replace NIC, then "ipconfig /renew". Everything will be happy. I want to do the same in my Linux.  I think what you've suggested does the same during (re)boot.  I need to send the server the "address release" first before the "renew".  This is what I belived how my ISP server works.  
ASKER CERTIFIED SOLUTION
Avatar of MFCRich
MFCRich

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kyiu

ASKER

I supposed you both are correct.  The problem was the version of linux (RH7.1) which uses "Pump" as the default dhcp client service.  I managed to run the test on a newer versioh RH7.3 that does use dhcpcd as default.  It works just like the Windows IPCONFIG command.  Thanksyou.

Sorry, this support site allows me to award to one guy only.  
Oh, but you can give points on the side!!!!!!!!!! <sigh>
Never mind, I don't need 'em. I am happy if you are.
 : ^ )                    Good Fortune!
> It wouldn't renew my IP address if I change the NIC, unless I release the old one first.

Uh, that sounds bad somewhere. DHCP assigns by MAC - which is usually the NIC. To change NIC you power off. Power on and you should look like a newbie in either OS, and to ISP. Renew is (at least used to be) the same format (bits in packet) of getting new IP. The difference being the context, of whether or not the server has you listed. But I do remember more poorly these days.