# How to configure networking using systemd in Yocto Project

**URL:** https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097
**Category:** Yocto Project
**Created:** [October 3, 2019, 2:52pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097 "2019-10-03T14:52:00Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [March 20, 2020, 1:19pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/21 "2020-03-20T13:19:52Z")

</div>

Here’s a thread from the Yocto mailing list that discusses this a bit: [https://yocto.yoctoproject.narkive.com/4SX0Ghao/basic-question-core-image-minimal-v-s-core-image-base](https://yocto.yoctoproject.narkive.com/4SX0Ghao/basic-question-core-image-minimal-v-s-core-image-base)

Basically core-image-minimal is intended to be the absolute bare minimum to get a system to boot. core-image-base is intended to be more usable as a full-fledged Linux system.

Looking at a diff between core-image-minimal.bb and core-image-base.bb it appears that the substantive difference in core-image-base is:

```auto
IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"

```

So adding those two packages should get you what you need. But that will be virtually the same as just using core-image-base. Is there a reason you want to modify core-image-minimal instead of using core-image-base?

Drew

---

<div class="post-metadata">

### Author: ![Amrun-Nisha-R](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@Amrun-Nisha-R](https://hub.mender.io/u/Amrun-Nisha-R)
#### Post date: [March 20, 2020, 1:35pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/22 "2020-03-20T13:35:57Z")

</div>

Actually core-image-minimal is 16MB size but core-image-base is 92.5MB. And also I didn’t need all the services of core-image-base. I only have minimum requirement like enable ethernet driver and also I have size constraint. I have tried with those package update. If you append "IMAGE\_INSTALL = “packagegroup-extended”, then the core-image-minimal also having the 92.5MB size. I have tried by adding the individual packages from the package extendend but nothing is working fine.

---

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [March 20, 2020, 1:52pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/23 "2020-03-20T13:52:33Z")

</div>

In that case you probably need to investigate what Variscite has set for the MACHINE\_EXTRA\_RRECOMMENDS[¶](https://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#var-MACHINE_EXTRA_RRECOMMENDS) variable. That may contain the packages needed. I suggest a followup on their forums since it will be heavily dependent on how they implemented the platform layer.

Drew

---

<div class="post-metadata">

### Author: ![elchtzeasar](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@elchtzeasar](https://hub.mender.io/u/elchtzeasar)
#### Post date: [May 6, 2020, 2:31pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/24 "2020-05-06T14:31:39Z")

</div>

To whome it may concern: My problems from above seem to have been because I was running thud. I just upgraded to zeus which broke my network config. Changing back to your filename for the conf file worked.

So everthing worked for me on thud using the filename “wpa\_supplicant-wlan0.conf” and now it works on zeus with filename “wpa\_supplicant-nl80211-wlan0.conf”.

---

<div class="post-metadata">

### Author: ![shainert.israel](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/shainert.israel/32/438_2.png) [@shainert.israel](https://hub.mender.io/u/shainert.israel)
#### Post date: [July 27, 2020, 4:14pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/25 "2020-07-27T16:14:10Z")

</div>

Hi Hub Members,  
According to Variscite ([http://variwiki.com/index.php?title=Static\_IP\_Address](http://variwiki.com/index.php?title=Static_IP_Address)):  
“ **ConnMan is the default Yocto network manager.** ”  
Systemd-networkd will conflict with it.  
Do you recommend to use it and turn off ConnMan? Why? How?  
Thank You  
Israel

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [July 27, 2020, 4:42pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/26 "2020-07-27T16:42:33Z")

</div>

This is really going to be driven by your products requirements as to what you need and which gives you what you need. 🙂

Personally i use Systemd-networkd (on variscite products as well custom ones) as i have to use it so heavily for others parts of my headless embedded products, local and cloud corporate servers. I had no need for anything else. But as i mentioned your requirements may differ.

---

<div class="post-metadata">

### Author: ![shainert.israel](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/shainert.israel/32/438_2.png) [@shainert.israel](https://hub.mender.io/u/shainert.israel)
#### Post date: [July 28, 2020, 10:55am UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/27 "2020-07-28T10:55:01Z")

</div>

@drewmoseley,  
I found your excellent slides that can be helpful for this page’s visitors.  
https://www.slideshare.net/slideshow/embed_code/key/pTvcqAtLLaPOLV

---

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [July 28, 2020, 3:10pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/28 "2020-07-28T15:10:12Z")

</div>

Thanks for finding that. It slipped my mind.

I didn’t realize that connman was the default but my local setups mostly use systemd-networkd. connman and NetworkManager may be better for devices that are going to be used in more dynamic situations as systemd-networkd doesn’t have any good frontends that I am aware of and mainly require editing config files.

Drew

---

<div class="post-metadata">

### Author: ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)
#### Post date: [August 10, 2020, 7:47pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/29 "2020-08-10T19:47:32Z")

</div>

10 posts were split to a new topic: [Issues with systemd-networkd](https://hub.mender.io/t/issues-with-systemd-networkd/2302)

---

<div class="post-metadata">

### Author: ![thesillywhat](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@thesillywhat](https://hub.mender.io/u/thesillywhat)
#### Post date: [August 13, 2020, 2:44pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/30 "2020-08-13T14:44:39Z")

</div>

How does this work when I am using a read only root file system. And I have to modify my `.network` file?

---

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [August 13, 2020, 2:59pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/31 "2020-08-13T14:59:49Z")

</div>

You’ll need to arrange for the .network file to be moved to the data partition and replaced with a symlink. Alternatively, if the changes are static, you can simply modify it in the Yocto build.  
Drew

---

<div class="post-metadata">

### Author: ![thesillywhat](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@thesillywhat](https://hub.mender.io/u/thesillywhat)
#### Post date: [August 13, 2020, 7:54pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/32 "2020-08-13T19:54:16Z")

</div>

If I do that. I have restart systemd-networkd service after boot.

---

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [August 13, 2020, 8:17pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/33 "2020-08-13T20:17:54Z")

</div>

Well normally these kind of changes will be done in the Yocto build rather than on the target to avoid such issues. Do you have a requirement where it must be done on the target?  
Drew

---

<div class="post-metadata">

### Author: ![thesillywhat](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@thesillywhat](https://hub.mender.io/u/thesillywhat)
#### Post date: [August 13, 2020, 8:30pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/34 "2020-08-13T20:30:05Z")

</div>

Well the requirement is to change wired.network as I have to switch between static and dynamic profile.

> [@drewmoseley](#):
>
> Well normally these kind of changes will be done in the Yocto build rather than on the target to avoid such issues

I am not an expert on yocto. I am still learning it  
Do you mean instead of getting creating a separate recipe I need to create a bbappend file of that system recipe ?

---

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [August 13, 2020, 8:47pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/35 "2020-08-13T20:47:13Z")

</div>

Yes, that is the right approach.

---

<div class="post-metadata">

### Author: ![thesillywhat](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@thesillywhat](https://hub.mender.io/u/thesillywhat)
#### Post date: [August 13, 2020, 9:57pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/36 "2020-08-13T21:57:56Z")

</div>

I tried it with a systemd-conf bbappend file. That did not work. I am now trying to use systemd bbappend file

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [August 13, 2020, 10:11pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/37 "2020-08-13T22:11:08Z")

</div>

I would recommend searching the yocto workdir for the wired file to see which recipe installed it, just in case you are trying to extend the wrong recipe.

---

<div class="post-metadata">

### Author: ![thesillywhat](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@thesillywhat](https://hub.mender.io/u/thesillywhat)
#### Post date: [August 13, 2020, 10:20pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/38 "2020-08-13T22:20:48Z")

</div>

To give a brief context. I had added that file by creating a bbappend file for `systemd-conf`. That was before mender integration and r/w rootFile system.

So that’s the reason I tried systemd-conf\_%.bbappend file but that did not work. But I will check out my work dir

---

<div class="post-metadata">

### Author: ![thesillywhat](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@thesillywhat](https://hub.mender.io/u/thesillywhat)
#### Post date: [August 14, 2020, 7:13pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/39 "2020-08-14T19:13:04Z")

</div>

Edit1:  
Sorry. I will re-attach my systemd-conf file. I am having some issues while running it in bitbake

Edit2:  
My `systemd-conf_%.bbappend` file

```
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI+= "\
	file://wired.network \
	"

FILES_${PN} += " \
	/data/network/wired.network \
	"

do_install_append() {
	install -d ${D}${sysconfdir}/systemd/network
	install -d ${D}/data/network
	install -m 0644 ${WORKDIR}/wired.network ${D}/data/network
	ln -s /data/network/wired.network ${D}${sysconfdir}/systemd/network/wired.network
}
```

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [August 14, 2020, 7:58pm UTC](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097/40 "2020-08-14T19:58:42Z")

</div>

when you say its not working, are you saying the symlink isnt appearing where you expect it?

[Previous page](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097.md?page=1)

[Next page](https://hub.mender.io/t/how-to-configure-networking-using-systemd-in-yocto-project/1097.md?page=3)
