On Thu, 03 Apr 2014 08:17:46 -0500, Dale Schroeder wrote:
> 
> It looks like that discussion is almost 3 years old.

Debian is just now switching to systemd.  udev was a separate
package in wheezy.  Under jessie it is part of systemd.
And the systemd version of udev has made some changes.
> 
> Do you know what the current status is with udev;
> e.g. can static entries be generated manually?

/etc/udev/rules.d/70-persistent-net.rules will still work on
boot-up, if you have one.  It just won't be maintained
automatically anymore.  If you installed wheezy, then did
an upgrade to jessie, you should still have a 70-persistent-net.rules
file, because it is left over from wheezy.  If you do a fresh
install of jessie using the jessie installer, I'm not sure if
a 70-persistent-net.rules file will be created by the installer
or not.  I haven't tried that scenario.  But you can always
create one manually if you like.

If you only have one network interface of a given type, you
probably don't need this file.  After all, if your machine only
has one ethernet interface, it's a pretty safe bet that it will
be called eth0.  On the other hand, if your machine has two
ethernet interfaces, one will be called eth0 and the other will
be called eth1, but which interface gets which name is theoretically
unpredictable, and can theoretically change from one boot to the
next.  It is for these situations that 70-persistent-net.rules
comes in handy.

So, for example, let's say your machine has two ethernet interface
cards, and you currently have a 70-persistent-net.rules file.
Now let's say that you have to replace one of them.  You shutdown
your system, power it off, remove the cover, remove the old NIC,
insert the new NIC, replace the cover, power on, and boot Debian.
Logon to the console as root.  Issue

   ifconfig -a

and make a note of the MAC addresses of each interface.  Now edit
the file /etc/udev/rules.d/70-persistent-net.rules.  Compare the
MAC addresses in this file with the MAC addresses you recorded from

   ifconfig -a

It is now obvious which old MAC address is missing and which new
MAC address is now present which wasn't there before.  Find the
entry in /etc/udev/rules.d/70-persistent-net.rules that has the
old MAC address that is no longer present.  Edit that line and change
the old MAC address to the new MAC address.  Save the file and
exit the editor.  Now shutdown and reboot.

There is one final caveat: kernel space interface names, such as eth0,
eth1, etc., are not recommended, because this may lead to race
conditions between the kernel and udev during boot.  User-defined
names, such as net0, net1, etc. are recommended.  Here's an example
/etc/udev/rules.d/70-persistent-net.rules file from one of my
dual-interface systems:

   SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:02:b3:af:c2:b1", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="net1"
   SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:02:b3:af:c3:8d", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="net0"

As you can see, I used net0 and net1 as interface names instead of
eth0 and eth1, respectively, as I did on my wheezy system.  But this
means, of course, that any other configuration files that reference
the interface by name must be changed also.  For example, if the
interfaces are controlled by ifupdown, change /etc/network/interfaces
to use the new names.

In short, this "bug" is not a bug.  It is an intentional design change
made by upstream.  70-persistent-net.rules is not going to be created
or maintained automatically anymore.  But it is still honored during
boot, if it is present; and you can now specify user-defined interface
names, which is the recommended practice.

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to