How do you release an IP address in Red Hat 7.3
I have rogers Internet and I'm trying to release my IP address in red hat 7.3. i tried dhcpcd -d -k eth0 but it didn't work. Can anyone help me out. Much appreciated. Thank you.
|
Try
ifconfig eth0 down --Sarin |
im very much a begginer so could you explain yourself in detail. thank you.
|
As root type:
ifconfig eth0 down This will bring your network services down for your first ethernet card, which is referred to eth0. If you had a two, you would have eth0, eth1.. and so on. To bring your ethernet services back up, you would then type: ifconfig eth0 up Think of it as dhcp release, dhcp renew in the Windows world. |
It didnt work is there something wrong with my computer. Is there something I con do to correct it. PLEASE HELP ME!
|
I think dhcpcd gets the ip again. You must find a way to kill it. Try finding it's pid and issue a kill -9 pid ( I never used it. So don't know if it works ).
Also try /etc/init.d/network stop. The above command will just stop all network devices. --Sarin |
forgot a something. You atleast need lo working. So if you stop network just issue
ifconfig lo up --Sarin |
You might want to try something like this instead of just killing the process:
kill -SIGHUP 'cat /var/run/dhcpd.pid' It may be slightly different on other systems, but this will kill the process and restart it. You could also try this in this order: dhcpcd -k ifconfig eth0 down Then to bring back up: ifconfig eth0 up dhcpcd eth0 What happened when you did the ifconfig eth0 down and up ?? Just because you release and renew the IP doesn't mean it will give you a totally new IP address, if that is what your aiming for. Most ISP's, especially with cable modem will keep issueing the same IP for weeks, months and maybe years at a time. |
kill -SIGHUP 'cat/var/run/dhcpd.pid' seemed to almost work but it said that there was no such .pid. All the other commands gave me command not found
|
/sbin/ifconfig eth0 down
|
I tried
kill -SIGHUP 'cat /var/run/dhcpd.pid' but it said .pid not found. but other than that it seemed to work well. With the other commands it said command not found. Im trying to release the ip address so that i can switch my internet connection to my other computer. Thank you for all your help. |
Take care of back quotes in `cat /var/run/dhcpd.pid`.
Try cat /var/run/dhcpd.pid you will see the pid. then kill -1 pid --Sarin. |
I think I missed typed it.. it could be /var/run/dhcpcd.pid but it can vary though. Take a look in your /var/run/ directory, it should have it listed there.
|
I figured it out. It is dhcpcd -k
|
Quote:
|
All times are GMT -5. The time now is 10:04 AM. |