LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-07-2007, 04:03 AM   #1
madspikes
LQ Newbie
 
Registered: Jan 2007
Posts: 8

Rep: Reputation: 0
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.
 
Old 03-07-2007, 04:23 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 03-07-2007, 10:43 AM   #3
madspikes
LQ Newbie
 
Registered: Jan 2007
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 03-07-2007, 10:56 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
You don't have firewire by any chance?

Can you quickly check in this file:
/etc/udev/rules.d/z25_persistent-net.rules
 
Old 03-07-2007, 11:35 AM   #5
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
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.
 
Old 03-07-2007, 12:27 PM   #6
EdR
LQ Newbie
 
Registered: Sep 2004
Distribution: RHEL AS3, AS4 / Vector
Posts: 22

Rep: Reputation: 15
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. "
 
Old 03-07-2007, 12:33 PM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
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?

Last edited by nx5000; 03-07-2007 at 04:52 PM.
 
Old 03-07-2007, 02:52 PM   #8
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
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
 
Old 03-07-2007, 09:10 PM   #9
boyfren
LQ Newbie
 
Registered: Jan 2007
Posts: 13

Rep: Reputation: 0
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.
 
Old 03-07-2007, 09:19 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
  


Reply



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
Two network cards, change eth0 and eth1 Axelll Linux - Hardware 2 11-27-2006 07:05 PM
SLow Speeds ETH1 > ETH0 > Local network - Help!!! Tekel Linux - Networking 2 09-29-2004 05:12 PM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 05:57 PM
eth0 and eth1 with 2 network interfaces codegomer Linux - Networking 12 04-20-2004 10:04 PM
Mandrake 9.2 can't get network running on eth0 or eth1 but can on wlan0 llindir Linux - Networking 2 03-20-2004 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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