LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Network apearing as eth1 not eth0... (https://www.linuxquestions.org/questions/linux-networking-3/network-apearing-as-eth1-not-eth0-535318/)

madspikes 03-07-2007 04:03 AM

Network apearing as eth1 not eth0...
 
I have just installed 4 mandriva 2007 machines, and one has developed this little problem. Basically, the network apears as eth1 not as eth0, the problem is I have some software that looks for eth0 (not good I know, but there is nothing I can do about that) and it fails because there is no eth0. I have removed eth1 and reconfigured the networking using the GUI utils but it keeps coming back as eth1!

Any ideas on whay I can do?

Thanks,

Mad.

acid_kewpie 03-07-2007 04:23 AM

check the config in /etc/modules.conf for an entry assigning a driver to eth0 or eth1. additinoally check /etc/sysconfig/network-scripts/ifcfg-eth0 and ifcfg-eth1. it's possible that you maybe have eth0 set to require a certain mac address and you've changed cards? if you wish to delete both ifcfg-ethx files you will presumably be able to more easily reconfigure.

madspikes 03-07-2007 10:43 AM

Thanks for a replay, but that made not difference. I have a driver linked for both eth0 and eth1. I've tried various combinations of editing and deleting those file but it has made no difference.

nx5000 03-07-2007 10:56 AM

You don't have firewire by any chance?

Can you quickly check in this file:
/etc/udev/rules.d/z25_persistent-net.rules

jiml8 03-07-2007 11:35 AM

My system does this. There is an onboard NIC that failed, so I put another NIC into a PCI slot. System persists in detecting the onboard NIC as eth0 on startup. Very annoying. I know there's a feature someplace in the Mandriva control panel that'll let me turn off autodetect (I saw it once) but I haven't found it again and, since it only happens when I boot (a rare occurrence) I haven't made it a priority.

In any event, to deal with your problem you need to investigate the ifrename command. In the /etc/rc.d/init.d directory place a file called ifrename that looks something like this:
Code:

ifrename -i eth1 -n eth2
ifrename -i eth0 -n eth1
ifrename -i eth2 -n eth0

Then, in /etc/rc.d/rc5.d make a link to that file that will execute sometime between when the hardware is detected and before the network is started. That'll work.

EdR 03-07-2007 12:27 PM

I had a similar problem on my servers running RHEL4.

Answer I recieved from Dell----

My post-
"Has anyone else noticed that when you install RHEL4 AS on a PE2950 the ethernet ports are reversed. I have had this issue on all 4 of my 2950's. If I install RHEL3 AS it installs them normally.

Weird...."

Dell's reply
"Yes, we know. It is an issue with the Linux 2.6.x kernel: Workaround

Use the latest version of the name_eths utility to match BIOS and OS ordering of the ethernet ports on systems running RHEL 4 and SLES 10 on Dell servers, with the Dell supported Linux 2.6 kernel.

NOTE: The utility can be downloaded from htt p//linux.dell.com/files/name_eths/. The file name is of the form: name_eths 0.x, with x being the version number. Refer to the readme file included with the download for installation instructions. "

nx5000 03-07-2007 12:33 PM

Quote:

the ethernet ports are reversed.
What does this mean? What is supposed to be the order? The one on top should be eth0 and the one down eth1? Humm.


On linux using udev, just edit /etc/udev/rules.d/z25_persistent-net.rules and put the names you want. Here's mine


Quote:

# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.

# Firewire device 11111111111111 (ohci1394)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="11:11:11:11:11:11:11:11", NAME="eth0"

# PCI device 0x14e4:0x170c (b44)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:01:01:01:01:01", NAME="eth1"

# PCI device 0x8086:0x4220 (ipw2200)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:02:02:02:02:02", NAME="eth2"
Mandrake doesn't use udev?

jiml8 03-07-2007 02:52 PM

Quote:

Originally Posted by nx5000
What does this mean? What is supposed to be the order? The one on top should be eth0 and the one down eth1? Humm.


On linux using udev, just edit /etc/udev/rules.d/z25_persistent-net.rules and put the names you want. Here's mine




Mandrake doesn't use udev?

Mandrake uses udev.

I just edited my system based on this and deleted the entry for eth0, leaving eth1 (scripts now want to see that). The date on the file predates my last reboot, so perhaps this file isn't regenerated at every boot. We shall see.

On my system, the file to be altered was 61-net_config.rules

boyfren 03-07-2007 09:10 PM

i considered myself still an intermediate level when it comes to linux administration... i came upon the same problem and this is what I did. Try to delete all nics in your box. If you have onboard nic, disable it in your BIOS. Insert the NIC you wanted to be assigned as eth0, then voila!!! You may then enable your onboard nic and insert any NICs you want.... simple as that.

jschiwal 03-07-2007 09:19 PM

If the faulty onboard NIC card shows up in lspci, you could add the area of memory that it uses to a reserve boot entry.


All times are GMT -5. The time now is 09:45 PM.