Won't connect to network on fresh start only on reboot
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Won't connect to network on fresh start only on reboot
I am currently trying to set up a headless web server with one of my old computers. I am running Fedora Core 3 and Apache 2.0 for the webserver. The problem I am having is that the eth0 will not connect to the network on a fresh start (the computer starting from power off). It is only possible to connect to the local network once I reboot.
The weird thing is that if I set the connection to static, ifconfig says that eth0 is connected with a valid ipaddress, but I cannot ping/connect to the router or anyother computers on the network, I can ping the given local ipaddress however. when I log onto the router from a different computer on the local network the router lists the computer as being connected.
If I set the ip address to dhcp it never establishes a connection at all on first bootup.
Upon rebooting the system everything works as it should. I have tried different routers (same brand different model) but that has no effect. Below is the status of the config files for the network (there are two: one for when the network works and the other for when it doesn't). Notice that the configuration files are exactly the same for the working and non working status.
The only difference I have noticed is in the bootup log. Something extra is happening on the reboot that I believe is fixing my problem. I a section from the boot log that has to deal with the network and is different for the two different start ups (one from power off and one from reboot).
First the configurations for the nonworking setup as well as the results of some network commands: ******************************
May 19 20:06:39 localhost nfslock: rpc.statd startup succeeded
May 19 20:06:37 localhost NET: /sbin/dhclient-script : updated /etc/resolv.conf
May 19 20:06:37 localhost ifup: done.
May 19 20:06:37 localhost NET: /etc/sysconfig/network-scripts/ifup-post : updated /etc/resolv.conf
May 19 20:06:37 localhost network: Bringing up interface eth0: succeeded
Note for a static IP I get the following for both working and nonworking configs.
Code:
May 25 22:58:20 webhost network: Bringing up interface eth0: succeeded
It looks as if the dhclient-script is correcting my resolv.conf file but as I have shown the file is the exact same in the working and nonworking state.
I am fairly new to linux admin and this is about the extent of my knowledge so please bear with me.
Thanks,
-Scrappy
Last edited by superscrappy; 05-26-2005 at 07:38 PM.
First of all, did you look for the routes ("/sbin/route") in both cases?
I did look your config and the once strange thing I found is your hostname: "localhost" is almost a synonym to "lo" and 127.0.0.1.
I already saw machines configured this way but they were not good performers. In several hosts files there are notes to not mix the hostname with "127.0.0.1" and, by consequence, I suppose, with "localhost" also.
May be it confuses the kernel routes, with unpredictable results. I would suggest you to change the "/etc/sysconfig/network" to a different name and update /etc/hosts to make sure you have:
I have no clue where that came from. I know at one time I might have turned one of my linux boxes into a DNS in an attempt to fix my current problem. Maybe this is where it came from. It shows up on all three of my linux systems but not on my roomates WinXP (we are all on the same local network). There should only be one network. My setup is the typical local network controlled by a router that connects to the internet.
I tried the following:
Code:
/sbin/route del -net 169.254.0.0 netmask 255.255.0.0 dev eth0
Deleting that strange route had no effect on the working or nonworking config.
Another interesting thing is that our internet connection seems to be going out a lot ever since I've been messing around with this server. Could just be my provider but I don't really have a clue if I could be effecting the connection or not.
Is there a way to find out why/where this 169.254.0.0 address is coming from?
Again I apologize for my lack of admin knowledge.
Thanks for your help,
-S
Last edited by superscrappy; 05-26-2005 at 07:23 PM.
I did some research (google) on this address and discovered this is the APIPA, (Automatic Private IP Address). It's a reserved address for stations configured for DHCP client which don't find a dhcp server.I already found that there are some discussion on Red Hat Mailing List on FC3. This remembered me about another thread here in LQ about resolving issues on FC3. This thread Core 3 DNS resolving problem deserves your visitation.
I inserted the alias commands into my modprobe.conf file, and it had no effect.
I also disabled APIPA w/IP address: 169.254.0.0
with
Code:
NOZEROCONF=yes in my ifcfg file.
Restarting my network connection takes away the strange address but has no effect on my connection.
Also upon rebooting the following routes appear (note I have left the NOZONECONF=YES option on):
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
The also has no effect.
I tried disabling the firewall /sbin/service iptables stop
I can still not ping anything besides my own computer.
I still don't understand how I can have a static IP address and the router says its connected and yet I cannot ping anything outside my computer, including the router. Also when I type the command:
Code:
/sbin/ethtool eth0
Settings for eth0:
No data available
Thanks for the suggestions, do you have any other ideas??
Thanks,
-S
Last edited by superscrappy; 05-26-2005 at 07:23 PM.
Hi Super,
Looking at your last post, some things changed. The address 196.254.0.0 is now on "lo" interface. I suggest you to look the "/etc/sysconfig/network-scripts/ifcfg-lo". All the configurations in that file must be 127.0.0.something. It cannot have any NOZEROCONF option. If there is one, delete it.
As your overall configuration, I'm breaking my mind to understand why do you need dhcp. All your addresses are static, including the gateway and dnsserver. I wonder if you are getting this 169.254 because, as you have a fixed address, you cannot get a dynamic one and the logic is establishing a APIPA because you couldn't get it. (I hope I'm being clear as my English vocabulary is very limited.)
I re-read all the thread to see what we are missing and I think I found the reason for dhclient being invoked. It's in the "/etc/sysconfig/network-scripts/ifcfg-eth0": you have "PEERDNS=yes" and "USERCTL=yes". I would suggest you to change both to "no". PEERDNS means "get the dns address from the peer when establish the connection". It's used when you have a ppp or you are driven by dhcp. You don't need it because you know the dns server is 192.168.1.1. The second is already used by dynamic interfaces which must be manipulated by a normal user.
Thanks again for the help. I should clarify something from my original post. The boot.log that I displayed was when I tried to connect with dhcp. When I set everything to static I don't get that message at boot. Instead I get the following for both (working and nonworking) configurations:
Code:
May 25 22:58:20 webhost network: Bringing up interface eth0: succeeded
Sorry about the confusion, that was my fault for not explaining that. But even though it says eth0 is up I still cannot ping the router.
My ifcfg-lo is as follows:
Code:
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback
So from what I can tell it looks OK. I turned the PEERDNS and USERCTL to no but this again had no effect (but I assume you where thinking the dhcp client was being called because of these settings due to my unclear original post).
Looking at my original ifconfig results I see that (RX packets:0 and RX bytes:0 (o.o b) ) I assume these are the packets received. Which would make since for an unconnected eth0, but then again my router sees the connection and identifies the right MAC address for my NIC. Puzzling
Anyway, sorry about the bad original info I hope this clarifies my predicament better.
-S
Last edited by superscrappy; 05-26-2005 at 07:21 PM.
Now I need to look for some ground. You told in the first post you got an old machine. How old is that? Does it use ISA network board? Does the route shows the 169.254.0.0 yet? May you post the following details of the configuration:
Just for the sake of clarity, tell me if I'm right: I understood that the network does not work on the power up but works after a reboot. If your answer is "yes", I would you to try another nic. We must note that when the machine is powered up, the mother board gives an electrical reset to all the logic. On reboot it's just a soft reset. May be some component in the nic is sensitive to this difference.
I understood that the network does not work on the power up but works after a reboot.
Thats exactly my problem. On reboot a static or dhcp setting works, but neither works on bootup even though a static setup claims it is connected and so does the router. I will look around for another NIC and let you know if I have any luck.
My current NIC is an ISA card: 3COM - NET ETHER 10/100BOARD PCI
The computer was mfg in 2000.
route is still showing the 169.254.0.0 address for lo device
here is the info you requested. Note this was taken when the network was not working, I don't know if that matters or not.
Looking for the installed modules, it seems you have a firewall. Would you try to disable it to see if it is the responsible for the lack of network?
Did you try to change the nic? By the way, this nic is a PCI type, not ISA. The former were the boards compatible with the ancient pcs, since the AT generation.
I switched out my NIC w/ my roomates and it worked perfectly. I probably should have tried this early, I was thinking it had to be the software since the card worked on reboot, but aparently I was wrong. Thanks for all the help!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.