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

Meaningful names; was Re (3): dreaded ethernet device renaming



Brian,

From:	briand@aracnet.com
Date:	Thu, 31 Mar 2011 19:39:14 -0700
> ... tacked the new eth onto the end, so eth0 ended up being renamed eth3.

The old Ethernet device remained in the rules file with the name eth0 and 
the new device was assigned the name eth3?  So the new device was just 
given the next integer available; not really renamed.  What was eth2 by the way?

I guess we can imagine a script or program which recognizes which devices 
are not currently present and reassigns to them, names such as eth0.absent, 
eth1.absent ... & etc.  Then the extant devices can be eth0, eth1 & etc.   
This leads to complications when one of the absent devices is reattached.

> I see why though.  a device might come and go and you want it to keep
> the same name.  so udev can't assume the devices are "gone", they might
> just be "resting".  beatiful plumage, the norwegian blue.

Names such as eth0 and eth0.absent still do not solve the problem of identifying 
external hot swappable devices.  Plug in three Linksys USB adapters yielding 
eth3, eth4 and eth5.  Which eth is which?  Meaningful names work.  
For example LinksysLCS218213733 is the one with LCS218213733 marked on it.  
The serial numbers are machine readable of course and a udev script to assign 
a name containing the brand name and the serial number isn't terribly 
difficult.  Editing /etc/udev/rules/70-persistent-net.rules is trivial.

Whether or not a name is meaningful depends upon the context.  eth0, eth1, 
eth2 are meaningful for the ISA bus.  Not meaningful for a contemporary 
machine with PCI, USB, Firewire and more.

http://en.wikipedia.org/wiki/Pattern_language
http://dz.ee.ethz.ch/en/information/hdl-help/vhdl-naming-conventions.html
http://www.newmedia.ethz.ch/Self-descriptiveness.htm
http://www-old.oberon.ethz.ch/WirthPubl/CBEAll.pdf

Use meaningful names.

Regards,                 ... Peter E.
  

-- 
Telephone 1 360 450 2132.
Shop pages http://carnot.yi.org/ accessible as long as the old drives survive.
Personal pages http://members.shaw.ca/peasthope/ .


Reply to: