# Mysterious Networking Problems

## lmegliol

On a fresh Gentoo install I'm having strange inconsistent networking problems.  The motherboard I have has two built-in interfaces, one that uses the e1000 driver and one that uses the eepro100 driver.  As I was setting up the system I was using the eepro100 interface to get online, but I now need the configuration changed so that the e1000 is the net-connected interface.  I don't need the eepro100 any longer.

I changed /etc/conf.d/net so that the interfaces were correctly configured and I rebooted my system.  ifconfig shows that the e1000 interface is up and correctly configured, but no traffic is flowing over the interface.  dmesg shows no errors or problems.  It does show that one of the interfaces had to be renamed from eth1 to eth0, but I don't believe that is a problem.  There are no other errors in any logs.

I had the system shut down over night and on my first boot this morning, the interface worked fine!  So I reboot again to make sure the interface would come up again and it didn't work!  Not sure how that can be.

Along the way I've tried different network cables, I've made sure the contacts in the connectors are clean and not bent, I've tried recompiling the kernel, and I've tried everything else I can think of.  I'm not really sure where to start debugging this problem.

Why would an interface work on the first boot and then not the next, with no changes in between?

Can anyone guide me to a solution to this problem?  I'm happy to provide any further information.

----------

## NeddySeagoon

lmegliol,

Your network interface names should be fixed by  /etc/udev/rules.d/70-persistent-net.rules on recent installs.

Older installs require that you hand craft your own networking naming rules.

The randomness you observe is caused by the names being allocated on a first come first served basis and the startup sequence is not deterministic, so sometimes one interface is eth0 and sometimes its the other. Its normal behavioue if you like.

If you have /etc/udev/rules.d/70-persistent-net.rules you may edit it to swap the interface order or delete it to have udev recreate it, the order will be random but fixed. 

If you don't have that file at all, you should update udev as its easier than writing your own udev rules.

----------

## lmegliol

Thanks for the response.  I haven't been seeing randomness in the interface names.  They have been very consistent.  I only mentioned the startup message about the interfaces being renamed in the off chance that it was related to the more serious problem.  In the end the interfaces are always named the same.  The larger problem is that the one interface isn't working, with the exception of the one time I booted the system after it had been shut down for a night.  As far as I can tell everything is configured correctly and nothing changes between boots, so there is no reason for the interface to work sometimes and not others.

Thanks for the response.

----------

## lmegliol

The problem appears to be related to netconsole.  I normally use netconsole to capture console output, but when I have it turned on, the network doesn't start properly.  When turned off I think it works, though I haven't had enough reboots yet to officially declare it a pattern.  

I've never seen this problem with netconsole, so I'm not sure where to start.

I thought it might have something to do with the renaming of the devices and tried putting the incorrect interface name in the console start-up options in case the system had the names swapped before the udev rename happens, but that didn't seem to do anything.  It was a wild guess anyhow and may not reflect anything actually going on in the code.

----------

## lmegliol

Looks like the netconsole theory is wrong.  I've had it turned off for a while now and it doesn't always help.  Sometimes the networking works and sometimes it doesn't.

Is there anything else that could be blocking the correct functioning of the network?  As I said before, the drivers all seem to load correctly, ifconfig shows the interface correctly configured, but no traffic is flowing.  Not even a blinking like on the interface (there there is a light showing a link).

----------

## iivq

Is the "other" card physically disconnected?

Is there a DHCP server on your network?

Try rebooting the machines with the network interface unplugged. Maybe the boot order is caused by intterrupts because of data traffic - even though you say the interface names are properly assigned, I wouldn't be surprised at this at all.

----------

## lmegliol

Both interfaces are built into the motherboard, and I have not seen a way to disable either of the interfaces in the BIOS.  I will look to see if there is a jumper, but in the long run I'd still like both working.

There is a DHCP server on the network.  Is this a problem?

I've tried rebooting with both unplugged, and there is no difference.

For what it is worth, I previously had RedHat installed on this system (from 2002) and both interfaces worked fine.

----------

## lmegliol

Does the order of rules in 70-persistent-net.rules matter?

----------

## NeddySeagoon

lmegliol,

Nope, the rules match the MAC address of the interface to the interface name.

----------

