public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Samuli Suominen <ssuominen@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: Request of news item review: 2013-03-29-udev-predictable-network-interface-names.en.txt
Date: Fri, 29 Mar 2013 14:20:20 +0200	[thread overview]
Message-ID: <51558704.20904@gentoo.org> (raw)
In-Reply-To: <51557D48.5010008@flameeyes.eu>

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On 29/03/13 13:38, Diego Elio Pettenò wrote:
> On 29/03/2013 12:29, Samuli Suominen wrote:
>> One you can control, the another you can't. So still not FUD.
>
> You do not really control it any more than the kernel. The fact that me
> and you can edit an udev ruleset to "control" it, does not mean that
> most users see it as a black box.

I don't agree with that, /etc/udev/rules.d and overriding udev rules is 
very basic administration, very basic...
I'll put a bit more trust on our users.

> The news item reads better. I would still either avoid showing the
> NET_PATH example or describe that that is not the final result because
> on a laptop, NET_PATH almost certainly will *not* match the final
> interface name:
>
> flame@saladin~ % udevadm test-builtin net_id /sys/class/net/eno1 2>/dev/null
> ID_NET_NAME_MAC=enx0026b9d7bf1f
> ID_OUI_FROM_DATABASE=Dell Inc
> ID_NET_NAME_ONBOARD=eno1
> ID_NET_LABEL_ONBOARD=en Onboard LAN
> ID_NET_NAME_PATH=enp0s25
>
> And I would not expect users to all go read the wiki and try to figure
> out why you said it would be named enp0s25 when it gets the name eno1.
>

Nod.
Attached new version again, more generic than before.
Hope it'll do what it's meant to do... push users into right direction...
It's not meant to be a complete documentation or rewrite of the upstream 
wiki page :-p
Just a push...

[-- Attachment #2: 2013-03-29-udev-predictable-network-interface-names.en.txt --]
[-- Type: text/plain, Size: 3099 bytes --]

Title: The new predictable net iface names
Author: Samuli Suominen <ssuominen@gentoo.org>
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. The default names can be calculated from the slots being
used for the cards, but it can be changed to use, for example, MAC
addresses. This is documented in the upstream wiki[2].

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.

However, if your system has only one network interface card,
for example, eth0, you don't necessarily need this feature at all.
Use the forementioned methods to disable the feature in that case if
you want.

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 for getting attributes of the current eth0
network device:

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

Assuming there are no leftover rules in /etc/udev/rules.d that would
prevent the new names from being enabled, it's most likely either
ID_NET_NAME_ONBOARD or ID_NET_NAME_PATH lines you should be looking
at for the new name in default configuration. This ordering 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	other threads:[~2013-03-29 12:21 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29  8:09 [gentoo-dev] Request of news item review: 2013-03-29-udev-predictable-network-interface-names.en.txt Samuli Suominen
2013-03-29 10:24 ` [gentoo-dev] " Duncan
2013-03-29 10:26   ` Samuli Suominen
2013-03-29 10:46     ` Diego Elio Pettenò
2013-03-29 10:50       ` Samuli Suominen
2013-03-29 11:01         ` Diego Elio Pettenò
2013-03-29 11:29           ` Samuli Suominen
2013-03-29 11:38             ` Diego Elio Pettenò
2013-03-29 12:20               ` Samuli Suominen [this message]
2013-03-29 12:33                 ` Diego Elio Pettenò
2013-03-29 12:47                 ` Michael Mol
2013-03-29 13:24                 ` Andreas K. Huettel
2013-03-29 13:30                   ` Rich Freeman
2013-03-29 13:44                     ` Samuli Suominen
2013-03-29 14:35                       ` Rich Freeman
2013-03-29 14:45                         ` Samuli Suominen
2013-03-29 14:55                           ` Rich Freeman
2013-03-31  8:41                           ` Walter Dnes
2013-03-31 10:21                             ` Nuno J. Silva (aka njsg)
2013-03-29 19:20                 ` Ian Stakenvicius
2013-03-29 20:03                   ` Diego Elio Pettenò
2013-03-31  1:06                 ` Philip Webb
2013-03-31  1:17                   ` Samuli Suominen
2013-03-31  1:20                     ` Diego Elio Pettenò
2013-03-31 10:18                     ` Nuno J. Silva (aka njsg)
2013-03-31 11:36                     ` Andreas K. Huettel
2013-03-31 14:22                     ` Philip Webb
2013-04-01  1:56                       ` [gentoo-dev] Re: Request of news item review: 2013-03-29-udev-predictable-network-interface-names.en.txt : SOLVED Philip Webb
2013-04-01  9:23                         ` Markos Chandras
2013-04-01 15:32                           ` Philip Webb
2013-04-01 17:06                             ` Markos Chandras
2013-04-01 19:53                               ` Michael Mol
2013-04-01 20:14                                 ` Markos Chandras
2013-03-29 11:34           ` [gentoo-dev] Re: Request of news item review: 2013-03-29-udev-predictable-network-interface-names.en.txt Chí-Thanh Christopher Nguyễn
2013-03-29 11:40             ` Diego Elio Pettenò
2013-03-29 16:21               ` Nuno J. Silva (aka njsg)
2013-03-29 16:40                 ` Markos Chandras
2013-03-29 17:38                   ` Rich Freeman
2013-03-29 22:27                     ` Walter Dnes
2013-03-29 18:03                 ` Samuli Suominen
2013-03-29 18:59                   ` Nuno J. Silva (aka njsg)
2013-03-29 11:13 ` [gentoo-dev] " Ulrich Mueller

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=51558704.20904@gentoo.org \
    --to=ssuominen@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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