linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: linux-hotplug@vger.kernel.org
Subject: A wish for network rules
Date: Sat, 09 Sep 2006 04:47:59 +0000	[thread overview]
Message-ID: <4502477F.10109@ums.usu.ru> (raw)

Hello,

Now udev distribution includes the scripts that generate persistent 
numbered symlinks for network devices and rules for keeping the ethernet 
device order between reboots. There is, however, one problem with the 
script.

Suppose that I have a computer with two network cards at home. One of 
them faces a wired network spanning several homes, with the wire going 
from one roof to the other. In summer, this network card is likely to be 
damaged by lightning, together with the switch (yes, there are devices 
that protect against this, but bad things happen even with them). I want 
to be able to replace this network card easily.

With the current generator, which generates persistent rules based on 
MAC addresses, the following steps are needed:

 * Power off the computer
 * Remove the damaged network card (let's suppose it was "eth0"), put 
another cheap RTL-8139 clone instead of it
 * Turn the computer on. It will detect the new card and assign a name 
such as "eth2" to it
 * Edit the generated rules and replace "eth2" with "eth0". Remove the 
original rule about "eth0"
 * Reboot again

However, in this use case, location-based rules such as the following 
one (sorry, it is for old version of udev) are preferred to MAC-based ones:

SUBSYSTEM="net", BUS="pci", ID="0000:00:0c.0", NAME="eth0"

This way, one just has to:

 * Power the computer off
 * Remove the damaged network card (let's suppose it was "eth0"), insert 
a new one in the same PCI slot
 * Turn the computer on again.

No reconfiguration is needed, because the new card becomes "eth0".

I want the network rule generator to become configurable via a file in 
/etc/default or in /etc/udev and allow to choose the style of network 
rules among the two described ones.

Similarly, one may wish (for unknown-yet reason) to have identity-based 
(i.e., model + serial number) rules for numbered CD-ROM symlinks.

-- 
Alexander E. Patrakov

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

                 reply	other threads:[~2006-09-09  4:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4502477F.10109@ums.usu.ru \
    --to=patrakov@ums.usu.ru \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).