Setup no IP address for eth0 - systemd


Konstantin Kletschke
 

Dear yocto, community,

I have a yocto build running on a Beaglebone Black with systemd enabled.
No /etc/init.d, no /etc/network/interfaces.

How do I set up no IP Address at all for eth0?
The system always does an udhcpc request and uses that.

I have
systemd-networkd.service loaded active running
and tryed the following file in /etc/systemd/network:

# cat unmanaged.network
[Match]
Name = eth0 eth1 eth2 wlan*
[Link]
Unmanaged = true


Kind Regards
Konstantin



--
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

konstantin.kletschke@...
http://www.inside-m2m.de

Geschäftsführung: Michael Emmert, Derek Uhlig
HRB: 111204, AG Hannover


Anders Montonen
 

Hi,

On 27 Feb 2023, at 12:17, Konstantin Kletschke <konstantin.kletschke@...> wrote:


Dear yocto, community,

I have a yocto build running on a Beaglebone Black with systemd enabled.
No /etc/init.d, no /etc/network/interfaces.

How do I set up no IP Address at all for eth0?
The system always does an udhcpc request and uses that.
Check if you also have Networkmanager in your image.

-a


Konstantin Kletschke
 

On Mon, Feb 27, 2023 at 01:54:53PM +0200, Anders Montonen wrote:

Check if you also have Networkmanager in your image.
My other, rather similair mail was answered with a solution which works
fine here in this use case, too:

Renaming the file having an additional prefix like "10-" works like a charme.
I suspect the number has to be lower than the 80 found in many files in
/lib/systemd/network...


Kind Regards
Konstantin




-a
--
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

konstantin.kletschke@...
http://www.inside-m2m.de

Geschäftsführung: Michael Emmert, Derek Uhlig
HRB: 111204, AG Hannover