Re: commit 7e92b4fc34 - x86, serial: convert legacy COM ports to platform devices - broke my serial console

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 systems main: A bridge of main0 and main1 which is used as the primary LAN interface
  hbeat: Dedicated NIC for Linux-HA (HeartBeat)
debian: A Debian netinst net-boot VLAN with support for PXE and OpenFirmware
  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.

Cheers,
Kyle Moffett
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux