<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 28 Oct 2024 at 13:47, Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Oct 28, 2024 at 3:07 PM Henti Smith <<a href="mailto:henti@gaydonsmith.co.uk" target="_blank">henti@gaydonsmith.co.uk</a>> wrote:<br>
><br>
> On Mon, 28 Oct 2024 at 10:38, Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com" target="_blank">arvidjaar@gmail.com</a>> wrote:<br>
>><br>
>> On Thu, Oct 24, 2024 at 6:29 PM Henti Smith <<a href="mailto:henti@gaydonsmith.co.uk" target="_blank">henti@gaydonsmith.co.uk</a>> wrote:<br>
>> ><br>
>> > Good day everybody<br>
>> ><br>
>> > I have two link files for mvc-sw1 and mvc-sw2.<br>
>> ><br>
>> > # mvc-sw1<br>
>> > ```<br>
>> > # Fixed MAC and name for eno2 (Switch 1 connection) when debug board is plugged in<br>
>> > # Renamed to mvc-sw1 by PCI Address and set custom MAC address.<br>
>> > [Match]<br>
>> > Property=DEVPATH=/devices/pci0000:00/0000:00:10.0/0000:05:00.0/net/eno2<br>
>> ><br>
>> > [Link]<br>
>> > MACAddress=02:00:00:00:05:00<br>
>> > Name=mvc-sw1<br>
>> > ```<br>
>> ><br>
>> > # mvc-sw2<br>
>> > ```<br>
>> > # Fixed MAC and name for enp6s0 (Block Diagram) when debug board is plugged in<br>
>> > # Renamed to mvc-sw2 by PCI Address and set custom MAC address.<br>
>> > [Match]<br>
>> > Property=DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:06:00.0/net/enp6s0<br>
>> ><br>
>><br>
>> These names are already the result of earlier renamoing. I am not sure<br>
>> systemd/udev/networkd will rename the second time.<br>
>><br>
><br>
> Would that be udev ?<br>
><br>
> we're trying hard to use systemd for all our network management. If this is not a realistic goal, what is the correct way of managing our network with systemd alongside other tools ?<br>
><br>
<br>
Yes, networkd.link files provide the desired names and naming policy,<br>
it is systemd-udevd that applies them.<br>
<br>
You need to match on some intrinsic device properties and these rules<br>
must be present when systemd-udevd first sees and renames these<br>
interfaces. Which often means in initrd/initramfs.<br></blockquote><div><br></div><div>Good evening Andrei, </div><div><br></div><div>Where can I find detailed information on where to find the names when systemd-udevd sees the interface for the first time ? <br></div><div><br></div><div>Silvio in my previous mail thread commented that I can use
<span class="gmail-il">udevadm</span> info which is what I'm trying to do here. Is there another method to get the "pre systemd" interface names that I should be using ? <br></div><div><br></div><div>I cannot use mac addresses to match on, nor the Path as both are not reliable in my use case, hence using the full DEVPATH from udevadm. <br></div><div><br></div><div>Any assistance will be appreciated. <br></div><div><br></div><div>Kind regards</div><div>Henti<br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div>