netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* is it a backwards compatability catch-22?
@ 2006-04-24 23:47 Rick Jones
  2006-04-24 23:54 ` Stephen Hemminger
  2006-04-25 19:10 ` Michal Schmidt
  0 siblings, 2 replies; 6+ messages in thread
From: Rick Jones @ 2006-04-24 23:47 UTC (permalink / raw)
  To: Linux Network Development list

I might be out to lunch, certainly it happens often enough :)  I've 
spent the afternoon trying to stop my NIC names from being "random" on 
each boot.  To that end, I've been doing udev rules based on an example 
I found at http://www.debianhelp.co.uk/udev.htm  In this case I'm 
running a Debian 2.6.15-1 kernel.

It seems that the SYSTEM{address} looks for a case senstive match on the 
address (MAC) of the interface in rules like these:

lumber:~# cat /etc/udev/rules.d/010_netinterfaces.rules
KERNEL="eth*",SYSFS{address}=="00:30:6e:4c:27:3c", NAME="eth0"
KERNEL="eth*",SYSFS{address}=="00:30:6e:4c:27:3d", NAME="eth1"
KERNEL="eth*",SYSFS{address}=="00:12:79:9e:0e:d2", NAME="eth2"
KERNEL="eth*",SYSFS{address}=="00:12:79:9e:0e:d3", NAME="eth3"
KERNEL="eth*",SYSFS{address}=="00:0c:fc:00:08:71", NAME="eth4"

it seems to want lower-case hex because that is what comes out of SYSFS. (?)

Of course, ifconfig -a gives HW addresses in "uppercase" hex:

lumber:~# ifconfig -a | grep HW
eth0      Link encap:Ethernet  HWaddr 00:30:6E:4C:27:3C
eth1      Link encap:Ethernet  HWaddr 00:30:6E:4C:27:3D
eth2      Link encap:Ethernet  HWaddr 00:12:79:9E:0E:D2
eth3      Link encap:Ethernet  HWaddr 00:12:79:9E:0E:D3
eth4      Link encap:Ethernet  HWaddr 00:0C:FC:00:08:71

and some of the dmesg stuff - notably e100:

lumber:~# dmesg | grep eth
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
eth1: Tigon3 [partno(BCM95700A6) rev 0105 PHY(5701)] (PCI:66MHz:64-bit) 
10/100/1000BaseT Ethernet 00:30:6e:4c:27:3d
eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] Split[0] WireSpeed[1] 
TSOcap[0]
eth1: dma_rwctrl[76ff2d0f]
e1000: eth2: e1000_probe: Intel(R) PRO/1000 Network Connection
e100: eth3: e100_probe: addr 0x80020000, irq 57, MAC addr 00:30:6E:4C:27:3C
eth4: Neterion Xframe I 10GbE adapter (rev 4), Version Version 2.0.9.3, 
Intr type INTA
e100: eth0: e100_watchdog: link up, 100Mbps, half-duplex

While it isn't a "showstopper" it does become a bit inconvenient to have 
to "downshift" the MAC when taking it from ifconfig to use in the udev 
rules.  Any chance the two can agree on one or the other?  Or is each 
locked in a backwards compatability embrace?

rick jones

and of course, arp matches ifconfig:

lumber:~# arp -an
? (15.4.89.87) at 00:12:79:94:F8:24 [ether] on eth0
? (15.4.88.1) at 00:00:0C:07:AC:00 [ether] on eth0

not that arp in and of itself matters in this situation.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-04-25 19:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-24 23:47 is it a backwards compatability catch-22? Rick Jones
2006-04-24 23:54 ` Stephen Hemminger
2006-04-25  0:38   ` Rick Jones
2006-04-25 16:09     ` Jesse Brandeburg
2006-04-25 18:34       ` Rick Jones
2006-04-25 19:10 ` Michal Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).