Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ipconfig /release /renew in linux? 1

Status
Not open for further replies.

zoomforce

Technical User
Jan 6, 2002
70
CA
Hey quick question, how do i release and renew my ip in linux? (i am using mandrake if that matters)
 
dhcpcd -n

According to the man file the n argument:
"Sends SIGALRM signal to the dhcpcd process that is
currently running which forces dhcpcd to try to
renew the lease. If dhcpcd is not running, the flag
is ignored and dhcpcd follows the normal startup
procedure."
 
You could remove the entry in the dhcp.leases and restart dhcpd. I have tried this and there is only an extremely small break in communication with other systems. I only use this method if the method used by sonofepson doesn't work.
 
how about using

fconfig eth0 down

waiting a minute or so then going

fconfig eth0 up

i tried the dhcp thing and it just fetched the same ip from my adsl provider.
 
hey i am trying to find dhcp.leases and cant find it. I did find dhcpcd-eth0.info though and this is what it has:
is it the same as dhcp.leases, and should i delete it to try your suggestion (I am using mandrake)

IPADDR=216.232.164.60
NETMASK=255.255.248.0
NETWORK=216.232.160.0
BROADCAST=216.232.167.255
GATEWAY=216.232.160.254
DOMAIN=bc.hsia.telus.net
DNS=209.53.4.130,209.53.4.150,207.102.99.66,207.102.99.82
DHCPSID=209.53.4.153
DHCPGIADDR=216.232.128.254
DHCPSIADDR=209.53.4.153
DHCPCHADDR=00:50:FC:63:D7:5D
DHCPSHADDR=00:03:42:6B:00:05
....
 
If you want to try to get a new IP address then use: dhcpcd -k

This will send a SIGHUP to the currently running dhcpcd proccess, destroy the dhcpcd cache and send a DCHP_RELEASE to the dhcp server. There is still no guarantee that you will not get the same address again but it will request a new one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top