On Tue, Jun 23, 2020 at 11:07:52PM -0400, Dusty Mabe wrote:
> Hi,
> 
> While researching a bug reported against RHEL CoreOS I've decided to look a 
> bit deeper into
> how a user would go about changing the name of a NIC on a machine to 
> something custom. In
> this investigation I have some questions:
> 
> -  It seems as if nm-initrd-generator doesn't have support for the ifname= 
> karg. Is that
>    intentional?

Yes, it's intentional; interface renaming is done by the 40-network
module:

  
https://github.com/dracutdevs/dracut/blob/050/modules.d/40network/ifname-genrules.sh

> - If I specify the nic name and MAC as part of the ip= line the mac specified 
> gets set to
>   'cloned-mac-address' rather than 'mac-address'. Is that right?
>     - i.e, 
> ip=192.168.122.111::192.168.122.1:255.255.255.0:initrdhost:nicname:none:0:52:54:00:00:00:0a
>     - 
> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/master/src/initrd/nmi-cmdline-reader.c#L583

It's right. The 9th field of an ip= option is the new MAC address to
assign to the interface, and so cloned-mac-address is the right
property to set. The old network module also uses that field to
specify the new MAC.

> - Is there a udev helper that parses NM keyfiles and sets up udev rules like 
> /lib/udev/rename_device
>   does for reading legacy network scripts in /etc/sysconfig/network-scripts/ ?
>     - 
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/consistent-network-interface-device-naming_configuring-and-managing-networking#how-the-network-device-naming-works_consistent-network-interface-device-naming
>     - 
> https://github.com/fedora-sysv/initscripts/blob/master/src/rename_device.c

I am not aware of such helper for NM keyfiles.

Beniamino

Attachment: signature.asc
Description: PGP signature

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to