# Netplan support

**URL:** <https://forums.balena.io/t/netplan-support/350172>\
**Category:** balenaOS\
**Tags:** network\
**Created:** [November 18, 2021, 8:45am UTC](https://forums.balena.io/t/netplan-support/350172 "2021-11-18T08:45:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timple](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@Timple](https://forums.balena.io/u/Timple)\
**Post date:** [November 18, 2021, 8:45am UTC](https://forums.balena.io/t/netplan-support/350172/1 "2021-11-18T08:45:47Z")

</div>

Good day,

Because of the dynamic nature of our network devices and cabling, We currently have this as our netplan config:

```auto
network:
    version: 2
    ethernets:
        switchports:
            match: {name: "enp*"}
            dhcp4: no
            optional: true
    bridges:
        br0:
            dhcp4: yes
            addresses:
                - 192.168.14.1/24 # Fixed IP for sensor
                - 192.168.1.8/24 # Fixed IP for other sensor
            interfaces: [switchports]

```

We’re in the process of migrating from ubuntu-server to balena. How could we apply such a config?

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [November 18, 2021, 11:38am UTC](https://forums.balena.io/t/netplan-support/350172/2 "2021-11-18T11:38:31Z")

</div>

Hello @Timple could you please tell us more about your dynamic nature of your network?

---

<div class="post-metadata">

**Author:** ![Timple](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@Timple](https://forums.balena.io/u/Timple)\
**Post date:** [November 19, 2021, 7:57am UTC](https://forums.balena.io/t/netplan-support/350172/5 "2021-11-19T07:57:03Z")

</div>

Sure thing,

Unfortunately there are slight differences in our computers causing our network interfaces to switch names/order.

Therefor we expose the same capabilities (dhcp, fixed ip) to all interfaces equal.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [November 25, 2021, 6:02pm UTC](https://forums.balena.io/t/netplan-support/350172/7 "2021-11-25T18:02:39Z")

</div>

Hello @Timple sorry for the delay.

balenaOS currently uses `NetworkManager` and does not support configuration via Netplan.

Do you think you can move to NetworkManager or make Netplan compatible?

---

<div class="post-metadata">

**Author:** ![Timple](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@Timple](https://forums.balena.io/u/Timple)\
**Post date:** [December 10, 2021, 7:47am UTC](https://forums.balena.io/t/netplan-support/350172/9 "2021-12-10T07:47:33Z")

</div>

Netplan is basically just a configuration for NetworkManager.

So that means perhaps you can support it? It’s really easy as the complete configuration is a single yaml.

And it probably also means that somehow, I should be able to reproduce this with NetworkManager. But that probably involves some bash scripting to find the interfaces ☹

---

<div class="post-metadata">

**Author:** ![gantonayde](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@gantonayde](https://forums.balena.io/u/gantonayde)\
**Post date:** [December 10, 2021, 1:33pm UTC](https://forums.balena.io/t/netplan-support/350172/10 "2021-12-10T13:33:34Z")

</div>

Hi, I am not an expert on this but it seems to me that Netplan is Canonical’s wrapper for NetworkManager so things can be easily set via an .yaml file. If I am reading correctly your yaml file you find all physical interfaces with the name `enp*` and match them to switchports, then you connect the bridge to switchports. This should be doable with NetworkManager alone. [This post](https://www.answertopia.com/ubuntu/creating-an-ubuntu-kvm-networked-bridge-interface/) is a very good example of using Netplan and NetworkManager for achieving the same thing. Sections 1.1-1.5 look particularly relevant to your use case. [Here](https://www.tecmint.com/create-network-bridge-in-ubuntu/) is a similar example.

In general, NetworkManager is more universal and would not limit you to using Ubuntu, balena or any other platform, hence it might be worthwhile having a look at it. For example, [here](https://www.golinuxcloud.com/nmcli-command-examples-cheatsheet-centos-rhel/) is a very detailed manual for NetworkManager, it also includes a cheatsheet with the commands and what they do. [Section 10](https://www.golinuxcloud.com/nmcli-command-examples-cheatsheet-centos-rhel/#10_Create_and_configure_Network_Bridge) might be particularly useful for what you want to do.

Let us know how it goes and whether we can help in the meantime.
