lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <A2444507-569E-4D35-A694-C8F0CD24ED00@mac.com>
Date:	Sun, 29 Jul 2007 13:21:33 -0400
From:	Kyle Moffett <mrmacman_g4@....com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	Bjorn Helgaas <bjorn.helgaas@...com>,
	Yinghai Lu <yhlu.kernel@...il.com>,
	Shaohua Li <shaohua.li@...el.com>,
	Sébastien Dugué <sebastien.dugue@...l.net>,
	linux-kernel <linux-kernel@...r.kernel.org>, ambx1@....rr.com,
	akpm@...ux-foundation.org, lenb@...nel.org, rmk@....linux.org.uk,
	mjg59@...f.ucam.org, castet.matthieu@...e.fr
Subject: Re: 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  
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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ