After reboot, a new enp2s0 connection is automatically created and activated, but with different UUID.
$ nmcli con
NAME UUID TYPE DEVICE
enp2s0 6d6a0ee1-4649-4b2b-bc08-3f6cdfc09fad ethernet enp2s0
enp2s0 10e97d92-260e-4534-a053-36c9b255b281 ethernet --
check for the wol setting by:
$ nmcli con s enp2s0 | grep -i Wake
802-3-ethernet.wake-on-lan: default
802-3-ethernet.wake-on-lan-password: –
802-3-ethernet.wake-on-lan: magic
802-3-ethernet.wake-on-lan-password: –
The first newly created activated profile is not set, while the non-active profile is wol set.
Question: Why Fedora auto create a new NM profile, instead of using the existing “only” one before the reboot?
I just redo the installation from the beginning, and the result is the same.
Fresh installation
sudo dnf install NetworkManager-tui
using nmtui, create a new profile named “wol” with all default settings
activate “wol” using nmtui
remove all extra profiles, and only “wol” remain
reboot
A.
$ sudo nmcli con
NAME UUID TYPE DEVICE
enp2s0 9ccb5735-7a8f-4aec-be4a-af7de5f81ebe ethernet enp2s0
wol 9f8b6577-ca34-41ba-951a-89d40151d58f ethernet –
B. (Surprise! Only one files!)
sudo ls -a -l -Z /etc/NetworkManager/system-connections/
total 4
drwxr-xr-x. 1 root root system_u:object_r:NetworkManager_etc_rw_t:s0 32 Jan 18 02:15 .
drwxr-xr-x. 1 root root system_u:object_r:NetworkManager_etc_t:s0 160 Jan 18 01:44 …
-rw-------. 1 root root system_u:object_r:NetworkManager_etc_rw_t:s0 248 Jan 18 02:13 wol.nmconnection
C. (diff has no output, as only one connections files there)
D.
sudo nmcli con s enp2s0 > a.txt
sudo nmcli con s wol > b.txt
diff a.txt b.txt
I have recreate this setup in my KVM guest. The behaviour is the same as in my Sony notebook.
This is my /proc/cmdline: BOOT_IMAGE=(hd0,gpt2)/vdaboot/vmlinuz-5.10.7-200.fc33.x86_64 root=UUID=0063c03f-cfdc-419e-b200-95e0aa1e27f3 ro rootflags=subvol=idaroot netroot=iscsi:@192.168.100.44::3260:iface0:vl100::iqn.2021-01.xxx.yyyy:zzzz rd.iscsi.initiator=iqn.2021-01.xxx.yyyy:zzzz ip=192.168.100.66:::255.255.255.0::vl100:none vlan=vl100:enp1s0
The suggested 00-custom.conf is applied, as no default connections are auto created for enp1s0 and vl1 after reboot.
Observations:
NetworkManager still auto create the vl100 conneciton to /run/NetworkManager/system-connections
NetworkManager will not create vl1 to /run/NetworkManager
Once I edit the runtime connection, and reboot, NetworkManager will create another new one to /run with new UUID
It seems I cannot have a pre-defined NM connection for the iscsi VLAN interface.