所以我在Raspberry Pi和Beaglebone Black上运行Arch。最近我注意到两个设备都没有在其网络接口上使用持久性udev命名(即仍然使用eth0,wlan0 .etc)。 在Raspberry Pi上,我删除了阻止udev持久重命名接口的文件:
/etc/udev/rules.d/80-net-name-slot.rules
Beaglebone Black比较新,甚至没有文件。在Raspberry Pi上删除它似乎没有任何效果。它们都在运行systemd 208。 知道这里发生了什么吗?低端ARM设备上是否支持持久命名? 以下是两个设备上以下命令的输出:
udevadm test-builtin net_id /sys/class/net/eth0
在Raspberry Pi上:
calling: test-builtin
=== trie on-disk ===
tool version: 208
file size: 5866515 bytes
header size 80 bytes
strings 1296323 bytes
nodes 4570112 bytes
load module index
ID_NET_NAME_MAC=enxb827eb2a5c39
ID_OUI_FROM_DATABASE=Raspberry Pi Foundation
unload module index
在Beaglebone Black上:
calling: test-builtin
=== trie on-disk ===
tool version: 208
file size: 5866515 bytes
header size 80 bytes
strings 1296323 bytes
nodes 4570112 bytes
load module index
ID_NET_NAME_MAC=enx9059af571ea7
ID_OUI_FROM_DATABASE=Texas Instruments
unload module index
有趣的是,当我从桌面上看时,它错过了ID_NET_NAME_PATH:
calling: test-builtin
=== trie on-disk ===
tool version: 208
file size: 5882624 bytes
header size 80 bytes
strings 1301408 bytes
nodes 4581136 bytes
load module index
ID_NET_NAME_MAC=enx8c89a5c6f0ce
ID_OUI_FROM_DATABASE=Micro-Star INT'L CO., LTD
ID_NET_NAME_PATH=enp3s0
unload module index
有什么想法吗?我想将多个WiFi适配器插入其中一个,并且更喜欢一致性。
答案 0 :(得分:1)
您仍然可以使用MAC地址强制名称:
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="12:34:56:78:ab:cd", NAME="whatever"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ab:cd:12:34:56:78", NAME="somethingelse"