public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH docs] network: override device names: include Type=ether in link file
@ 2024-04-24 16:55 Friedrich Weber
  2024-04-24 17:47 ` Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Friedrich Weber @ 2024-04-24 16:55 UTC (permalink / raw)
  To: pve-devel

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@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.
+
 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
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pve-devel] [PATCH docs] network: override device names: include Type=ether in link file
  2024-04-24 16:55 [pve-devel] [PATCH docs] network: override device names: include Type=ether in link file Friedrich Weber
@ 2024-04-24 17:47 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-04-24 17:47 UTC (permalink / raw)
  To: Proxmox VE development discussion, Friedrich Weber

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-24 17:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 16:55 [pve-devel] [PATCH docs] network: override device names: include Type=ether in link file Friedrich Weber
2024-04-24 17:47 ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal