[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: systemd/udev persistent network device names



On Sun, 03 May 2015 23:08:45 +0200, alexander bachmer
<alex.bachmer@t-online.de> wrote:
>>> sudo mv /lib/udev/rules.d/70-persistent-net.rules /lib/udev/rules.d/70-persistent-net.rules.bak
>> Das kann schonmal nicht stimmen. Die 70-persistent-net.rules steht in
>> /etc/udev/rules.d. In /lib/udev/rules gibt es nur eine
>> 70-persistent-net-generator.rules.
>>
>>
>|udevd| processes the rules files in lexical order, regardless of which
>directory they are located. Rules files in |/etc/udev/rules.d| override
>files of the same name in |/lib/udev/rules.d|.
>
>70-persistent-net-generator.rules.
>
>ist bei mir die 
>/lib/udev/rules.d/75-persistent-net-generator.rules
>
>
>und macht nichts anderes als :
># These rules generate rules to keep network interface names unchanged
># across reboots and write them to /etc/udev/rules.d/70-persistent-net.rules.

Du brauchst mir eigentlich nicht zu erklären wie udev funktioniert,
und den Mechanismus hinter persistent-net-generator und persistent-net
habe ich auch eigentlich verstanden.

>Die persistent-net.rules muss raus damit es geht..

Dir zuliebe habe ich die mal komplett entfernt und rebootet:

|[3/139]mh@barrida:~$ find /etc /lib /usr -name '*persistent-net*'
|find: `/etc/ssl/private': Permission denied
|[4/140]mh@barrida:~$ cat /proc/cmdline
|BOOT_IMAGE=/boot/vmlinuz-4.0.0-zgsrv20080 root=/dev/vda3 ro net.ifnames=1
|[5/141]mh@barrida:~$ ip l
|1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
|    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
|2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
|    link/ether 52:54:00:ec:91:fc brd ff:ff:ff:ff:ff:ff
|3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
|    link/ether 52:54:00:a1:68:c2 brd ff:ff:ff:ff:ff:ff
|4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
|    link/ether 52:54:00:2c:2b:6e brd ff:ff:ff:ff:ff:ff
|[6/142]mh@barrida:~$ systemd --version
|systemd 215
|+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR
|[9/145]mh@barrida:~$ sudo lsb-release -a
|[sudo] password for mh on barrida:
|sudo: lsb-release: command not found
|[10/146]mh@barrida:~$

und es geht immer noch nicht.

>>> (3) Mit welcher Kombination aus udevadm-Spells kann ich mir die udev
>>> properties aller Netzwerkdevices im System anschauen?
>> Versteh die Frage nicht...meinst du »udevadm test-builtin net_id» ???
>>Vielleicht, aber es funktioniert nicht ("missing or unknown command").

Wenn man's richtig schreibg, funktioniert es sogar:

|[10/146]mh@barrida:~$ sudo udevadm test-builtin net_id /sys/class/net/eth0
|calling: test-builtin
|load module index
|timestamp of '/etc/systemd/network' changed
|Parsed configuration file /lib/systemd/network/99-default.link
|Created link configuration context.
|ID_NET_NAME_MAC=enx525400ec91fc
|unload module index
|Unloaded link configuration context.
|[11/147]mh@barrida:~$ sudo udevadm test-builtin net_id /sys/class/net/eth1
|calling: test-builtin
|load module index
|timestamp of '/etc/systemd/network' changed
|Parsed configuration file /lib/systemd/network/99-default.link
|Created link configuration context.
|ID_NET_NAME_MAC=enx525400a168c2
|unload module index
|Unloaded link configuration context.
|[12/148]mh@barrida:~$ sudo udevadm test-builtin net_id /sys/class/net/eth2
|calling: test-builtin
|load module index
|timestamp of '/etc/systemd/network' changed
|Parsed configuration file /lib/systemd/network/99-default.link
|Created link configuration context.
|ID_NET_NAME_MAC=enx5254002c2b6e
|unload module index
|Unloaded link configuration context.
|[13/149]mh@barrida:~$

Man beachte die Abwesenheit von NET_NAME_PATH.

Und dokumentiert ist das in man udevadm auch nicht.

Grüße
Marc
-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834


Reply to: