LinuxQuestions.org
Review your favorite Linux distribution.
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-11-2006, 04:16 AM   #1
driesel
LQ Newbie
 
Registered: Feb 2005
Posts: 6

Rep: Reputation: 0
problem: loosing eth0 interface after reboot


Hi,

My Ubuntu 6.06 system is running really great now.

But I have one small problem.
Whenever I reboot my PC, the network interface (eth0 wired network to router) is disconnected (sometimes not).
Doing System => Administration => Networking and then deactivating and activating eth0 again (DHCP) solves the problem.
Personally, I can live with this. But the problem is I'm not the only person using the PC.

I feel the has to be a way to permanently have the network interface up and running properly, but I can't figure out how.

Does anyoneknow what I've misconfigured? Should I use a static local IP instead of DHCP?


Otherwise:

Although I do prefer a more 'clean' solution,
How can I make a script that automatically reactivates the eth0 interface on boot up?




greetings,
driesel

Kindly awaiting your professional response .
 
Old 07-11-2006, 09:03 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
Quote:
Does anyoneknow what I've misconfigured? Should I use a static local IP instead of DHCP?
since you have a router it is probably your DHCP server... youll need to confirm this though.

can you post your /etc/network/interfaces file?
 
Old 07-13-2006, 03:20 AM   #3
driesel
LQ Newbie
 
Registered: Feb 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Hi,

Originally this was the content of my etc/network/interfaces configuration file:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
And the I changed it to this:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0

# The primary network interface
auto eth0
iface eth0 inet dhcp
It seems that the hotplug part made some improvements, since using this configuration kept my eth0 connected ever since.
This may well be false because I'm using this config for only 1 day .

greetings,
driesel
 
Old 07-13-2006, 11:24 AM   #4
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
Quote:
# The primary network interface
auto eth0
iface eth0 inet dhcp
the 'auto eth0' should make the device activated at boot.
im not sure what kind of startup scripts ubuntu/debian uses, so look around. in slackware theyre based in /etc/rc.d/rc.* and i could just add the command 'ifconfig eth0 up' to have it automatically come up at each boot, but i dont think ubuntu uses those same scripts. check it out though.
 
Old 07-13-2006, 12:28 PM   #5
driesel
LQ Newbie
 
Registered: Feb 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Well,

To begin, the hotplug section that I've put into /etc/network/interfaces really made some difference.
The startup scripts are based in etc/init.d, so I could add a script in there with "ifconfig eth0 up".
 
  


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
Reboot LFS6.1:Interface eth0 doesn't exist! ukyo Linux From Scratch 4 09-07-2005 06:04 AM
interface eth0 problem Birgi Linux - Networking 4 02-22-2005 12:56 PM
iptables - loosing entries after reboot mule Linux - Security 7 08-21-2003 12:49 AM
eth0 interface intialization fails during reboot from windows to linux dhanakom Linux - Networking 6 07-20-2003 07:10 PM
Loosing hardware settings on reboot..? ScreeminChikin Linux - General 1 09-09-2002 03:46 PM

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

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

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