Jump to content

eth0 wont fly at boot


Vdubjunkie
 Share

Recommended Posts

Hello all,

Not too terribly long ago I upgraded my server from 8.2 to 9.0 with a clean install. Honestly it is possible that I never had to reboot it once configured until recently when I discovered that after rebooting the eth0 did not come up at boot.

Oct  8 03:26:14 Server ifplugd(eth0)[805]: Using interface eth0/00:60:08:CC:14:77 with driver <3c59x> (version: LK1.1.16)

Oct  8 03:26:14 Server ifplugd(eth0)[805]: Using detection mode: SIOCGMIIPHY

Oct  8 03:26:14 Server ifplugd(eth0)[805]: ifplugd 0.15 successfully initialized, link beat not detected.

Oct  8 03:26:14 Server network: Bringing up interface eth0:  failed

all I have to do is to "ifdown eth0" & "ifup eth0" and it is online. Likely related to this, nmbd does not start at boot. However I also figured out tonight that my NIS was not functioning. I had to start ypbind manually. When I went to do that I was told that domainname was not set. Funny, it was before. So, I set it and started ypbind, and still I have no functioning NIS, but I'm sure I just need to start up all services in the right order on the various machines. Anyway, I am not sure if this is all related to the issue with eth0 not coming up at boot or what, but it is crippling my server.

Oh yeah, also, more important (often) than the rest is the fact that dns outside of my network does not function whatsoever. After deciding that MD uses "named" I think.. I went looking and found that the permissions on "/var/named" and "/var/run/named" were both set to the number associated with user "named". I don't know why this happens.

So, after fixing this problem and successfully starting the named service..

named     1135  0.0  0.3 10612 1780 ?        S    Oct08   0:00 named -u named

named     1143  0.0  0.3 10612 1780 ?        S    Oct08   0:00 named -u named

named     1144  0.0  0.3 10612 1780 ?        S    Oct08   0:00 named -u named

named     1145  0.0  0.3 10612 1780 ?        S    Oct08   0:00 named -u named

named     1146  0.0  0.3 10612 1780 ?        S    Oct08   0:00 named -u named

I still have no outside dns. My /etc/hosts file still gets my internal networking done, but that's just not good enough in today's day and age!

 

Anybody have any ideas about any of this? I know this is a cross between "Software" and "Networking" as it often is, but didn't know for sure which to put it in.

 

p.s. oh yes, I respectfully ask that nobody offer gui or wizard help as this ultimately does me no good. It is fine for some, but just leaves a lot to be desired. Read my signature for darned sake!! :)

Link to comment
Share on other sites

Are you using static IP....?

 

When you

ifup eth0 what does it tell you.

 

Since the if is not started then all the other NW services that start will also fail. This is normal.

 

However, it might be a IRQ problem.

I think its trying to auto detect the speed/duplex and failing.

You could try manually configring this....

I forget how exactly but its a switch in the ifconfig.

 

You won't have any DNS resolution because the service starts aftwer network (as it needs to)

What is your

 

resolv.conf

 

named is bind which is NIS not DNS.

It is only designed to work in an internal network.

Unless you have between say 10 and 1000 machines you probably don't need NIS.

 

Once the network is up you can try restarting your other services but I'd concentrate on getting it up at the right time.

 

If you change your resolv.conf to files,dns,nis (or leave out nis)

What is your routing looking like

 

ie. output of

route

 

if you wanna try you can update the iplookup tables with

route add default gw eth0

This should add the 0.0.0.0/255.255.255.255

 

You can then give the resolv.conf the IP of the DNS server directly.

(Im presuming the DNS server is either working or on another subnet)

 

Actually to be honest I think I need more info on your network.

How many subnets, where is your DNS resolution made. etc....

Link to comment
Share on other sites

Are you using static IP....?

Ok, I guess I'm bad about assuming people know what is going on in my mind. :) First, none of my boxes obtain an external ip. That is the job of my router (192.168.1.1). Each of my linux boxes has static ip. I fully understand the ip scheme, and that is all good.

When you 

ifup eth0 what does it tell you. 

Absolutely nothing. It just works. I follow it with an ifconfig, and there is the ip I have assigned it as opposed to if I do an ifconfig prior to the ifdown/ifup sequence immediately following a reboot.

Since the if is not started then all the other NW services that start will also fail.  This is normal.

I'm fine with this, it makes perfect sense. However I guess my problem is still that I don't know what service performs dns. I restarted NIS and it works fine, and I start nmbd and it works fine. I just don't know what to start for dns.

You won't have any DNS resolution because the service starts aftwer network (as it needs to)

Again, I'm good with this idea, I just don't know what to start.

What is your 

 

resolv.conf

search <internal network>

nameserver 192.168.1.1

named is bind which is NIS not DNS. 

It is only designed to work in an internal network. 

Unless you have between say 10 and 1000 machines you probably don't need NIS. 

I'm fully aware NIS is not necessary for my size network, however I am not planning for only my network if you know what I mean.

Once the network is up you can try restarting your other services but I'd concentrate on getting it up at the right time. 

I agree completely, but until then my server doesn't do much of what it needs to do, and seeing how it is not uncommon to go months without needing to reboot, figuring out what service to start to restore functionality is key to me right now, thus allowing me the time to concentrate on why the ifplugd doesn't "detect a link beat" or whatever it said.

If you change your resolv.conf to files,dns,nis (or leave out nis)

Now my nsswitch.conf looks like this

passwd: files nisplus nis winbind

shadow: files nisplus nis

group: files nisplus nis winbind

What is your routing looking like

Destination Gateway Genmask Flags Metric Ref Use Iface

192.168.1.0 * 255.255.255.0 U 0 0 0 eth0

127.0.0.0 * 255.0.0.0 U 0 0 0 lo

default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

 

as you can see I have already "route add default gw 192.168.1.1" and the default mask and eth0 work properly for my network. I have done this on both servers and all workstations. All other boxes work properly and run static ips.

You can then give the resolv.conf the IP of the DNS server directly. 

(Im presuming the DNS server is either working or on another subnet)

If I'm not mistaken (and I'm not too big to accept that I might be) this shouldn't be necessary (has never been in the past) since the default gw is set to my router.

Actually to be honest I think I need more info on your network.

How many subnets, where is your DNS resolution made.  etc....

Most of the rest of the info is above, but it is a single subnet and DNS is currently handled entirely externally and is processed for my network by my router which has the dns ips config'd on it. Again, the rest of the machines continue to function, so it likely isn't anything to do with their lack of function.

 

That's pretty much it. What else do you think? I could explore the possibility of IRQ conflict, but since it comes up with not one second of hesitation when I log in and perform the ifdown/ifup sequence, I tend not to think that. Perhaps the ifplugd program not "detecting a link beat" is not functioning properly since I do absolutely nothing to any hardware prior to the ifdown/ifup procedure. i.e.:

there is nothing that need take place in between these following processes for it to work

reboot

log in

su

ifconfig (no IP address obtainged by eth0)

ifdown eth0

ifup eth0

ifconfig (ip obtained by eth0 and network functionality restored)

Link to comment
Share on other sites

your resolv.conf file isn't correct. your router will not resolve domains for you. if you're using a router to get the external IP than that router is probably running DHCP which is the best way to setup your network so that your computers will get the DNS servers.

 

or you could check your router configs and just grab it from them....

Link to comment
Share on other sites

your resolv.conf file isn't correct.  your router will not resolve domains for you.

Funny thing is that even though it isn't correct, it does work. It always has, and continues to do so on all my other boxes. The weird thing here is that after losing power today and waiting for both of my raid devices to do integrity checks, the machine came up, and (being at work) I walked my wife through the commands to bring up the networking on the box. Now dns works again. Of course I did have to restart NIS and nmbd.

As far as dns, I know quite well that the router does not perform the dns, it allows a gateway to the internet. When my server and workstations have the entry in the routing table that their default gateway is 192.168.1.1(the router) they receive their access via the router. I do have one box that utilizes the dhcp of the router mostly because I don't much care to necessarily connect to it (shh... it's doze), but the rest I do much work on, and it simplifies things quite a bit to run static ips. Now, future development will place a bsd box in the place of the router and provide dhcp, and once that is all setup I won't mind my workstations having dynamic ips, but my servers will always have static ips. That is just the way to do it in my mind.

 

so.... I guess the point is back to why that interface won't come up at boot. If the lack of functioning dns doesn't reappear EACH time I reboot, it must have been an odd phenomena that may not repeat itself. Gowator's point has now moved to the top of the priority list. Figure out why eth0 doesn't come up at boot and fix that.

Link to comment
Share on other sites

I think i can guess!

 

Anyway, Ill throw some ideas in the air and see what we all think.

 

You suffer the same problem as me :D

My router/webserver etc. is critical.

So It doesn't get rebooted unneccarily.

However, inbetween i path this and that, start or retart services manually

 

Last time I rebooted, I was amazed that the NFS stalled startup for 10 mins ..

It had been working for months!

 

However, I remember I actually installed and started it by hand. I manually manpulted the routing tables to let nfs through but I didn't update the routing in init.d

(Its a bit strange...its a SME server which means all of /etc is actually generated from config files or diff's of config files)

 

Anyway, I can't see how your resolv.conf coulda worked unless

One of the other PC's was acting as a DNS forwarder ?

 

As I understand the DHCP should actually create your resolv.conf accrding to the information it gets from the dhcp server.

 

If I understand your router is giving out DHCP addresses assigned on MAC address?

 

When you get the DHCP stuff then it should also set the resolv.conf

So is your DHCP cleint activating properly BEFORE network ???

 

It might even be sleeping or something !

 

Second, when is NIS activated !

 

In effect you are a DHCP client from the router but a NIS server.

Starting NIS I think will then overwrite the resolv.conf.

If you restart your interface it will ask for an IP again, receive the routing stuff and overwrite resolv.conf (hopefully)

 

When I start my DHCP client it sets my default gw for me and also adds the search domain etc.

My DNS server on the router PC then acts as a local one

 

i hope this makes some sense.

I'd check the nis script in initd to see what its doing.

You obviously know what your doing so Im not bothering to tell you where theese files are etc. just hoping to provoke a memory of how you did it last time :D

Link to comment
Share on other sites

In effect you are a DHCP client from the router but a NIS server.

Starting NIS I think will then overwrite the resolv.conf.

If you restart your interface it will ask for an IP again, receive the routing stuff and overwrite resolv.conf (hopefully)

 

When I start my DHCP client it sets my default gw for me and also adds the search domain etc.

My DNS server on the router PC then acts as a local one

 

i hope this makes some sense.

I'd check the nis script in initd to see what its doing.

You obviously know what your doing so Im not bothering to tell you where theese files are etc.  just hoping to provoke a memory of how you did it last time :D

Thanks, I guess to clarify, I know a pretty fair amount about networking, and a few other things as well, but one question you brought up allows me to more clearly define my lack of knowledge. I'm in the process of learnign to bash script, so I can poke through scripts and MOL make sense out of them, but as far as determining boot order, I really don't know how that works. Some of the boot process is still a mystery to me in nix. (likely due to the fact that you almost never need to do it!!)

 

The other thing here is that I think in all my rambling I confused you. My server is not a DHCP client, but static. The resolf.conf file was created, and I don't believe has been changed from the beginning. All of the machines aside from the doze box(which I barely consider, it is for kids games and wife's internet) all route through the router for their net connection, and currently use their /etc/hosts file for resolution. (or NIS I guess for that matter).

Perhaps the order of operation of boot sequence is something to check into. I will beging to look around and try to figure out how to tell the order or boot processes, and keep checking back to see if you replied and might shed some light on it in case I don't find it easily. Either way I'll let you know what I find.

 

Oh yeah, incidentally, one thing I just found out is that I don't know, nor can I find out where (what file) NIS looks for domainname. The only filename I found in googleland does not exist on my machine. Not even once I set the name. The lack of a pre existing domainname during boot keeps NIS from starting up properly on both servers and workstations. (yet another, "since I never reboot" thing) :twisted:

Link to comment
Share on other sites

If its a FQDN then it includes the hostname.

Definitively changing the hostname after boot is a BAD thing.

 

You can do it ..ahem but its not really advised.

 

I'll try some more hints ???

run an

updatedb

as root

 

then locate will find all your occurences of a file :D

Startup order

 

/etc/rc(x).d

These directories are the init sequence

In here are files with a S or a K

S means start at the runlevel corresponding to the x in the directory name K means Stop (kill)

The order is strictly alphabetical. I.e. S_11jfk will execute before S_2fjrkj

 

anything not with a capital S or K is ignored.

_S78gfjdsg will be ignored for instance so you can play about making a copy....you can tag on the end as well (initials etc)

 

You can control the services with (see man)

chkconfig

Or with Drakservices or with linux conf etc.

I guess you'll prefer chkconfig :D

This only works for the initd sercives those for xinit d need their correspoinding file changing :D

 

NIS looks for domainname....

I have no NIS at home (I use LDAP) but like everything you can override it :D with regard to the conf files and their location.

 

On Solaris the default is /etc/yp/.....

So you would have

/etc/yp/hosts

 

You can also use the NIS automounter etc. and you would have the list of automounts here too. But of course you can specifiy any location.

 

As far as I know you will need a RARP jobby on the NW to resolve using NIS .. You have to remember it will be tricky becuase NIS is usually run on an unused box (Ive always set it up on a seperate server with NIS/DNS etc.) things act differently from this box .... than from the other boxes which use it. (If that makes sense)

If you wanna just get it working

You can manually add a route to your router (with the route add default gw) but you need to add a dns entry to your resolv order.

 

The other way is to let your box become a DNS slave to your ISP's DNS server. You can then update via RARP etc.

 

But I think what you are trying is to be a DNS client to the router ???

 

It might help if you could draw what your trying to achive, or somehow describe. ???

(If you want, email a picture and Ill post it )

With the exception of NIS and the winblows machine it sounds very close to what Im doing!

Link to comment
Share on other sites

  • 1 month later...

For those of you interested in the result of this, I have yet to actually replace the NIC, but after reloading a fresh install of 9.1 on this server to a totally different drive, I have made a not so big assumption that my NIC was to blame. I still find myself having to sign in and "bring up" my ethernet each time. It is always good to eliminate core and necessary software "glitches" as possibilities! :twisted:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...