I'm working on a system where we rename some of the network interfaces for consistency in the application. We're struggling to configure the IP addresses during the installation. I did a bit of testing, by configuring connections with nmtui and it seems as though there are two use cases:
Automatically named interface:
When the interface name has the OS-designated name (example eno1), the connection configuration is stored in /etc/NetworkManager/system-connections/eno1.nmconnection
Renamed interface:
When the interface name has been changed (example data by providing a DEVICE in the ifcfg- file), the connection configuration is stored in the /etc/sysconfig/network-scripts/ifcfg-data file.
Now in both cases, an ifcfg- file existed. In the case of eno1, the file sets the MTU and ZONE, in the case of data, it sets NAME and DEVICE.
Does anyone have an explanation, on why the apparent inconsistency and how I should pre-configure my interfaces given the two cases?
Update:
I've done some further testing, and regardless of whether or not in include the NAME setting in ifcfg, as long as the device is set to something other than the default, NetworkManager will store the IP configuration for that interface in ifcfg. If you populate NAME and DEVICE with the original interface name, it will store the IP configuration in an .nmconnection file.