LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-20-2002, 08:25 PM   #1
Nsean
LQ Newbie
 
Registered: Jul 2002
Posts: 7

Rep: Reputation: 0
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.
 
Old 07-20-2002, 09:03 PM   #2
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
Try
ifconfig eth0 down
--Sarin
 
Old 07-20-2002, 10:16 PM   #3
Nsean
LQ Newbie
 
Registered: Jul 2002
Posts: 7

Original Poster
Rep: Reputation: 0
im very much a begginer so could you explain yourself in detail. thank you.
 
Old 07-21-2002, 02:28 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 07-21-2002, 07:57 AM   #5
Nsean
LQ Newbie
 
Registered: Jul 2002
Posts: 7

Original Poster
Rep: Reputation: 0
It didnt work is there something wrong with my computer. Is there something I con do to correct it. PLEASE HELP ME!
 
Old 07-21-2002, 08:12 AM   #6
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
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
 
Old 07-21-2002, 08:14 AM   #7
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
forgot a something. You atleast need lo working. So if you stop network just issue
ifconfig lo up
--Sarin
 
Old 07-21-2002, 11:18 AM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.

Last edited by trickykid; 07-21-2002 at 03:32 PM.
 
Old 07-21-2002, 11:58 AM   #9
Nsean
LQ Newbie
 
Registered: Jul 2002
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 07-21-2002, 12:35 PM   #10
dnar
Member
 
Registered: Feb 2002
Location: Perth, Australia
Distribution: FC5 ::: Coyote ::: SCO Unixware :::
Posts: 201

Rep: Reputation: 30
/sbin/ifconfig eth0 down
 
Old 07-21-2002, 12:46 PM   #11
Nsean
LQ Newbie
 
Registered: Jul 2002
Posts: 7

Original Poster
Rep: Reputation: 0
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.
 
Old 07-21-2002, 01:16 PM   #12
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
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.
 
Old 07-21-2002, 01:31 PM   #13
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 07-21-2002, 03:25 PM   #14
Nsean
LQ Newbie
 
Registered: Jul 2002
Posts: 7

Original Poster
Rep: Reputation: 0
I figured it out. It is dhcpcd -k
 
Old 07-21-2002, 03:32 PM   #15
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing IP address in Red Hat 7.2 glock19 Linux - Networking 13 10-28-2012 10:47 PM
Red Hat does not plan to release another product in the red hat linux line... Whitehat General 5 11-03-2003 06:33 PM
Red Hat 10 Release? niteshadw Red Hat 3 10-11-2003 07:05 PM
March 31 with the release of Red Hat Linux 9, code-named Shrike. futurist Linux - Distributions 1 03-26-2003 02:11 AM
Red Hat 8.0 release essention Linux - General 2 01-09-2003 01:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration