LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 10-03-2005, 09:20 AM   #1
ccico
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Rep: Reputation: 0
I need to reboot to make eth0 work. why?


Hi everybody!

I'm not a very experienced user. My dual-boot Debian (sarge) / Win2000 system works just fine, but:
1.
when I boot Linux, eth0 does not work. During boot time, it sends
different DHCPREQUESTS to the dhcp server and finally gives up with
the NO DHCPOFFERS RECEIVED message. In order to make it work,
I reboot the computer - on this second attempt, a DHCPOFFER is
always received with no problem from the dhcp server and eth0 is
brought up all right.
2.
when I boot Win2000 first, the network always works normally.
If I now reboot and choose Linux, eth0 gets the DHCPOFFER as
it should and everything is o.k. again.

I feel silly because when I come to work and want to start right
away with Linux, I need to turn my computer on, wait for it to boot,
then reboot and only then start working.
I thought that the problem was in the communication between the
dhcp server and my computer, so in the file /etc/network/interfaces,
I substituted the line
iface eth0 inet dhcp
with the following:
iface eth0 inet static
address ... blah blah
netmask ... blah blah
gateway ... blah blah
nameservers ... blah blah
where "blah blah" stands for the correct IP addresses.
But everything remained just the same: failure on first boot, success
after reboot.

The ethernet card is a 3Com EtherLink XL Cyclone (3c905B),
the driver I use is 3c59x. My kernel is 2.6.13, comes from kernel.org,
compiled with no problems. The driver is compiled right into the kernel,
not as a module. When I installed Debian, there was a 2.4 kernel in the
installation package, but this problem was already present from the
beginning.

Can anybody help? Thanks a lot in advance.
ccico
 
Old 10-03-2005, 09:28 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Which dhcp client does debian use?

I am not sure why you're not getting an IP at boot time. But there is no need to reboot. (There is rarely a need to reboot under Linux.)

You could tell whatever dhcp client you're using to send another request to get an IP after you've booted. Or you could use
Code:
ifdown eth0
and then
Code:
ifup eth0
 
Old 10-03-2005, 11:13 AM   #3
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Most of the servers are controlled in /etc/init.d so in the case of the network you can |start|stop|restart the server by doing as root from a consol /etc/init.d/networking restart. This applies to any of the servers in /etc/init.d
 
Old 10-03-2005, 11:58 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,039

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Are you turning on your modem at the same time as you turn on your PC?

The modem takes time to boot, establish a connection, authenticate etc.
Maybe win boots slowly and the modem has time to settle down, and perhaps linux is interrogating the modem sooner, before it is ready.
If you boot win first, then linux it will work the second time because the modem has had time to get ready.

So, try powering up your modem first, then starting your PC.

HTH
 
Old 10-04-2005, 04:44 AM   #5
ccico
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Hello everybody,
sorry, but nothing has worked. I will try to answer to all your messages:

anomie: I use the DHCP client from version 2 of the Internet Software Consortium DHCP package. This is what I got in the Debian installation CD - the package is named dhcp-client and the version is 2.0pl5-19.1.
I tried to write "ifdown eth0" and the system responded that eth0 was not up, so nothing happened. Then I tried "ifup eth0" and the DHCP
client failed to get an IP address, just like at boot time.

TigerOC: I typed "/etc/init.d/networking restart" but the DHCP client
again failed to get an IP address, just like at boot time.

tredegar: I do not use a modem, the computer is connected to the gateway with an optical fiber. At first, I also thought that the problem
was in the fact that the ethernet card had not been powered up yet
when the computer needed it. But if that was the case, the advices
from anomie or TigerOC would have worked, I guess...

One more observation for you to consider: if I do a HARD reboot
(i.e. with power off), the ethernet card fails to work again. I have to
do a SOFT reboot in order to make it work. In other words, the power
to the computer cannot be interrupted. Only then does eth0 initialize
properly.

Now I realize that I should tell you what the system actually says:

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/eth0/00:04:76:e6:fc:78
Sending on LPF/eth0/00:04:76:e6:fc:78
Sending on Socket/fallback/fallback-net
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
No DHCPOFFERS received.
No working leases in persistent database.
Exiting.
Failed to bring up eth0.

Could you have another look at this problem, please?
Thank you very much,
ccico
 
Old 10-04-2005, 10:21 AM   #6
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Do you have the line;

auto eth0

in the /etc/network/interfaces?
 
Old 10-04-2005, 11:28 AM   #7
ccico
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Yes, I do. The file contains only 4 lines (except for comments and blank lines). Here it is:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Regards,
ccico
 
Old 10-04-2005, 12:11 PM   #8
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
I would hazard a guess that what is causing most of your problems is likely to be the ethernet card. Check your log files, dmesg or syslog and find out if the card is borking. If its causing problems get a cheap realtek or similar card. I have a similar problem with one of my laptops that requires a network restart for the pcmcia card.
 
Old 10-04-2005, 12:26 PM   #9
aznluvsmc
Member
 
Registered: Aug 2004
Location: Newmarket, Ontario
Distribution: OpenSuse 10.2
Posts: 184

Rep: Reputation: 30
I've noticed a similair problem with SuSE 9.3. If I make any changes to the network card settings such as the SSID, the card will not receive an IP until I reboot the machine. Restarting the network interface doesn't help. I wonder if SuSE and your Debian use the same DHCP client program.
 
Old 10-11-2005, 04:12 AM   #10
ccico
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Original Poster
Rep: Reputation: 0
The problem has been solved. Thank you guys!
I removed the 3Com Fast Etherlink XL PCI card (3C905B - COMBO),
and inserted a 3Com Etherlink XL PCI card (3C900B - COMBO).
This hardware downgrade paid off very well. Note that I did not even need
to recompile the kernel, since both cards use the same driver. Everything started
to work all right automatically.
Many thanks to everybody!
ccico
 
  


Reply


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
No keyboard/mouse after reboot. Requires second reboot to work. rottie Linux - Hardware 6 01-16-2006 05:04 AM
Need to setup eth0 again after every reboot MJatIFAD Linux - Networking 4 11-01-2005 11:10 AM
eth0 config auto ;;;;reboot hermouche Ubuntu 1 09-10-2005 09:35 AM
eth0 configuration reset after reboot ChillyWillie Linux - Networking 1 05-31-2005 09:21 PM
eth0 (and eth1) lost on reboot larsonse Slackware 3 10-12-2004 03:58 AM


All times are GMT -5. The time now is 06:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration