Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Change NIC ordering
Date: Sun, 11 May 2008 18:24:37
Message-Id: 5bdc1c8b0805111124vfb67ba5gb456205a7ddfaed3@mail.gmail.com
In Reply to: Re: [gentoo-user] Change NIC ordering by Dirk Heinrichs
1 On Sun, May 11, 2008 at 11:13 AM, Dirk Heinrichs
2 <dirk.heinrichs@××××××.de> wrote:
3 > Am Sonntag, 11. Mai 2008 schrieb Mark Knecht:
4 >
5 >
6 > > In a machine with two NICs:
7 > >
8 > > 1) How do I configure which is considered eth0?
9 >
10 > Use udev to name them as you like, see
11 > http://reactivated.net/writing_udev_rules.html.
12 >
13 >
14 > > 2) After drivers are loaded how do I see what hardware is using which
15 > > driver?
16 >
17 > Check dmesg output.
18 >
19 > HTH...
20 >
21 > Dirk
22 >
23
24 Hi Dirk,
25 I found the 70-persistant-net.rules file with these contents:
26
27 # This file was automatically generated by the /lib/udev/write_net_rules
28 # program run by the persistent-net-generator.rules rules file.
29 #
30 # You can modify it, as long as you keep each rule on a single line.
31
32 # PCI device 0x10b7:0x9202 (3c59x)
33 SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:11:d8:f4:ce:e3", NAME="eth0"
34
35 # PCI device 0x8086:0x1229 (e100)
36 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
37 ATTR{address}=="00:90:27:17:91:5d", ATTR{type}=="1", KERNEL=="eth*",
38 NAME="eth1"
39
40
41 I think instead of writing something new that might fight with this
42 it's intended that I just change this file. If I turn things around
43 like this:
44
45 # PCI device 0x8086:0x1229 (e100)
46 SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:90:27:17:91:5d", NAME="eth0"
47
48 # PCI device 0x10b7:0x9202 (3c59x)
49 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
50 ATTR{address}=="00:11:d8:f4:ce:e3", ATTR{type}=="1", KERNEL=="eth*",
51 NAME="eth1"
52
53 that I should have a pretty good chance of success.
54
55 Off to give it a try.
56
57 - Mark
58 --
59 gentoo-user@l.g.o mailing list