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

Re: USB tethering and interface naming on Debian/unstable



On Fri 06 May 2016 at 00:57:35 (+0200), Vincent Lefevre wrote:
> On 2016-05-02 08:49:20 -0500, David Wright wrote:
> > On Mon 02 May 2016 at 11:28:47 (+0200), Vincent Lefevre wrote:
> > > What is the rule for interface naming when doing USB tethering
> > > on Debian/unstable (with systemd)?
> > > 
> > > In December, I had enx02060b0e3333, but yesterday, I had enp0s20u2.
> > > Isn't the interface supposed to be fixed?
> > 
> > Not fixed; but predictable. See:
> > https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
> > 
> > It would appear you have moved from scheme 4 to scheme 3, ie from
> > 4. Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
> > to
> > 3. Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
> 
> Any reason why? I haven't changed anything in my configuration.

Difficult for me to say. The only jessie I'm running at present is an
upgrade from squeeze/wheezy and Debian policy is AFAIK to leave things
as they are. You have to install jessie afresh for Debian to use the
new methods automatically.

> How can I move back to scheme 4? With a .link file? Scheme 3 doesn't
> make sense for USB tethering, because there are various USB ports,
> and anyone can be used.

The last paragraph under the heading "What precisely has changed in v197?"
says "This combined policy is only applied as last resort. That means,
if the system has biosdevname installed, it will take precedence. If
the user has added udev rules which change the name of the kernel
devices these will take precedence too. Also, any distribution
specific naming schemes generally take precedence." So I'm guessing
that that is what locks in my "eth0"/"wlan0" names. I assume the file
concerned is /etc/udev/rules.d/70-persistent-net.rules which has the
lines:

# PCI device 0x14e4:0x1600 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:23:12:34:56", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:bf:12:34:56", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

The machine which uses a netgear dongle has:

# USB device 0x:0x (ndiswrapper)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="c4:3d:c7:12:34:56", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

So you might want a line that looks like (using my mangled addresses):

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="c4:3d:c7:12:34:56", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="enxc43dc7123456"

Cheers,
David.


Reply to: