Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 03-08-2008, 07:41 AM   #1
Registered: Feb 2006
Distribution: Slackware 13.1 / 13.37
Posts: 91

Rep: Reputation: 16
rc.inet1 doesn't give me a new DHCP IP

I have two DSL routers. Each one gives me a different DHCP IP.

When I switch between the two routers I need to get a new IP, so I try to run:

/etc/rc.d/rc.inet1 restart

/etc/rc.d/rc.inet1 stop
/etc/rc.d/rc.inet1 start
but nothing happens. If I change the router then I have to restart the computer to get a new IP.

Is there a way to re-new my IP without restarting?
Old 03-08-2008, 08:24 AM   #2
Registered: Dec 2005
Distribution: Slackware 14.2_64_multilib - freebsd - devuan
Posts: 85

Rep: Reputation: 23
Have you tried to alter /etc/resolv.conf?

You may need to enter something like

search lan
nameserver <whatever the gateway is for the router. this generally is set to the ip address of the router - or what you type into the browser window to contact the router. in my case or depending on which router I am using.>

You can have two nameserver ip's here ir you are using two routers at the same time.

then run /etc/rc.d/rc.inet1 restart to see what happens.

good luck.
Old 03-08-2008, 10:22 AM   #3
Registered: Apr 2007
Location: SLC, UTAH
Distribution: Slackware
Posts: 200

Rep: Reputation: 34
you have to remove your /etc/dhcpc/
or equivalent.
Old 03-10-2008, 05:38 PM   #4
Registered: Feb 2006
Distribution: Slackware 13.1 / 13.37
Posts: 91

Original Poster
Rep: Reputation: 16
I managed to do it. Each time I swap the routers, I just have to:

/etc/rc.d/rc.inet1 stop

ifconfig eth0 down
and then:

/etc/rc.d/rc.inet1 start
And it works!

Before that, I tried adding "search lan" on /etc/resolv.conf but it didn't worked. I tried removing the .pid but it still didn't worked. Something felt wrong.

I sat down and examined how I have connected all the cables and then I remembered that I have added a switch: router -> switch -> pc. I removed the switch and it still didn't worked.

At that point, I noticed that I can have one one swap between the two routers: from router 1 -> 2 *or* 2 -> 1. I couldn't make a second switch. Then I noticed that even if stoped rc.inet1, ifconfig still showed that eth0 was up.

That's when it hit me!

Thank you guys! I wouldn't have ended there if I was alone.

slackbat, there is something that you said that made me interested to learn more. I only have one Ethernet card and a switch, can I have applications use the first or the second router? Or perhaps type a command to swap between the two routers instead of plugging in and out of Ethernet cables? That would be cool! If not, I will consider buying a second Ethernet card to achieve this. Just point me to a document or some keyword to google.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
suse 10.1 DHCP client via cable modem does not give a IP address... jojolx Linux - Hardware 11 12-09-2006 05:04 AM
rc.inet1 and a DHCP address ve1drg Slackware - Installation 2 11-11-2006 06:19 PM
Debian as home router; dhcp doesnt give out ips Tangshan Linux - Networking 2 08-01-2006 12:52 AM
Lynksys router, no DHCP. Have to use IP manualy, some one give me low down. RHLinuxGUY Linux - Networking 1 07-08-2004 03:16 AM
DHCP doesn't give the ip daznis Linux - Networking 2 04-17-2003 05:09 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:04 AM.

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