3

I think this is related to Predictable Network Interface Names. The device is a Raspberry Pi B model running kali (kali-next)

  1. Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)
  2. Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)
  3. Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
  4. Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
  5. Classic, unpredictable kernel-native ethX naming (example: eth0)

Policy 4) is not used by default, but is available if the user chooses it.

Where can I disable policy 4? I don't know why it's enabled in first place. It appears that the firmware/BIOS did not provide index/location information for the Ethernet interface.

$ udevadm test-builtin net_id /sys/class/net/enx78e7d1ea46da 2> /dev/null
ID_NET_NAME_MAC=enx78e7d1ea46da
ID_OUI_FROM_DATABASE=Raspberry Pi Foundation
1

This issue is apparently caused by a bug in /lib/udev/rules.d/73-usb-net-by-mac.rules in versions prior to v233 of the debian and ubuntu udev packages.

The issue was fixed by this commit:

https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/debian/extra/rules/73-usb-net-by-mac.rules?id=9e202a329175b0ca4eaa09a75897aa2044eb7d7a

See also:

https://askubuntu.com/questions/811295/73-usb-net-by-mac-rules-issue-with-net-ifnames/895879#895879

At the time of writing this v233 has not been released for Debian jessie.

One way to fix the issue locally is to edit the file in the same manner as the commit above, then reboot.

| improve this answer | |
0

After hours of digging and getting nowhere, I found a fix for a Raspberry Pi 3 running Ubuntu 16.04 preinstalled server armhf. Long story short, running $ apt-get update added Predictable Network Interface Names.

Edit the following file:

$ vim /lib/udev/rules/73-usb-net-by-mac.rules

You should see:

ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
    ATTR{address}=="?[014589cd]:*", \
    TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \
    IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"

Change the NAME at the end as follows:

ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
    ATTR{address}=="?[014589cd]:*", \
    TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \
    IMPORT{builtin}="net_id", NAME="eth0"

Save changes. Reboot. Everything should be working now assuming everything is pointing to eth0.

| improve this answer | |
-1
rm /lib/systemd/network/90-mac-for-usb.link
ln -s /dev/null /lib/systemd/network/90-mac-for-usb.link
| improve this answer | |
  • Can you explain how this relates to what was asked in the question and what it does? Thanks. – fixer1234 Feb 14 '16 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.