Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Poweroutages and Ethernet, net.eth0 starting too fast
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
npaust
n00b
n00b


Joined: 23 Apr 2004
Posts: 70
Location: Walla Walla, WA

PostPosted: Thu May 19, 2011 7:53 pm    Post subject: Poweroutages and Ethernet, net.eth0 starting too fast Reply with quote

I have three gentoo boxes on a college campus network and I ran into an interesting problem over the weekend. Campus lost power and my machines gracefully went down after 15 minutes of running on their UPSs. Then, after an hour, power came back and I ran into an interesting problem. My machines rebooted before the ethernet switches powered back up, so they failed to get dhcp addresses. That made them inaccessible remotely until I physically logged into them an rebooted.

Is there an easy way to fix this problem? I was thinking about something like a cron job that does
Code:
/etc/init.d/net.eth0 start
once an hour. If it's already up, the command won't do anything. If it's down, it should start it.

Or, I'm using dhcp to get static addresses. Would it work to just hard code the IP address and gateway information, or would net.eth0 still fail to start without the reply from the switches?

Or, is there some other better solution? (One that doesn't require the tech services people to do their jobs and install UPSs on their multi-thousand dollar switches.)
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Thu May 19, 2011 9:49 pm    Post subject: Reply with quote

Try ifplugd, just install and enjoy.

Py
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 780
Location: Arrakis

PostPosted: Fri May 20, 2011 5:10 am    Post subject: Reply with quote

eh dhcpcd should do everything ifplugd does cable detection wise. I unplug my router all the time and dhcpcd always picks it back up again when i plug it back in. So your problem wont go away by using ifplugd

do you have dhcpcd service added to the runlevel or are you only calling it once when you boot?
_________________
A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it.

-The First Law of Mentat
Back to top
View user's profile Send private message
npaust
n00b
n00b


Joined: 23 Apr 2004
Posts: 70
Location: Walla Walla, WA

PostPosted: Fri May 20, 2011 6:11 pm    Post subject: Reply with quote

net.eth0 stars in the default runlevel. I'm not running dhcpcd... actually, that seems like it might be a problem! How exactly have my systems been running for the past years without dhcpcd running?

That's actually a serious question. How do I get a dhcp assigned IP address when I'm not running the dhcp client?
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1796

PostPosted: Fri May 20, 2011 7:01 pm    Post subject: Reply with quote

I think net.eth0 script starts dhcpcd somehow, but it seems it does not work well in all cases.

If you just use DHCP (no special configuration in /etc/conf.d/net), you can just remove net.eth0 from default runlevel and add dhcpcd instead. dhcpcd handles connecting and disconnecting of interfaces well by itself.
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2836
Location: Canada

PostPosted: Fri May 20, 2011 7:18 pm    Post subject: Reply with quote

npaust wrote:
net.eth0 stars in the default runlevel. I'm not running dhcpcd... actually, that seems like it might be a problem! How exactly have my systems been running for the past years without dhcpcd running?

That's actually a serious question. How do I get a dhcp assigned IP address when I'm not running the dhcp client?


In usual сетуп dhcpcd is not run as independent service. Client is called from network scripts
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum