User avatar
VascoFerraz
Posts: 80
Joined: Thu Aug 30, 2012 11:54 am

Predicable names on stretch are confusing me

Mon Oct 02, 2017 11:13 am

I made a fresh stretch install on a RPi-3.

Shouldn't I get something like enx000 or wlx000 instead of eth0, wlan0 and wlan1?

Image

/etc/network/interfaces is empty.
If I do: sudo ifdown wlan0
I get: ifdown: unknown interface wlan0
Vasco Ferraz

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Predicable names on stretch are confusing me

Mon Oct 02, 2017 11:17 am

The newest version of Stretch (2017-09-07) uses the "old" names. The earlier version uses the predictable names.

You can change that with rpi-config. After running update and upgrade, run raspi-config and select 7 and then A7.

With Stretch, ifup and ifdown no longer work. Use these:
sudo ip link set wlan0 up
sudo ip link set wlan0 down

User avatar
B.Goode
Posts: 8987
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Predicable names on stretch are confusing me

Mon Oct 02, 2017 11:19 am

At the time of writing on 2 October 2017 there have been two releases of Raspbian Stretch. The first had Predictable Interface Names enabled by default. The second, current release has Predictable Interface Names disabled.

User avatar
VascoFerraz
Posts: 80
Joined: Thu Aug 30, 2012 11:54 am

Re: Predicable names on stretch are confusing me

Mon Oct 02, 2017 11:31 am

Thank you so much for both replies.

For further reference I downloaded and installed the image yesterday (1st of October).
Version: September 2017
Release date: 2017-09-07
Kernel version: 4.9
SHA-256: a64d742bc525b548f0435581fac5876b50a4e9ba1d1cd6433358b4ab6c7a770b
Vasco Ferraz

User avatar
VascoFerraz
Posts: 80
Joined: Thu Aug 30, 2012 11:54 am

Re: Predicable names on stretch are confusing me

Mon Oct 02, 2017 11:40 am

Second question :)

With your help, I realised that I have the old scheme name interface but the "75-persistent-net-generator.rules" file missing.

I copied the file from a running Jessie version into "/lib/udev/rules.d", added the "wlanx" to the white list...

...but the "70-persistent-net.rules" didn't show at "/etc/udev/rules.d".

What am I missing?
Vasco Ferraz

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Predicable names on stretch are confusing me

Mon Oct 02, 2017 9:07 pm

sudo raspi-config advanced menu has a switch for old names versus predictable names. All of my raspberries are using predictable names.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
VascoFerraz
Posts: 80
Joined: Thu Aug 30, 2012 11:54 am

Re: Predicable names on stretch are confusing me

Tue Oct 03, 2017 11:20 am

DougieLawson wrote:
Mon Oct 02, 2017 9:07 pm
sudo raspi-config advanced menu has a switch for old names versus predictable names. All of my raspberries are using predictable names.
I installed the version with predictable names enabled by default but the "75-persistent-net-generator.rules" file is still missing.

"/etc/network/interfaces" is empty.

I only added my network to the "/etc/wpa_supplicant/wpa_supplicant.conf"

Installed, samba, changed default ssh ports, edited fstab... and everything works as expected.

I am not sure if this is a bug or a feature.
Vasco Ferraz

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6086
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Predicable names on stretch are confusing me

Tue Oct 03, 2017 11:38 am

VascoFerraz wrote:
Tue Oct 03, 2017 11:20 am
DougieLawson wrote:
Mon Oct 02, 2017 9:07 pm
sudo raspi-config advanced menu has a switch for old names versus predictable names. All of my raspberries are using predictable names.
I installed the version with predictable names enabled by default but the "75-persistent-net-generator.rules" file is still missing.

"/etc/network/interfaces" is empty.

I only added my network to the "/etc/wpa_supplicant/wpa_supplicant.conf"

Installed, samba, changed default ssh ports, edited fstab... and everything works as expected.

I am not sure if this is a bug or a feature.
What's the problem exactly?
"75-persistent-net-generator.rules" is from Jessie, not Stretch.
/etc/network/interfaces should be empty if you're using dhcpcd

User avatar
VascoFerraz
Posts: 80
Joined: Thu Aug 30, 2012 11:54 am

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 8:33 am

ShiftPlusOne wrote:
Tue Oct 03, 2017 11:38 am
What's the problem exactly?
"75-persistent-net-generator.rules" is from Jessie, not Stretch.
/etc/network/interfaces should be empty if you're using dhcpcd
I have two wlan cards and I want to make sure that wlan0 is fixed for IP x.x.x.x and MAC aa:aa:aa:aa:aa:aa and wlan1 is fixed for IP y.y.y.y and MAC bb:bb:bb:bb:bb:bb

On Jessie I used "75-persistent-net-generator.rules" and "70-persistent-net.rules for that.

On Stretch I don't know how to do it.
Vasco Ferraz

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6086
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 9:58 am

It works a bit differently on stretch.

In raspi-config, enable predictable interface names, under advanced options.

Read up on it here:
https://www.freedesktop.org/wiki/Softwa ... faceNames/

If that doesn't suit your needs, you can try disabling it and copying the old persistent interface names udev rules in from Jessie.

User avatar
VascoFerraz
Posts: 80
Joined: Thu Aug 30, 2012 11:54 am

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 10:40 am

ShiftPlusOne wrote:
Wed Oct 04, 2017 9:58 am
It works a bit differently on stretch.

In raspi-config, enable predictable interface names, under advanced options.

Read up on it here:
https://www.freedesktop.org/wiki/Softwa ... faceNames/

If that doesn't suit your needs, you can try disabling it and copying the old persistent interface names udev rules in from Jessie.
Thanks :)
Vasco Ferraz

User avatar
VascoFerraz
Posts: 80
Joined: Thu Aug 30, 2012 11:54 am

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 10:46 am

I have predicables names enabled but wlan0 is still using old name scheme?!

What am I missing?

Image
Vasco Ferraz

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6086
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 12:45 pm

It looks like the predictable names don't apply to the onboard wifi, so it should always come up as wlan0. Off the top of my head, I don't know why. Possibly because it's connected via SDIO rather than USB.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 12:49 pm

ShiftPlusOne wrote:
Wed Oct 04, 2017 12:45 pm
It looks like the predictable names don't apply to the onboard wifi, so it should always come up as wlan0. Off the top of my head, I don't know why. Possibly because it's connected via SDIO rather than USB.
Just to add to the conversation: It doesn't always come up as wlan0 if you don't use predictable names. If you have a usb wireless dongle connected, the onboard wifi occasionally comes up as wlan1.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6086
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 1:07 pm

SurferTim wrote:
Wed Oct 04, 2017 12:49 pm
ShiftPlusOne wrote:
Wed Oct 04, 2017 12:45 pm
It looks like the predictable names don't apply to the onboard wifi, so it should always come up as wlan0. Off the top of my head, I don't know why. Possibly because it's connected via SDIO rather than USB.
Just to add to the conversation: It doesn't always come up as wlan0 if you don't use predictable names. If you have a usb wireless dongle connected, the onboard wifi occasionally comes up as wlan1.
*sigh*... lovely.

Perhaps it's time to look into why the predictable interface names don't apply to onboard wifi and fix it then.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 1:11 pm

If you use predictable names, the onboard wifi always comes up as wlan0. The usb dongle will come up with the wlx12345 name. i like the new raspi-config option of changing the interface naming scheme. Now I have an option if I am using two wifi interfaces.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6086
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 1:19 pm

SurferTim wrote:
Wed Oct 04, 2017 1:11 pm
If you use predictable names, the onboard wifi always comes up as wlan0. The usb dongle will come up with the wlx12345 name. i like the new raspi-config option of changing the interface naming scheme. Now I have an option if I am using two wifi interfaces.
Ah sorry, I misread. I thought you said that onboard wifi sometimes comes up at wlan1 even with predictable names enabled.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Predicable names on stretch are confusing me

Wed Oct 04, 2017 1:34 pm

That is exactly why I wanted to make that clear. Stretch has been a network challenge. I use two wifi interfaces now and then, and how they are set up are different, since you can't assign different wpa_supplicant.conf files in /etc/network/interfaces. Now you must name the wpa_supplicant.conf files with the network name appended, like
/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
/etc/wpa_supplicant/wpa_supplicant-wlx12345.conf

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Predicable names on stretch are confusing me

Fri Oct 06, 2017 8:38 pm

SurferTim wrote:
Wed Oct 04, 2017 1:11 pm
If you use predictable names, the onboard wifi always comes up as wlan0. The usb dongle will come up with the wlx12345 name. i like the new raspi-config option of changing the interface naming scheme. Now I have an option if I am using two wifi interfaces.
That's not true.

These three Raspberries 3Bs have on-board WiFi

Code: Select all

** Challenger**
wlxb827ebd88739  UP             192.168.1.29/24
** Endeavour **
wlxb827ebfbcc71  UP             192.168.1.31/24
** Intrepid  **
wlxb827eb404ca4  UP             192.168.1.19/24
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Predicable names on stretch are confusing me

Fri Oct 06, 2017 8:44 pm

Ok, then I meant mine always comes up as wlan0. Stretch 2017-09-07

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Predicable names on stretch are confusing me

Fri Oct 06, 2017 10:10 pm

Did you migrate from Jessie to Stretch. If you did you need to find any systemd file that's involved with disabling predictable names in Jessie.

sudo rm /etc/systemd/network/99-default.link /lib/systemd/network/99-default.link
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Predicable names on stretch are confusing me

Fri Oct 06, 2017 10:25 pm

No. Fresh install.

Just out of curiosity, why doesn't the wlan0 interface come up with a predictable name? The ethernet interface comes up with the enx<mac address> name. Shouldn't the onboard wireless do that also?

Edit: I'll start watching for mac addresses on the wireless interface to insure the onboard wlan is booting up as wlan0.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: Predicable names on stretch are confusing me

Fri Oct 06, 2017 10:39 pm

The Orwellian naming scheme only affects USB devices.

eth0 is a USB device (even though it is "on-board').

The on-board wireless (on the 3B or the 0W) isn't.
If this post appears in the wrong forums category, my apologies.

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Predicable names on stretch are confusing me

Fri Oct 06, 2017 10:49 pm

SurferTim wrote:
Fri Oct 06, 2017 10:25 pm

Just out of curiosity, why doesn't the wlan0 interface come up with a predictable name? The ethernet interface comes up with the enx<mac address> name. Shouldn't the onboard wireless do that also?
Which version of Stretch? 2017-09-07 Stretch with apt update && apt -y dist-upgrade with predictable names enabled using the updated raspi-config works for me.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Predicable names on stretch are confusing me

Fri Oct 06, 2017 11:23 pm

Thanks for the info, but mine is still showing wlan0. Stretch 2017-09-07 with update upgrade and dist-upgrade. I also enabled predictable interface names with the new raspi-config.

Return to “Advanced users”