]> git.proxmox.com Git - pve-docs.git/commitdiff
fix #5429: network: override device names: include Type=ether
authorFriedrich Weber <f.weber@proxmox.com>
Mon, 29 Apr 2024 07:49:22 +0000 (09:49 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 29 Apr 2024 13:43:49 +0000 (15:43 +0200)
Mention that the systemd link file should contain `Type=ether` in most
setup, to make sure it only applies to Ethernet devices and does not
ever apply to e.g. bridges or bonds which inherit the MAC address of
the Ethernet device. Mention that some setups may require other
options.

Reported in the forum [0] and in #5429 [1].

[0] https://forum.proxmox.com/threads/144557/post-656188
[1] https://bugzilla.proxmox.com/show_bug.cgi?id=5429

Fixes: 96c0261 ("fix #4847: network: extend section on interface naming scheme")
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
pve-network.adoc

index ef586ecf5f489be47d0f6413c4183359b28d8756..be8d63ca785020e63e9d801d25d536695930686e 100644 (file)
@@ -173,16 +173,25 @@ configured, including their naming.
 To assign a name to a particular network device, you need a way to uniquely and
 permanently identify that device in the `[Match]` section. One possibility is
 to match the device's MAC address using the `MACAddress` option, as it is
-unlikely to change. Then, you can assign a name using the `Name` option in the
-`[Link]` section.
+unlikely to change.
 
-For example, to assign the name `enwan0` to the device with MAC address
-`aa:bb:cc:dd:ee:ff`, create a file `/etc/systemd/network/10-enwan0.link` with
-the following contents:
+The `[Match]` section should also contain a `Type` option to make sure it only
+matches the expected physical interface, and not bridge/bond/VLAN interfaces
+with the same MAC address. In most setups, `Type` should be set to `ether` to
+match only Ethernet devices, but some setups may require other choices. See the
+https://manpages.debian.org/stable/udev/systemd.link.5.en.html[systemd.link(5)
+manpage] for more details.
+
+Then, you can assign a name using the `Name` option in the `[Link]` section.
+
+For example, to assign the name `enwan0` to the Ethernet device with MAC
+address `aa:bb:cc:dd:ee:ff`, create a file
+`/etc/systemd/network/10-enwan0.link` with the following contents:
 
 ----
 [Match]
 MACAddress=aa:bb:cc:dd:ee:ff
+Type=ether
 
 [Link]
 Name=enwan0