[systemd-devel] systemd-networkd and interface names
Mantas Mikulėnas
grawity at gmail.com
Mon Aug 10 19:33:34 UTC 2020
That seems to be working as expected.
The initial, kernel-assigned name is always going to be an incrementing
eth#, wlan#, or something similar. It's up to the userspace (i.e. udev) to
rename it to something custom.
However, interfaces can only be renamed while they're *not* up, otherwise
the kernel refuses it with EBUSY. If some program brings eth1 up without
waiting for udev to finish rule processing, renaming will fail and it'll
just remain eth1.
On Mon, Aug 10, 2020, 21:45 Matt Zagrabelny <mzagrabe at d.umn.edu> wrote:
> Greetings,
>
> I am using systemd-networkd and I am wondering how/why the interface names
> get chosen.
>
> Scenario:
>
> I am expecting an interface name to be enp1s0. Instead I get eth1.
>
> It appears that eth1 is being referenced in things like:
> /etc/default/isc-dhcp-server
> /etc/default/minissdpd
>
> If I change those instances of eth1 to enp1s0, then the interface rename
> happens as expected:
>
> # dmesg | grep eth1
> [ 1.751611] tg3 0000:01:00.0 eth1: Tigon3 [partno(BCM95722A2202G) rev
> a200] (PCI Express) MAC address 00:10:18:59:c3:6f
> [ 1.751613] tg3 0000:01:00.0 eth1: attached PHY is 5722/5756
> (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[0])
> [ 1.751614] tg3 0000:01:00.0 eth1: RXcsums[1] LinkChgREG[0] MIirq[0]
> ASF[0] TSOcap[1]
> [ 1.751616] tg3 0000:01:00.0 eth1: dma_rwctrl[76180000] dma_mask[64-bit]
> [ 17.763317] tg3 0000:01:00.0 enp1s0: renamed from eth1
>
> Is this expected behavior with the kernel, udev, etc.?
>
> Thanks for any help!
>
> -m
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200810/8c5e043c/attachment.htm>
More information about the systemd-devel
mailing list