[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proposal: enable stateless persistant network interface names



Marc Haber wrote:
> On Fri, 8 May 2015 10:50:30 -0700, Josh Triplett
> <josh@joshtriplett.org> wrote:
> >Karsten Merker wrote:
> >> 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.
> >
> >That would only be a problem if you're using ifupdown and its hardcoded
> >network interface names.  Other network software handles dynamic names.
> 
> Do we have other network software other than ifupdown,
> systemd-networkd and network-manager, the latter handling dynamic
> names rather ungracefully.

wicd (to the best of my knowledge; I haven't used it), connman...

Pretty much everything other than ifupdown and tools built on or integrating
with ifupdown doesn't care what you name your network interfaces.

Also, what do you mean by NetworkManager handling dynamic names "ungracefully"?
Every time I've used it, it seems to handle any device I throw at it just fine.
I can plug in a wired or wireless network device it has never seen before, and
a few seconds later have a connection through that device.  (This isn't meant
as a "works for me, not a bug"; I'd like to know what issue you've observed.)

The only case I can think of where NetworkManager might not DTRT would be if
it's hamstrung by the ifupdown plugin and some statically defined networks in
/etc/network/interfaces.

> >Without this, you can't reliably use a system with *two* USB network
> >devices, because they won't consistently come up with the same names.
> >Or, for that matter, a system with a built-in network interface and a
> >USB network interface.
> 
> The current, purely udev-based method with persistent net generator
> foo will note the MAC address of the USB interface and make sure that
> it always gets the same ethX name. It is even possible to hand-edit
> 70-persistent-net.rules and make it come up as usbeth0, regardles of
> the port it is being plugged in.

You're right, sorry.  I was comparing ifnames to a lack of persistent
naming.  However, MAC-based persistent naming has many problems of its
own.  For instance, I've replaced USB network devices on headless
systems and found the new one ignored (and had to log in at the console
to disable MAC-based persistent naming).  I've moved USB drives between
systems, and had to disable MAC-based persistent naming on them.

ifnames also makes it possible to use a truly read-only, stateless root
filesystem shared between many systems, without requiring differences
due to network MAC addresses.

- Josh Triplett


Reply to: