3

I have a LXLE 18.04 LTS and wlan adapter with name wlp7s0b1, which I'm not comfortable with.

Recommended by all /etc/udev/rules.d/70-persistent-net.rules is not present in my installation, although udev is. /lib/udev/rules.d/75-persistent-net-generator.rules is successfully missing from my distribution and udevadm trigger --action=add doesn't change anything.

I successfully created a link: ln -s /lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules, but there was no list devices therefore did not help.

/etc/network/interfaces in my installation does not contain anything useful, as a netplan.

During my attempts to find at least something, I came across the output of the sudo udevadm info /sys/class/net/wlp7s0b1 command:

P: /devices/pci0000:00/0000:00:15.3/0000:07:00.0/bcma0:1/net/wlp7s0b1 E: DEVPATH=/devices/pci0000:00/0000:00:15.3/0000:07:00.0/bcma0:1/net/wlp7s0b1 E: DEVTYPE=wlan E: ID_BUS=pci E: ID_MM_CANDIDATE=1 E: ID_MODEL_FROM_DATABASE=BCM4313 802.11bgn Wireless Network Adapter E: ID_MODEL_ID=0x4727 E: ID_NET_NAME_MAC=wlx60d8190f1e84 E: ID_NET_NAME_PATH=wlp7s0b1 E: ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. E: ID_PATH=pci-0000:07:00.0-bcma-1 E: ID_PATH_TAG=pci-0000_07_00_0-bcma-1 E: ID_PCI_CLASS_FROM_DATABASE=Network controller E: ID_PCI_SUBCLASS_FROM_DATABASE=Network controller E: ID_VENDOR_FROM_DATABASE=Broadcom Limited E: ID_VENDOR_ID=0x14e4 E: IFINDEX=3 E: INTERFACE=wlp7s0b1 E: SUBSYSTEM=net E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/wlp7s0b1 E: TAGS=:systemd: E: USEC_INITIALIZED=37531623 

In this output, I am very interested in pci-0000:07:00.0-bcma-1. I believe this can be used as a unique identifier instead of a MAC. I would not like to be tied to MAC, since it can be changed with utilities like macchanger, and then, probably, the old name can return. Or is there a binding to the permanent MAC embedded in the chip?

How do I permanently change the name of an interface based on its ID_PATH using udev? Is this renaming method correct?

1 Answer 1

1

I am very interested in pci-0000:07:00.0-bcma-1. I believe this can be used as a unique identifier instead of a MAC.

Right, the ID_PATH can be used to rename the interface name.

Create a /etc/systemd/network/10-rename-wlp7s0b1.link with the following content:

[Match] Path=pci-0000:07:00.0-bcma-1 [Link] Name=wlan0 

Changes will be applied after reboot.

1
  • A couple years later but glad I found this, will be testing this over the next few days. I'm using multiple usb ethernet adapters on a PI and they were changing interfaces without carefully planned plugging and unplugging during boot. Hoping this will solve my woes. Commented Mar 24, 2024 at 0:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.