All of lore.kernel.org
 help / color / mirror / Atom feed
* Setup a static IP address - systemd
@ 2023-02-27 10:13 Konstantin Kletschke
  2023-02-27 13:28 ` [yocto] " Chen, Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Kletschke @ 2023-02-27 10:13 UTC (permalink / raw)
  To: yocto

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 a static IP Address 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 eth0.network
[Match]
Name=eth0

[Network]
Address=10.2.3.4/24
Gateway=10.2.3.1
DNS=1.1.1.1


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@inside-m2m.de
http://www.inside-m2m.de 

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



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

* RE: [yocto] Setup a static IP address - systemd
  2023-02-27 10:13 Setup a static IP address - systemd Konstantin Kletschke
@ 2023-02-27 13:28 ` Chen, Qi
  2023-02-27 13:45   ` Konstantin Kletschke
  0 siblings, 1 reply; 3+ messages in thread
From: Chen, Qi @ 2023-02-27 13:28 UTC (permalink / raw)
  To: Konstantin Kletschke, yocto

I think you're having a higher priority configuration file taking effect.
Check /lib/systemd/network and /run/systemd/network.
Maybe renaming your configuration file to 00-eth0.network would solve the problem.

Regards,
Qi

-----Original Message-----
From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On Behalf Of Konstantin Kletschke
Sent: Monday, February 27, 2023 6:13 PM
To: yocto@lists.yoctoproject.org
Subject: [yocto] Setup a static IP address - systemd

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 a static IP Address 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 eth0.network
[Match]
Name=eth0

[Network]
Address=10.2.3.4/24
Gateway=10.2.3.1
DNS=1.1.1.1


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@inside-m2m.de
http://www.inside-m2m.de 

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



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

* Re: [yocto] Setup a static IP address - systemd
  2023-02-27 13:28 ` [yocto] " Chen, Qi
@ 2023-02-27 13:45   ` Konstantin Kletschke
  0 siblings, 0 replies; 3+ messages in thread
From: Konstantin Kletschke @ 2023-02-27 13:45 UTC (permalink / raw)
  To: Chen, Qi; +Cc: yocto

On Mon, Feb 27, 2023 at 01:28:13PM +0000, Chen, Qi wrote:
> I think you're having a higher priority configuration file taking effect.
> Check /lib/systemd/network and /run/systemd/network.
> Maybe renaming your configuration file to 00-eth0.network would solve the problem.

Yes indeed. I am searching the web for ages for this, my colleauge also
found out within a couple of minutes :-|

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

Thanks for your provided solution, many thanks!

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@inside-m2m.de
http://www.inside-m2m.de 

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



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

end of thread, other threads:[~2023-02-27 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 10:13 Setup a static IP address - systemd Konstantin Kletschke
2023-02-27 13:28 ` [yocto] " Chen, Qi
2023-02-27 13:45   ` Konstantin Kletschke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.