Gentoo Archives: gentoo-user

From: Daniel da Veiga <danieldaveiga@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] modules.conf - alias for eth devices - can't set the correct interface number
Date: Thu, 26 Oct 2006 16:39:04
Message-Id: 342e1090610260931g4ef48044kc04136ba7e4b1e34@mail.gmail.com
In Reply to: [gentoo-user] modules.conf - alias for eth devices - can't set the correct interface number by Claudinei Matos
1 On 10/26/06, Claudinei Matos <claudineimatos@×××××.com> wrote:
2 > Hi guys,
3 >
4 > I'm changing my third network card (a 3c905cx) with a 3c905B one. Well, the
5 > drivers are the same and the slot used is also the same.
6 > My machine has other two NICs, one onboard (via-rhine) and a old realtek
7 > 8029 10/10 (ne2k-pci).
8 > On my /etc/modules.d/aliases I have the 3 lines below:
9 >
10 > alias eth0 via-rhine
11 > alias eth1 ne2k-pci
12 > alias eth2 3c59x
13 >
14 > and it works very well setting each device to the right eth interface until
15 > I'd start to change the NICs, sometimes it does not work but shuting down
16 > and powering up the machine again used to solve.
17 > now, since I'd changed the NICs, every time I boot up my machine the third
18 > device (3com) is associated with eth3 and eth2 does not have any device
19 > associated.
20 > my dmesg says that the interface eth2 was associated with the ne2k-pci but
21 > ifconfig tells that eth1 is ne2k-pci and eth3 (which doesn't appear at dmesg
22 > log) is the 3com one.
23 >
24 > ti01 myers # ifconfig eth3 up
25 > ti01 myers # ifconfig|grep eth
26 > eth0 Link encap:Ethernet HWaddr 00:50:8D:84:A8:4F
27 > eth1 Link encap:Ethernet HWaddr 00:C0:DF:EA:D6:49
28 > eth3 Link encap:Ethernet HWaddr 00:50:04:6E:9C:AB
29 >
30 > ti01 myers # dmesg|grep eth
31 > eth0: VIA Rhine II at 0xec061000, 00:50:8d:84:a8:4f, IRQ 193.
32 > eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link 45e1.
33 > eth2: RealTek RTL-8029 found at 0xa400, IRQ 209, 00:C0:DF:EA:D6:49.
34 > eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
35 >
36 > ti01 myers # dmesg|grep 3Com
37 > 0000:00:0a.0: 3Com PCI 3c905B Cyclone 100baseTx at ffffc20000228000.
38 >
39 > Well, I do not have any idea about how to fix it or what may be wrong since
40 > it is supposed to just setup /etc/modules.d/aliases and run modules-update
41 > to generate /etc/modules.conf.
42 > One extra information is that booting in single mode (init=/bin/bash) the
43 > interface order is ok. Could it be a udev problem?
44 >
45 > Thanks for the help,
46 >
47
48 I'm pretty sure you can use UDEV rules to set it, something like this:
49
50 # cat /etc/udev/rules.d/10-local.rules
51 BUS=="pci", KERNEL=="eth[0-9]", SYSFS{address}=="00:2a:9a:d4:65:32", \
52 NAME="lan0"
53 BUS=="pci", KERNEL=="eth[0-9]", SYSFS{address}=="00:a0:5d:3e:ae:54", \
54 NAME="lan1"
55
56 Where SYSFS{address} is the MAC address of the card.
57 --
58 Daniel da Veiga
59 Computer Operator - RS - Brazil
60 -----BEGIN GEEK CODE BLOCK-----
61 Version: 3.1
62 GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
63 PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
64 ------END GEEK CODE BLOCK------
65 --
66 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] modules.conf - alias for eth devices - can't set the correct interface number Claudinei Matos <claudineimatos@×××××.com>