1 |
On Sat, 16 Sep 2006 00:28:30 -0700 |
2 |
felix@×××××××.com wrote: |
3 |
|
4 |
> I have a box with 5 ethernet ports -- or 4, if you don't count the |
5 |
> firewire ethernet which I don't have any use for anyway. |
6 |
> |
7 |
> Each boot, they come up with different assignments to the eth? |
8 |
> interfaces. It's annoying swapping cables until things start talking |
9 |
> to the right networks again. |
10 |
> |
11 |
> This is my /etc/udev/rules.d/10-net.rules file: |
12 |
> |
13 |
> # Onboard Gigabit |
14 |
> KERNEL=="eth*", SYSFS{address}=="00:E0:81:2A:58:C6", NAME="eth0" |
15 |
> |
16 |
> # Onboard Gigabit |
17 |
> KERNEL=="eth*", SYSFS{address}=="00:E0:81:2A:58:C7", NAME="eth1" |
18 |
> |
19 |
> # Onboard 100Mbps |
20 |
> KERNEL=="eth*", SYSFS{address}=="00:E0:81:2A:58:3B", NAME="eth2" |
21 |
> |
22 |
> # PCI card gigabit |
23 |
> KERNEL=="eth*", SYSFS{address}=="00:E0:4C:69:0C:2C", NAME="eth3" |
24 |
> |
25 |
> # PCI card firewire |
26 |
> KERNEL=="eth*", |
27 |
> SYSFS{address}=="00-11-06-66-45-55-56-5A-00-00-00-00-00-00-00-00", |
28 |
> NAME="eth4" |
29 |
> |
30 |
> Should this assign things properly? It doesn't, so I suppose the |
31 |
> answer is no, but how should I do it then? |
32 |
|
33 |
|
34 |
I have the following in my rules: |
35 |
|
36 |
SUBSYSTEM=="net", SYSFS{address}=="00:0b:db:9f:68:c0", NAME="base" |
37 |
|
38 |
and that works, although that's on an x86 box. Differences are (1) |
39 |
I've specified subsystem==net instead of kernel==eth*, and (2) the |
40 |
names are not already taken. I wouldn't expect to be able to use eth0 |
41 |
as a name for example, if another device already has that name. |
42 |
|
43 |
When using new names, you need to create symlinks |
44 |
from /etc/init.d/net.<newname> to /etc/init.d/net.lo, and setup the |
45 |
interface information appropriately in /etc/conf.d/net, e.g. |
46 |
|
47 |
config_base=( "192.168.0.201/24 brd 192.168.0.255" ) |
48 |
|
49 |
etc |
50 |
|
51 |
Also check you're up-to-date with udev - on several versions network |
52 |
device renaming doesn't work due to bugs; I'm using udev-0.87-r1 (latest |
53 |
stable for both arches). |
54 |
|
55 |
-- |
56 |
Kevin F. Quinn |