MAC cloning no longer supported for e1000e?

Hi,
I updated kernel from 4.4.92-31 to 4.4.103-36 (-default) with the result, that LAN does not work any more.
I’m using MAC cloning to distinguish the running OS (WIN10 or LEAP) at my box.

I’m running plasma 5.8.7 and LEAP 42.3 and changed the MAC address with NetworkManager (Connection editor) for my LAN (e1000e for Intel I217-LM)

Without MAC cloning the LAN is working, also cloning MAC to its original MAC makes the LAN working.
Using the driver from …92…, all runs well including MAC cloning. (rmmod e1000e; insmod /…92…/e1000e.ko)

How can I avoid this rmmod/insmod?
Is MAC cloning no longer supported for e1000e?
How can I otherwise change the MAC?

What else do you need tho know to answer my questions?

You need to state whether you are using wicked or network manager for your network management.

Typically, with wicked you simply describe your MAC address in your ifcfg interface file.
With NM, you typically describe it in your network connection.

Then,
you can verify your work by running something like “ip addr”

TSU

@tsu2

Do you mean this?

Yup. I looked hard for that, but I guess I’m blind…

TSU

I just ran a test on a newly updated 42.3.
No problem, the MAC address was changed as expected after a reboot.
I’m surprised though that simply restarting network services wasn’t sufficient to pick up the MAC address change.

TSU

@tsu2
thanks for testing.

I know, MAC cloning is supported in 42.3 with kernel 4.4.92-31 but not with kernel 4.4.103-36 (always using driver e1000e) on my tests.
Did you use kernel 4.4.103-36 AND module/driver e1000e?
I think the problem depends on this combination of kernel version and module (this module offered for that kernel).

BTW, rebooting isn’t necessary if you change MAC via NetworkManager. Simply disconnect+edit+connect. That is what I detected.
With kernel 4.4.103-36 and MAC cloning, the LAN will be activated and deactivated in cycle until you deselect “Automatically connect …”.

I’m interested in your answer

On the machine used for testing, that kernel is same but the network driver is different.

Still,
For the life of me, I can’t imagine what the network driver might have to do with MAC cloning…
The level at which the MAC address is changed should be a software layer above the network driver, so should not make any diff.
Unfortunately, a test I used to run ages ago which was to set the MAC address in the ifcfg file does not work today (In yesteryear, even if you used NM, any settings in the ifcfg file would over-ride). Speculating that may have changed when wicked was introduced for managed instead of direct access to the “classical” interface files.

Although e1000e is very common and popular, at the moment I don’t have access to a real system but I was able to test in a virtual machine using an emulated e1000 network adapter with no problems.

Unless you need to use Network Manager for some reason(like switching between different wired or wireless networks), perhaps you should switch over to wicked and try specifying a MAC address in the ifcfg file

MACADDR=aa:bb:cc:dd:ee:ff

TSU

Why else does the problem change with the version of driver. Driver/module e1000e with ver. 4.4.92-31 is OK, with ver. 4.4.103-36 is not.

I want/have to use NetworkManager. I’m using a laptop with dual boot (Win10 and Leap) in very different network/wlan environments.

I am convinced that it is a mistake to take away support for MAC cloning in e1000e.
I just want to assure myself that I’m not making any mistake or overlooking something before I create a bug report.
The newer version of e1000e has almost 830 bytes less code :frowning:

Hopefully somebody else can verify my observation or can point to my mistake.
TSU, tanks for your efforts.

ifswirth

I don’t have the same ethernet hardware so can’t test/confirm this directly unfortunately. However, you’re quite correct that it does require underlying driver support to work correctly, so it may be a regression that is impacting here. Can you please share your network profile (in /etc/NetworkManager/system-connections/) for the ethernet connection?

For reference, I’m using a similar e1000 driver. I have

sudo cat /etc/NetworkManager/system-connections/DHCP 
[connection]
id=DHCP
uuid=c702075a-1425-4e98-b23a-7fa67abf51a1
type=ethernet
permissions=
secondaries=

[ethernet]
cloned-mac-address=CA:CE:3C:48:D3:F0
mac-address-blacklist=

[ipv4]
dns-search=
method=auto

[ipv6]
dns-search=
method=auto

It works as expected for me.

BTW, I was a bit confused by your opening post - Does unloading and reloading the driver result in the cloned MAC working as expected with the current latest kernel?

modprobe -r e1000e
modprobe e1000e

It might be useful to examine the kernel messaging related to the driver when loaded…

dmesg|grep e1000e

FWIW, I note that when I implemented MAC cloning, this resulted in changes to /etc/udev/rules.d/70-persistent-net.rules, (and backed up the original as /etc/udev/rules.d/70-persistent-net.old).

The original auto-generated entry (now 70-persistent-net.old) was

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:36:86:14", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

The new auto-generated entry (no MAC matching) is

ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

@deano_ferrari

Hi,

I’ll try to make it clear about unload/reload:
Using kernel 4.4.103-36 MAC cloning fails and LAN does not come up.
Using kernel 4.4.92-31 MAC cloning works an LAN does come up. But kernel is “old”.
So I currently use a mixture of both.

My current workaround is:

cat /etc/init.d/after.local                                                             
#! /bin/sh
#
# Copyright (c) 2010 SuSE LINUX Products GmbH, Germany.  All rights reserved.
#
# Author: Werner Fink, 2010
#
# /etc/init.d/after.local
#
# script with local commands to be executed from init after all scripts
# of a runlevel have been executed.
#
# Here you should add things, that should happen directly after
# runlevel has been reached.
#
#
# force to load the older module from 4.4.92 because that from 4.4.103 does not support MAC changing
rmmod e1000e
insmod /lib/modules/4.4.92-31-default/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko

This currently works independent of the booted kernel (in the worst case, the same module will be reloaded)
as long as I have the 92-kernel on disk. Next kernel update will remove it.

My network profile is very similar to yours:

cat "/etc/NetworkManager/system-connections/New 802-3-ethernet connection"              
[connection]
id=LAN
uuid=70e2f9a9-7b52-445b-b89f-ead175c24bf4
type=ethernet
permissions=
secondaries=

[ethernet]
cloned-mac-address=E2:F4:BB:5C:0B:6D
mac-address=EC:F4:BB:5C:0B:6D
mac-address-blacklist=

[ipv4]
dns-search=
may-fail=false
method=auto

[ipv6]
dns-search=
method=auto

The following does not really show the failing and the working version of the driver. Both announce itself as 3.2.6-k as is shown.

dmesg|grep e1000e
    9.205897] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
    9.205898] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
    9.206060] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
    9.295583] e1000e 0000:00:19.0 0000:00:19.0 (uninitialized): registered PHC clock
    9.375907] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) ec:f4:bb:5c:0b:6d
    9.375910] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
    9.375957] e1000e 0000:00:19.0 eth0: MAC: 11, PHY: 12, PBA No: FFFFFF-0FF
    9.637007] e1000e 0000:00:19.0 em1: renamed from eth0
   23.695826] e1000e 0000:00:19.0 em1: removed PHC
   23.802156] e1000e: em1 NIC Link is Down
   23.891968] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
   23.891969] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
   23.892124] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
   23.981860] e1000e 0000:00:19.0 0000:00:19.0 (uninitialized): registered PHC clock
   24.066303] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) ec:f4:bb:5c:0b:6d
   24.066305] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
   24.066353] e1000e 0000:00:19.0 eth0: MAC: 11, PHY: 12, PBA No: FFFFFF-0FF
   25.291441] e1000e 0000:00:19.0 em1: renamed from eth0
   28.340246] e1000e: em1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
   28.442371] e1000e: em1 NIC Link is Down
   32.320306] e1000e: em1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx

Comparing modinfo of both versions shows nearly no difference:

diff /tmp/e1000e_103.modinfo /tmp/e1000e_92.modinfo 
1c1
< filename:       /lib/modules/4.4.103-36-default/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
---
> filename:       /lib/modules/4.4.92-31-default/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
6c6
< srcversion:     1FFD0349DBB3894E818CE1A
---
> srcversion:     412A64D283CA1837C2C3B65
78c78
< vermagic:       4.4.103-36-default SMP mod_unload modversions 
---
> vermagic:       4.4.92-31-default SMP mod_unload modversions 

But the following shows the big difference:

size /lib/modules/4.4.103-36-default/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko /lib/modules/4.4.92-31-default/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
   text    data     bss     dec     hex filename
 205414   12851      48  218313   354c9 /lib/modules/4.4.103-36-default/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
 206241   12851      48  219140   35804 /lib/modules/4.4.92-31-default/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko

I can imagine code for MAC cloning is missing in 103.

I see no changes in “/etc/udev/rules.d/70-persistent-net.rules”, also no *.old. It contains only one line for NAME=“wlan0”.

You could have the experience (as a global moderator) and can possibly advise me: Is it time to fire a bug report? Where? I never did it.

Regards

Ok, thanks for clarifying further about your workaround. Yes, time to submit a bug report.

A guide on bug reporting…
https://en.opensuse.org/openSUSE:Submitting_bug_reports

Bugzilla…
https://bugzilla.opensuse.org/enter_bug.cgi?product=openSUSE%20Distribution&format=guided&version=Leap%2042.3

Please post a link to your bug when submitted.

There is a bug report:
https://bugzilla.opensuse.org/show_bug.cgi?id=1073809
It fits quite well, only MAC cloning is not mentioned.
I’ll try to add it and add a link to this thread.

Thanks for support.