Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

** SOLVED ** systemd-networkd interface name change timing

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
Author
Message
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

** SOLVED ** systemd-networkd interface name change timing

  • Quote

Post by JumboAg » Sat Mar 15, 2025 11:48 pm

Got a weird one on a new SBC board. I'm using systemd, not openrc and configure my static IP with systemd-networkd.

It's failing to find the end0 interface. What's happening is the interface comes up as eth0 and then during boot gets renamed to end0. systemd-networkd appears to be trying to set my IP BEFORE that has finished.

Code: Select all

Dec 20 13:47:34 altapi systemd[1]: Starting Network Configuration...
Dec 20 13:47:34 altapi systemd-networkd[422]: lo: Link UP
Dec 20 13:47:34 altapi systemd-networkd[422]: lo: Gained carrier
Dec 20 13:47:34 altapi systemd-networkd[422]: Enumeration completed
Dec 20 13:47:34 altapi systemd[1]: Started Network Configuration.
Dec 20 13:47:35 altapi systemd-networkd[422]: eth0: Interface name change detected, renamed to end0.
Dec 20 13:47:35 altapi systemd-networkd[422]: end0: Configuring with /etc/systemd/network/50-static.network.
Dec 20 13:47:35 altapi systemd-networkd[422]: end0: Could not bring up interface, ignoring: No such device
Any suggestions on how to get systemd-networkd to wait a couple of seconds to let that name change stabilize? If I restart systemd-networkd after the box is finished booting, end0 gets configured correctly.
Last edited by JumboAg on Thu Mar 20, 2025 3:59 pm, edited 1 time in total.
Top
rab0171610
l33t
l33t
Posts: 720
Joined: Sat Dec 24, 2022 1:41 am

  • Quote

Post by rab0171610 » Sun Mar 16, 2025 5:13 am

In your configuration file (/etc/systemd/network/50-static.network), under the match section [MATCH] you can try matching to the MAC address instead of the interface Name.

Code: Select all

MACAddress=
    A whitespace-separated list of hardware addresses. The acceptable formats are:
    colon-delimited hexadecimal
    Each field must be one byte. E.g. "12:34:56:78:90:ab" or "AA:BB:CC:DD:EE:FF".
    Added in version 250.
Keep in mind that:

Code: Select all

A network file is said to match a network interface if all matches specified by the [Match] section are satisfied. 
So if I understand it correctly, you would likely want to comment out the 'Name=' line and leave only a 'MACAddress=' line. This should match to the interface with the specified mac address only without consideration for the interface name. Again, that is if I understand correctly.

See:
https://www.freedesktop.org/software/sy ... twork.html
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Sun Mar 16, 2025 2:37 pm

Tried. No change.

Code: Select all

-- Boot b2d6def317e348118f93a47a6e4cc33d --
Dec 20 13:47:33 altapi systemd[1]: Starting Network Configuration...
Dec 20 13:47:33 altapi systemd-networkd[418]: lo: Link UP
Dec 20 13:47:33 altapi systemd-networkd[418]: lo: Gained carrier
Dec 20 13:47:33 altapi systemd-networkd[418]: Enumeration completed
Dec 20 13:47:33 altapi systemd[1]: Started Network Configuration.
Dec 20 13:47:34 altapi systemd-networkd[418]: eth0: Interface name change detected, renamed to end0.
Dec 20 13:47:34 altapi systemd-networkd[418]: end0: Configuring with /etc/systemd/network/50-static.network.
Dec 20 13:47:34 altapi systemd-networkd[418]: end0: Could not bring up interface, ignoring: No such device
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Mar 16, 2025 2:44 pm

JumboAg,

Turn off interface renaming.

There is a udev rules file, that must be present but empty, or add

Code: Select all

net.ifnames=0
to your kernel command line.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
rab0171610
l33t
l33t
Posts: 720
Joined: Sat Dec 24, 2022 1:41 am

  • Quote

Post by rab0171610 » Sun Mar 16, 2025 6:35 pm

JumboAg,
Thanks for reporting back that it did not work. It is one of those situations where you think you understand from the documentation how something works in theory but it actually works differently when applied.

I use NetworkManager for network connections. I do not have the issue that you do with renaming enabled. I would still like to know why your configuration fails and what the actual solution is to that problem. If you ever gain any insight or figure out how to get it to work correctly, please post back. I am curious.

Hopefully Neddy's solution will work for you.
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Thu Mar 20, 2025 2:23 am

NeddySeagoon wrote:JumboAg,

Turn off interface renaming.

There is a udev rules file, that must be present but empty, or add

Code: Select all

net.ifnames=0
to your kernel command line.

Closer... but still not working. journald still implies to me that systemd-networkd is getting ahead of the ethernet interface intializing. See below... I manually restart systemd-networkd at 13:49:08 (Dates wrong b/c its a SBC with no hardware clock and no networking to sync NTP. )

Code: Select all

-- Boot 5231bbc8731745a3bfb1aceac8af271c --
Dec 20 13:47:34 altapi systemd[1]: Starting Network Configuration...
Dec 20 13:47:34 altapi systemd-networkd[433]: lo: Link UP
Dec 20 13:47:34 altapi systemd-networkd[433]: lo: Gained carrier
Dec 20 13:47:34 altapi systemd-networkd[433]: Enumeration completed
Dec 20 13:47:34 altapi systemd[1]: Started Network Configuration.
Dec 20 13:47:35 altapi systemd-networkd[433]: eth0: found matching network '/etc/systemd/network/50-static.network', based on potent>
Dec 20 13:47:35 altapi systemd-networkd[433]: eth0: Configuring with /etc/systemd/network/50-static.network.
Dec 20 13:47:35 altapi systemd-networkd[433]: eth0: Could not bring up interface, ignoring: No such device
Dec 20 13:49:08 altapi systemd[1]: Stopping Network Configuration...
Dec 20 13:49:08 altapi systemd[1]: systemd-networkd.service: Deactivated successfully.
Dec 20 13:49:08 altapi systemd[1]: Stopped Network Configuration.
Dec 20 13:49:08 altapi systemd[1]: Starting Network Configuration...
Dec 20 13:49:08 altapi systemd-networkd[589]: lo: Link UP
Dec 20 13:49:08 altapi systemd-networkd[589]: lo: Gained carrier
Dec 20 13:49:08 altapi systemd-networkd[589]: Enumeration completed
Dec 20 13:49:08 altapi systemd[1]: Started Network Configuration.
Dec 20 13:49:08 altapi systemd-networkd[589]: eth0: found matching network '/etc/systemd/network/50-static.network', based on potent>
Dec 20 13:49:08 altapi systemd-networkd[589]: eth0: Configuring with /etc/systemd/network/50-static.network.
Dec 20 13:49:08 altapi systemd-networkd[589]: eth0: Link UP
Dec 20 13:49:11 altapi systemd-networkd[589]: eth0: Gained carrier
Dec 20 13:49:11 altapi systemd-networkd[589]: eth0: found matching network '/etc/systemd/network/50-static.network', based on potent>
Dec 20 13:49:13 altapi systemd-networkd[589]: eth0: Gained IPv6LL
Dec 20 13:49:14 altapi systemd-networkd[589]: eth0: DHCPv6 address xxxxxxxxxxxxxxxxx  (valid for 23h 59min 59s, preferred >
Top
rab0171610
l33t
l33t
Posts: 720
Joined: Sat Dec 24, 2022 1:41 am

  • Quote

Post by rab0171610 » Thu Mar 20, 2025 3:50 am

You can try to modify the systemd-networkd service and add a sleep command.

Code: Select all

 systemctl edit systemd-networkd.service
My default editor is nano. This will open the service file for editing and you will see in the top of file:

Code: Select all

 ### Editing /etc/systemd/system/systemd-networkd.service.d/override.conf
### Anything between here and the comment below will become the contents of the drop-in file

### Edits below this comment will be discarded
### /usr/lib/systemd/system/systemd-networkd.service
You can try adding a line to add a delay with sleep using 5 or 10 seconds for example:

Code: Select all

ExecStartPre=/bin/sleep 05
or:

Code: Select all

ExecStartPre=/bin/sleep 10
Once the changes are made you may need to run:

Code: Select all

systemctl daemon-reload
to reload the systemd manager configuration.

Also see:
https://github.com/systemd/systemd/issues/7293
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Thu Mar 20, 2025 3:58 pm

rab0171610 wrote:You can try to modify the systemd-networkd service and add a sleep command.

Code: Select all

 systemctl edit systemd-networkd.service
My default editor is nano. This will open the service file for editing and you will see in the top of file:

Code: Select all

 ### Editing /etc/systemd/system/systemd-networkd.service.d/override.conf
### Anything between here and the comment below will become the contents of the drop-in file

### Edits below this comment will be discarded
### /usr/lib/systemd/system/systemd-networkd.service
You can try adding a line to add a delay with sleep using 5 or 10 seconds for example:

Code: Select all

ExecStartPre=/bin/sleep 05
or:

Code: Select all

ExecStartPre=/bin/sleep 10
Once the changes are made you may need to run:

Code: Select all

systemctl daemon-reload
to reload the systemd manager configuration.

Also see:
https://github.com/systemd/systemd/issues/7293

Close..... It actually required two lines. You need a

Code: Select all

[Service]
tag above the ExecStartPre. Once I added that, it was good to go. I appreciate the assistance. Marking Solved.
Top
Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy