diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2023-09-25 13:34:59 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2023-10-03 14:09:21 +0200 |
commit | cb4c8c21471095568519e4d0ece029ae4610f883 (patch) | |
tree | c118ead5f45e444cd1f67aa9cd693e13a8e7f0fc | |
parent | c3ca0b90cd14deb4f5c3ca7a7bdbd7f3568ebab0 (diff) |
contrib/rpm: add note about interface renaming with ifcfg vs keyfilebg/ifcfg-migration-readme
-rw-r--r-- | contrib/fedora/rpm/readme-ifcfg-rh-migrated.txt | 32 | ||||
-rw-r--r-- | contrib/fedora/rpm/readme-ifcfg-rh.txt | 32 |
2 files changed, 64 insertions, 0 deletions
diff --git a/contrib/fedora/rpm/readme-ifcfg-rh-migrated.txt b/contrib/fedora/rpm/readme-ifcfg-rh-migrated.txt index 43a2cdb161..aabbcc862f 100644 --- a/contrib/fedora/rpm/readme-ifcfg-rh-migrated.txt +++ b/contrib/fedora/rpm/readme-ifcfg-rh-migrated.txt @@ -50,3 +50,35 @@ Or, if you prefer to migrate only specific connections: nmcli connection migrate --plugin ifcfg-rh <profile_name|UUID> Note that some connection types are not supported by the ifcfg plugin. + +Interface renaming +================== + +Connection profiles stored in ifcfg-rh format support the renaming of +interfaces via udev. This is done via a helper tool +/usr/lib/udev/rename_device that is invoked by udev to parse the files +in /etc/sysconfig/network-scripts; when the HWADDR and DEVICE +variables are set, the interface that matches the MAC address in +HWADDR is renamed to the name specified in DEVICE. + +Connections in keyfile format don't provide the same integration with +udev. The renaming of interfaces must be configured directly in udev, +for example by creating a file: + + /etc/systemd/network/70-rename.link + +with content: + + [Match] + MACAddress=00:11:22:33:44:56 + + [Link] + Name=ethernet1 + +Alternatively, a udev rule can also be used, such as: + + /etc/udev/rules.d/70-interface-names.rules + +with content: + + SUBSYSTEM=="net",ACTION=="add",ATTR{address}=="00:11:22:33:44:56",ATTR{type}=="1",NAME="ethernet1" diff --git a/contrib/fedora/rpm/readme-ifcfg-rh.txt b/contrib/fedora/rpm/readme-ifcfg-rh.txt index b69a681791..56c373d469 100644 --- a/contrib/fedora/rpm/readme-ifcfg-rh.txt +++ b/contrib/fedora/rpm/readme-ifcfg-rh.txt @@ -29,3 +29,35 @@ Alternatively, to migrate only a specific profile, enter: For further details, see: * nm-settings-keyfile(5) * nmcli(1) + +Interface renaming +================== + +Connection profiles stored in ifcfg-rh format support the renaming of +interfaces via udev. This is done via a helper tool +/usr/lib/udev/rename_device that is invoked by udev to parse the files +in /etc/sysconfig/network-scripts; when the HWADDR and DEVICE +variables are set, the interface that matches the MAC address in +HWADDR is renamed to the name specified in DEVICE. + +Connections in keyfile format don't provide the same integration with +udev. The renaming of interfaces must be configured directly in udev, +for example by creating a file: + + /etc/systemd/network/70-rename.link + +with content: + + [Match] + MACAddress=00:11:22:33:44:56 + + [Link] + Name=ethernet1 + +Alternatively, a udev rule can also be used, such as: + + /etc/udev/rules.d/70-interface-names.rules + +with content: + + SUBSYSTEM=="net",ACTION=="add",ATTR{address}=="00:11:22:33:44:56",ATTR{type}=="1",NAME="ethernet1" |