On 29/03/13 12:24, Duncan wrote:
Samuli Suominen posted on Fri, 29 Mar 2013 10:09:27 +0200 as excerpted:

This feature will also replace the functionality of sys-apps/biosdevname
which you should uninstall. However, you can still keep using
sys-apps/biosdevname if you want.

I'd suggest...

This feature can optionally replace... can uninstall.

IOW...

s/will also/can optionally/

s/should/can/


It sounds less menacing than your suggested wording, making it clearer
that it's an optional replacement and lessening the apparent conflict and
possible confusion with the next sentence saying it can still be used if
desired.

I'd say that's a particularly good idea given the sensitivity around the
"all engulfing gray goo" that systemd has seemed to many to have become.
Given that upstream specifically designed this feature to cooperate with
existing biosdevname installations, let's not unnecessarily poke that
hornet's nest by implying otherwise, even if the next sentence /does/
basically say it's an optional change anyway.  =:^/


OK, new one attached, should be better
Title: The new default predictable network interface naming with udev
Author: Samuli Suominen <[email protected]>
Content-Type: text/plain
Posted: 2013-03-29
Revision: 1
News-Item-Format: 1.0
Display-If-Installed: <sys-fs/udev-201

If you still have network interface renaming rules in /etc/udev/rules.d,
like 70-persistent-net.rules, you will need to modify or remove them.

If you choose to modify them, you will need to pick a free namespace (like
net* or internet*) that is not reserved by the kernel (like eth* or wlan*)
because in-place renaming has been deprecated[1].
You should also rename the file to something else, like 70-my-network.rules
to silence the deprecation warning coming from when you emerge udev.

This is old format:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx",
NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="yy:yy:yy:yy:yy:yy",
NAME="eth1"

This is new format:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx",
NAME="net0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="yy:yy:yy:yy:yy:yy",
NAME="net1"

With the new predictable network interface naming scheme which upstream enabled
by default you don't have to rename anymore because the names will be static
and not randomly rename when you, for example, upgrade the kernel. This can be
very important aspect, for example, security in mind.

If /etc/udev/rules.d/80-net-name-slot.rules is a empty file, or if it's a
symlink to /dev/null, the new names will be disabled and kernel will do
all the interface naming, which will be random.

The new names can also be disabled using net.ifnames=0 kernel option.

In normal new installation there is no files put in /etc/udev/rules.d and if
you haven't edited any files you have in there, you should most likely delete
(backup) them all out of the way.

You can find out using udevadm command what your interfaces will be called
before booting to make necessary changes, such as changing net.* symlinks
in /etc/init.d.

This is the example command:

# udevadm test-builtin net_id /sys/class/net/eth0 2> /dev/null

The output could be (and I'm only picking the most important line for this
example):

ID_NET_NAME_PATH=enp2s0f0

This would mean your eth0 will be called enp2s0f0 if there is no previously
mentioned files blocking the new names taking place in /etc/udev/rules.d.

This is documented more throughly at upstream wiki[2] which everyone should
read at least once.

This feature can also replace the functionality of sys-apps/biosdevname, but
you can still keep using it if you want.

[1] http://www.kernel.org/doc/htmldocs/device-drivers/API-device-rename.html
[2] http://www.freedesktop.org/wiki/Software/systemd/
    PredictableNetworkInterfaceNames

Reply via email to