Re: Question: eth0 vs enp1s0 (second try)

2016-01-08 Thread Brian
On Fri 08 Jan 2016 at 02:36:20 +0100, Vincent Lefevre wrote:

> On 2016-01-07 18:47:48 +, Brian wrote:
> > Many WiFi devices require firmware. Some of those devices will not have
> > an interface registered (they are not initialised) if the firmware is
> > not present to be loaded into the device. Other devices get an interface
> > whether the firmware is present or not.
> 
> According to lshw, the firmware is 16.242414.0, which is provided
> by /lib/firmware/iwlwifi-3160-16.ucode from the firmware-iwlwifi
> package.
> 
> > If there is no interface there is nothing for the Jessie udev to put
> > in 70-persistent-net.rules.
> 
> According to the dpkg logs, udev was upgraded to 220-7 before I
> installed firmware-iwlwifi. But according to the udev changelog,
> the switch to net.ifnames is just for new installations and for
> new hardware. Here the hardware was already there; there was just
> no firmware.

The ethernet interface is the only one mentioned in the .rules file
because there was no wlan0 interface due to a lack of firmware on
Jessie. eth0 is not renamed on upgrade to unstable because there is
a rule for it. There is no rule for wlan0 so it gets a predictable
name. You can change to a custom name by devising a rule for the
interface; udev will not generate one for you.

The switch to net.ifnames has honoured what was on the previous
installation.



Re: Question: eth0 vs enp1s0 (second try)

2016-01-07 Thread Vincent Lefevre
On 2016-01-07 18:47:48 +, Brian wrote:
> Many WiFi devices require firmware. Some of those devices will not have
> an interface registered (they are not initialised) if the firmware is
> not present to be loaded into the device. Other devices get an interface
> whether the firmware is present or not.

According to lshw, the firmware is 16.242414.0, which is provided
by /lib/firmware/iwlwifi-3160-16.ucode from the firmware-iwlwifi
package.

> If there is no interface there is nothing for the Jessie udev to put
> in 70-persistent-net.rules.

According to the dpkg logs, udev was upgraded to 220-7 before I
installed firmware-iwlwifi. But according to the udev changelog,
the switch to net.ifnames is just for new installations and for
new hardware. Here the hardware was already there; there was just
no firmware.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: Question: eth0 vs enp1s0 (second try)

2016-01-07 Thread Brian
On Thu 07 Jan 2016 at 13:12:59 +, Brian wrote:

> Pass. 70-persistent-net.rules was generated on Jessie and carried over
> to testing. You would need a Jessie install on the same machine to
> investigate.

Perhaps not; one theory could be tested on Stretch.

Many WiFi devices require firmware. Some of those devices will not have
an interface registered (they are not initialised) if the firmware is
not present to be loaded into the device. Other devices get an interface
whether the firmware is present or not. If there is no interface there
is nothing for the Jessie udev to put in 70-persistent-net.rules.

Which type do you have?

Move the wireless device's firmware out of /lib/firmware. Then

  modprobe -r -v 

  ls /sys/class/net

  modprobe -v 

  ls /sys/class/net



Re: Question: eth0 vs enp1s0 (second try)

2016-01-06 Thread Vincent Lefevre
On 2016-01-02 16:21:11 +, Brian wrote:
> On Fri 01 Jan 2016 at 17:22:37 +0100, Vincent Lefevre wrote:
> 
> > On 2016-01-01 12:03:32 +, Brian wrote:
> > > On Thu 31 Dec 2015 at 19:08:18 +0100, Hans wrote:
> > > > What do 'ls /sys/class/net' and 'ip link' give without this addition?
> > > > 
> > > > I get:
> > > > 
> > > > ls /sys/class/net/
> > > > 
> > > > enp1s0  Io  wlan0
> > > 
> > > Interesting. One interface is renamed; one is not (wlan0).
> > 
> > On my laptop (installed from Jessie, then upgraded to unstable),
> > this is the opposite:
> > 
> > eth0  lo  wlp61s0
> > 
> > Quite strange...
> 
> Move 70-persistent-net.rules somewhere and do
> 
>   rmmod -v 
> 
> followed by
> 
>   modprobe -v 
> 
> Repeat with 70-persistent-net.rules returned to /etc/udev/rules.d. Any
> changes in 'ls /sys/class/net/'?

Well, I want to keep eth0 on my laptop because I have things
that depend on it. But what I was wondering is why I have
wlp61s0 instead of wlan0, i.e. why a rule for wlan0 hadn't
been added to 70-persistent-net.rules at that time.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: Question: eth0 vs enp1s0 (second try)

2016-01-06 Thread Brian
On Wed 06 Jan 2016 at 13:56:57 +0100, Vincent Lefevre wrote:

> On 2016-01-02 16:21:11 +, Brian wrote:
> > 
> > Move 70-persistent-net.rules somewhere and do
> > 
> >   rmmod -v 
> > 
> > followed by
> > 
> >   modprobe -v 
> > 
> > Repeat with 70-persistent-net.rules returned to /etc/udev/rules.d. Any
> > changes in 'ls /sys/class/net/'?
> 
> Well, I want to keep eth0 on my laptop because I have things
> that depend on it. But what I was wondering is why I have
> wlp61s0 instead of wlan0, i.e. why a rule for wlan0 hadn't
> been added to 70-persistent-net.rules at that time.

Did the wireless interface name change using the above procedure?

Custom interface naming can be done with a file in /etc/udev/rules.d.
What is the content of yours? The udev README.Debian advises a prefix
between 75 and 80 for this file.



Re: Question: eth0 vs enp1s0 (second try)

2016-01-06 Thread Vincent Lefevre
On 2016-01-06 13:55:45 +, Brian wrote:
> On Wed 06 Jan 2016 at 13:56:57 +0100, Vincent Lefevre wrote:
> 
> > On 2016-01-02 16:21:11 +, Brian wrote:
> > > 
> > > Move 70-persistent-net.rules somewhere and do
> > > 
> > >   rmmod -v 
> > > 
> > > followed by
> > > 
> > >   modprobe -v 
> > > 
> > > Repeat with 70-persistent-net.rules returned to /etc/udev/rules.d. Any
> > > changes in 'ls /sys/class/net/'?
> > 
> > Well, I want to keep eth0 on my laptop because I have things
> > that depend on it. But what I was wondering is why I have
> > wlp61s0 instead of wlan0, i.e. why a rule for wlan0 hadn't
> > been added to 70-persistent-net.rules at that time.
> 
> Did the wireless interface name change using the above procedure?

After moving 70-persistent-net.rules:

# rmmod -v iwlmvm
# rmmod -v iwlwifi
# rmmod -v e1000e
# ls /sys/class/net/
lo
# modprobe -v e1000e
insmod 
/lib/modules/4.3.0-1-amd64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
# modprobe -v iwlwifi
insmod /lib/modules/4.3.0-1-amd64/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko
# ls /sys/class/net/
enp0s25  lo  wlp61s0

And repeating the procedure with 70-persistent-net.rules:

[...]
# ls /sys/class/net/
eth0  lo  wlp61s0

BTW, after doing that, I had to kill the DHCP client manually because when
the eth0 interface became up again, it didn't get an IPv4 address.

> Custom interface naming can be done with a file in /etc/udev/rules.d.
> What is the content of yours? The udev README.Debian advises a prefix
> between 75 and 80 for this file.

70-persistent-net.rules contains:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="30:8d:99:25:ad:3f", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="eth0"

Still the same question: why eth0 only?

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: Question: eth0 vs enp1s0 (second try)

2016-01-02 Thread Brian
On Fri 01 Jan 2016 at 17:22:37 +0100, Vincent Lefevre wrote:

> On 2016-01-01 12:03:32 +, Brian wrote:
> > On Thu 31 Dec 2015 at 19:08:18 +0100, Hans wrote:
> > > What do 'ls /sys/class/net' and 'ip link' give without this addition?
> > > 
> > > I get:
> > > 
> > > ls /sys/class/net/
> > > 
> > > enp1s0  Io  wlan0
> > 
> > Interesting. One interface is renamed; one is not (wlan0).
> 
> On my laptop (installed from Jessie, then upgraded to unstable),
> this is the opposite:
> 
> eth0  lo  wlp61s0
> 
> Quite strange...

Move 70-persistent-net.rules somewhere and do

  rmmod -v 

followed by

  modprobe -v 

Repeat with 70-persistent-net.rules returned to /etc/udev/rules.d. Any
changes in 'ls /sys/class/net/'?



Re: Question: eth0 vs enp1s0 (second try)

2016-01-01 Thread Brian
On Thu 31 Dec 2015 at 19:08:18 +0100, Hans wrote:

> What do 'ls /sys/class/net' and 'ip link' give without this addition?
> 
> I get:
> 
> ls /sys/class/net/
> 
> enp1s0  Io  wlan0

Interesting. One interface is renamed; one is not (wlan0).

[Snip]
 
> I believe, the different outrputs are just becaus the EEEPC is newer and got 
> a 
> newer hardware and a more talking BIOS.

My understanding is that the information provided by the BIOS and PCI
slots is used by udev to produce the interface names. I'm not happy with
newness as an explanation.

> Thank you for all the help, the explanation is not as easy as I though, but 
> the solution is.
> 
> So let this problem be solved for now.

The view might be different if the machine had been remote and using
ifupdown's hardcoded interface names. 70-persistent-net-rules is
intended to ensure renaming doesn't happen. If it has that would be
quite a serious matter.



Re: Question: eth0 vs enp1s0 (second try)

2016-01-01 Thread Vincent Lefevre
On 2016-01-01 12:03:32 +, Brian wrote:
> On Thu 31 Dec 2015 at 19:08:18 +0100, Hans wrote:
> > What do 'ls /sys/class/net' and 'ip link' give without this addition?
> > 
> > I get:
> > 
> > ls /sys/class/net/
> > 
> > enp1s0  Io  wlan0
> 
> Interesting. One interface is renamed; one is not (wlan0).

On my laptop (installed from Jessie, then upgraded to unstable),
this is the opposite:

eth0  lo  wlp61s0

Quite strange...

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: Question: eth0 vs enp1s0 (second try)

2015-12-31 Thread Hans
Hi Brian,
> Is there no sign of any discovered interfaces for the Aspire in the
> output of dmesg?
> 
I get this: 

dmesg | grep eth0 
[2.201866] forcedeth :00:0a.0: ifname eth0, PHY OUI 0x732 @ 1, addr 
1c:75:08:2c:84:f8
[   36.198523] forcedeth :00:0a.0 eth0: MSI enabled
[   36.198795] forcedeth :00:0a.0 eth0: no link during initialization
[   36.199147] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   75.435837] forcedeth :00:0a.0 eth0: link down



> dmesg or journalctl have no indication that eth0 on the EEEPC is renamed?
> 
> [...]


> I think you mean "net.ifnames=0".
> 

Yey, of course, it was just a typo. :)

> What do 'ls /sys/class/net' and 'ip link' give without this addition?

I get:

ls /sys/class/net/

enp1s0  Io  wlan0


Brian, I believe, for now I will stay with the net.ifnames=0 solution. I 
checjed, if I want to use enp1s0, I haved to edit a lot of configuration files 
from eth0 to enp1s0. This is rather annoying, as any update of a package will 
force me to that again and again.

As long the developers won't find a solution, which will fit both options, I 
will stay at eth0. When debian changed completely to enp1s0 (and this includes 
all the configurations, too), I can easyly remove the net.ifnames option and 
return to enp1s0.

I believe, the different outrputs are just becaus the EEEPC is newer and got a 
newer hardware and a more talking BIOS.

Thank you for all the help, the explanation is not as easy as I though, but 
the solution is.

So let this problem be solved for now.

Thank you (and all the other friends who helped here) very much indeed.

I wish you and your family a very happy new year and much joy of hacking.

Thanks again, and best regards

Hans 



Re: Question: eth0 vs enp1s0 (second try)

2015-12-31 Thread Brian
On Wed 30 Dec 2015 at 16:11:39 +0100, Hans wrote:

> Am Mittwoch, 30. Dezember 2015, 12:58:23 schrieb Jörg-Volker Peetz:
> Hi Jörg-Volker
> > Did you take a look at dmesg on both systems? Something like
> > 
> >   grep -E '(enp|eth)' /var/log/dmesg
> This showed no useful information. The only output is from my EEEPC below, 
> the 
> Aspire showed no output at all.

Is there no sign of any discovered interfaces for the Aspire in the
output of dmesg?
 
> root@protheus7:/home/ullhan63# grep -E '(enp|eth)' /var/log/dmesg 
> [8.480990] eeepc_laptop: Get control methods supported: 0xe301713 
> [   64.534486] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

dmesg or journalctl have no indication that eth0 on the EEEPC is renamed? 

[...]

> Hope this helps a little bit. My solution at the moment is the well known 
> addition "if.netnames=0" in grub commandline.

I think you mean "net.ifnames=0".

What do 'ls /sys/class/net' and 'ip link' give without this addition?



Re: Question: eth0 vs enp1s0 (second try)

2015-12-30 Thread Hans
Am Mittwoch, 30. Dezember 2015, 12:58:23 schrieb Jörg-Volker Peetz:
Hi Jörg-Volker
> Did you take a look at dmesg on both systems? Something like
> 
>   grep -E '(enp|eth)' /var/log/dmesg
This showed no useful information. The only output is from my EEEPC below, the 
Aspire showed no output at all.

root@protheus7:/home/ullhan63# grep -E '(enp|eth)' /var/log/dmesg 
[8.480990] eeepc_laptop: Get control methods supported: 0xe301713 
[   64.534486] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready


> 
> Could you show the content of both 70-persistent-net-rules files?

Yes, this is Aspire with eth0:
# This file was automatically generated by the /lib/udev/write_net_rules 
# program run by the persistent-net-generator.rules rules file. 
# 
# You can modify it, as long as you keep each rule on a single line. 

# PCI device 0x168c:0x001c (ath5k_pci) 
SUBSYSTEM=="net", ACTION=="add", 
DRIVERS=="?*",ATTR{address}=="00:1d:XX:XX:XX:XX", ATTR{type}=="1", 
KERNEL=="wlan*", NAME="wlan0" 

# PCI device 0x10de:0x054c (forcedeth) 
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="1c:75:YY:YY:YY:YY", ATTR{type}=="1
", KERNEL=="eth*", NAME="eth0" 

# Firewire device /sys/devices/pci:00/:00:08.0/:01:04.0/fw-
host0/00023f0aba40084e (nod
emgr) 
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:02:3f:ZZ:ZZ:ZZ:ZZ", ATTR{dev
_id}=="0x0", ATTR{type}=="24", KERNEL=="eth*", NAME="eth1"


I changed the MAC cause of security purposes in this mail.


Same for EEEPC:

# This file was automatically generated by the /lib/udev/write_net_rules 
# program, run by the persistent-net-generator.rules rules file. 
# 
# You can modify it, as long as you keep each rule on a single 
# line, and change only the value of the NAME= key. 

# PCI device 0x1969:0x1062 (atl1c) 
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="90:e6:XX:XX:XX:XX", ATTR{dev_id}==
"0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" 

# PCI device 0x168c:0x002b (ath9k) 
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:25:YY:YY:YY:YY", ATTR{dev_id}==
"0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

Changed MAC, too, but you can of course still see the vendors (first two 
bytes).
 
> Regards,
> jvp.


Hope this helps a little bit. My solution at the moment is the well known 
addition "if.netnames=0" in grub commandline.

So I can easyly change from eth* to enp* when this is recommended.

Best regards

Hans
--