How to enable "Predictable Network Interface Names"?

Version 220-7 on Debian dropped the patch that made this opt-in:

* Switch to net.ifnames persistent network interfaces (on new
  installations/for new hardware), and deprecate the old
  75-persistent-net-generator.rules.

This came about from a proposal in debian-devel list. Systems which were using the old naming won't be renamed until the user migrates. Read README.Debian for the migration guide.

The new name can be predicted by using:

sudo udevadm test /sys/class/net/eth0 2>/dev/null |grep ID_NET_NAME_

where eth0 is the current name of the device.


I assume you're talking about sid or jessie. For wheezy you may want to try the backport of v204.

There may be some misconceptions in play here: as can be seen from the udev rules here (for v208 currently in sid), the udev developers explicitly chose the kernel cmdline as the default way of enabling this functionality.
I don't see anything inherently "overkill" with using the chosen interface for it and simply putting GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=1" in /etc/default/grub. Is there any specific side-effect you're worried about?

The fact that the answer you mentioned suggests removing a file to disable it is a hack (at least in Debian's case) that wouldn't work in the long-term because in debian those rules are stored in /lib/udev/rules.d, i.e.: they would get overwritten in an upgrade (besides, disabling functionality by effectively removing the file that describes it makes some sense, but enabling it is fundamentally different, so I think this is an unfair comparison).

OTOH, if you have a concrete reason for not using the kernel cmdline, you could report a bug against the debian package and have the maintainer move these rules to /etc/udev/. Then you could theoretically switch between the current "persistent" and the new "predictable" rules.

But just FYI: looking at the sources for version 209, it seems to get rid of the net.if_names check altogether, so your question may need some readdressing in the near future.