Re: Proposal: enable stateless persistant network interface names
On Fri, May 08, 2015 at 07:59:31AM +0200, Martin Pitt wrote:
> Quick intro to the problem: The kernel generally detects network
> interfaces ("eth0", "wlan1", etc.) in an unpredictable and often
> unstable order. But in order to refer to a particular one in
> /etc/network/interfaces, firewall configs etc. you need to use a
> stable name.
> Details about [ifnames]
> This is a generic solution which extends the [biosdevname] idea and
> thus applies to all practical cases and all architectures. It doesn't
> need any persistant state (i. e. dynamic /etc/udev/rules.d/) and thus
> applies nicely to snappy/touch, and also avoids the race condition.
> The main downside is that by nature the device names are not familiar
> to current admins yet. For BIOS provided names you get e. g. ens0, for
> PCI slot names enp1s1 (ethernet) or wlp3s0 (wlan). But that's a
> necessary price to pay (biosdevname names look similar).
> As this hasn't been discussed yet, Debian and Ubuntu disable this by
> default. You can opt into this by booting with "net.ifnames=1" (which
> is a patch against upstream: there you disable it by booting with
> net.ifnames=0 or disabling 80-net-setup-link.rules).
> I propose to retire [mac], i. e. drop
> /lib/udev/rules.d/75-persistent-net-generator.rules and enable
> [ifnames] by default.
while this probably works resonably well for (semi-)fixed devices
like onboard-NICs and PCI/PCIe cards, it results in a completely
unsuitable behaviour with pluggable devices such as USB network
adapters. When using ifnames, the interface name depends on the
USB port into which the device is currently plugged and the
interface name changes when one uses a USB hub or plugs the
device into another host port. This would mean that a user would
always have to plug his USB network device into the same port
that was used during initial setup to keep it working, and
one-off use of a USB hub would require changing the network
configuration. Despite the problems of the MAC-based system
that we use currently, the ifnames method appears way worse
to me than what we have now.
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.