[lkml]   [2007]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: commit 7e92b4fc34 - x86, serial: convert legacy COM ports to platform devices - broke my serial console
On Jul 27, 2007, at 17:05:30, Jeff Garzik wrote:
> Bjorn Helgaas wrote:
>> And couldn't we use udev to associate a fixed name with a MAC
>> address? Then the user could use the same persistent name,
>> regardless of the order in which the driver found the devices.
> I don't know about udev, but people are definitely using fixed
> names based on MAC address for ethernet devices already: nameif(8)
> and /etc/mactab, iftab(5) and ifrename(8).

I was doing that for a while, but now Debian and RedHat and most
other modern distros have a udev rules file called something like: /
etc/udev/rules.d/z30-persistent-net-generator.rules Under Debian it
generates a file /etc/udev/rules.d/z25-persistent-net.rules which
automatically renames net devices based on their mac address. The
persistent-net-generator takes the current name and MAC and stuffs
them in an appropriate file. So really once you've booted with the
network card in, all you have to do is modify the persistent-
net.rules file to change the name of your NIC and rerun udevtrigger.
I've gotten into the habit of using descriptive names lately (7 chars
is the most that ifconfig will show without truncating, and it seems
to be unable to properly sort/display/operate-on longer ones).

For example, my Debian firewall box has:
world: Connection to the cable modem
switch: Connection to my VLAN-capable switch
main0: "Primary" VLAN on my switch.
main1: A local gigabit switch for connections to a couple other
main: A bridge of main0 and main1 which is used as the primary LAN
hbeat: Dedicated NIC for Linux-HA (HeartBeat)
debian: A Debian netinst net-boot VLAN with support for PXE and
radius: A VLAN used by my wireless AP for radius traffic
wifi: A VLAN used for private wireless traffic

Most of those interfaces are virtual and created by custom "/etc/
network/if-pre-up.d/*" scripts, but you can see the "world",
"switch", "main1", and "hbeat" interfaces are actual physical
interfaces. Such naming (with appropriate comments in /etc/network/
interfaces) vastly eases the management of a box with a shitton of
interfaces. The fact that ifconfig has some outstanding bugs with
big interface names is mostly irrelevant since I use the iproute2
tool ("ip") to do almost all administration.

Kyle Moffett
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-07-29 19:25    [W:0.074 / U:1.540 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site