Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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.
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.
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.
Originally posted by Nsean I figured it out. It is dhcpcd -k
Yeah, you almost had it right in your first post, you definitely didn't need that -d flag. I did mention trying that in an earlier post. Glad you got it working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.