[pve-devel] [PATCH docs] network: override device names: include Type=ether in link file
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Apr 24 19:47:04 CEST 2024
Am 24/04/2024 um 18:55 schrieb Friedrich Weber:
> Mention that the systemd link file should contain `Type=ether`, 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. Reported in the forum [0].
>
> [0] https://forum.proxmox.com/threads/144557/post-656188
>
> Fixes: 96c0261 ("fix #4847: network: extend section on interface naming scheme")
> Signed-off-by: Friedrich Weber <f.weber at proxmox.com>
> ---
> pve-network.adoc | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/pve-network.adoc b/pve-network.adoc
> index ef586ec..8e5fa1c 100644
> --- a/pve-network.adoc
> +++ b/pve-network.adoc
> @@ -170,6 +170,9 @@ identifier. A link file has two sections: `[Match]` determines which interfaces
> the file will apply to; `[Link]` determines how these interfaces should be
> configured, including their naming.
>
> +The `[Match]` section should contain `Type=ether`, to make sure it only matches
> +Ethernet devices.
With have some users with different uplinks though, and while that is rather rare,
I'd still mention this here in passing, so that users know about the existence of
wlan or wwan, maybe even just in a footnote with a reference to:
https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html#Type=
> +
> 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
> @@ -183,6 +186,7 @@ the following contents:
> ----
> [Match]
> MACAddress=aa:bb:cc:dd:ee:ff
> +Type=ether
>
> [Link]
> Name=enwan0
More information about the pve-devel
mailing list