---
title: 'Ubuntu Bionic: Netplan'
description: NetplanFor this week’s Bionic test blitz I am looking at Netplan! Netplan
  enables easily configuring networking on a system via YAML files. Netplan processes
  the YAML and generates the required configurations for either NetworkManager or
  systemd-network the system’s renderer.Netplan replaced ifupdown as the default configuration
  utility s […]
url: https://canonical.com/blog/ubuntu-bionic-netplan?format=md
---

1. [Blog](https://canonical.com/blog)
2. Article

---

[Joshua Powers](https://canonical.com/blog/author/powersj "More about Joshua Powers")

1 December 2017

# Ubuntu Bionic: Netplan

[18.04](https://canonical.com/blog/tag/18-04)
[Bionic Beaver](https://canonical.com/blog/tag/bionic-beaver)
[Netplan](https://canonical.com/blog/tag/netplan)
[Server](https://canonical.com/blog/tag/server)

---

Share the article

## Netplan

For this week’s [Bionic test blitz](https://powersj.io/posts/ubuntu-bionic-test-blitz/) I am looking at Netplan! [Netplan](https://wiki.ubuntu.com/Netplan) enables easily configuring networking on a system via YAML files. Netplan processes the YAML and generates the required configurations for either NetworkManager or systemd-network the system’s renderer.
Netplan [replaced ifupdown](http://blog.cyphermox.net/2017/06/netplan-by-default-in-1710.html) as the default configuration utility starting with Ubuntu 17.10 Artful.

## Configuration

### Initial Setup in Bionic

When you install Bionic or use a cloud image of Bionic a file will appear in `/etc/netplan` depending on the renderer in use. Here is a breakdown of the various types:

| Install Type | Renderer | File |
| --- | --- | --- |
| Server ISO | systemd-networkd | `/etc/netplan/01-netcfg.yaml` |
| Cloud Image | systemd-networkd | `/etc/netplan/50-cloud-init.yaml` |
| Desktop ISO | NetworkManager | `/etc/netplan/01-network-manager-all.yaml` |

Do note that configuration files can exist in three different locations with the precidence from most important to least as follows:

* `/run/netplan/*.yaml`
* `/etc/netplan/*.yaml`
* `/lib/netplan/*.yaml`

Alphabetically later files, no matter what directory they are in, will amend keys if the key does not already exist and override previous keys if they do.

## Examples

The best method for demonstrating what netplan can do is by showing some examples. Keep in mind that these are very simple examples that do not demonstrate complex situations that netplan can handle.

## Static and DHCP Addressing

The following configures four devices:

* enp3s0 setup with IPv4 DHCP
* enp4s0 setup with IPv4 static with custom MTU
* IPv6 static tied to a specific MAC address
* IPv4 and IPv6 DHCP with jumbo frames tied to a specific MAC address

```
ethernets:
    enp3s0:
        dhcp4: true
    enp4s0:
        addresses:
            - 192.168.0.10/24
        gateway4: 192.168.0.1
        mtu: 1480
        nameservers:
            addresses:
                - 8.8.8.8
                - 9.9.9.9
    net1:
        addresses:
            - fe80::a00:10a/120
        gateway6: fe80::a00:101
        match:
            macaddress: 52:54:00:12:34:06
    net2:
        dhcp4: true
        dhcp6: true
        match:
            macaddress: 52:54:00:12:34:07
        mtu: 9000
```

### Bonding

Bonding can easily be configured with the required interfaces list and by specifying the mode. The mode can be any of the valid types: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb. See the [bonding wiki page](https://help.ubuntu.com/community/UbuntuBonding#Descriptions_of_bonding_modes) for more details.

```
bonds:
    bond0:
        dhcp4: yes
        interfaces:
            - enp3s0
            - enp4s0
        parameters:
            mode: active-backup
            primary: enp3s0
```

### Bridges

Here is a very simple example of a bridge using DHCP:

```
bridges:
    br0:
        dhcp4: yes
        interfaces:
            - enp3s0
```

Additional parameters can be passed in to turn off STP for example or set priorities.

### Vlans

Similarly, vlans only require a name as the key and then an id and link to use for the vlan:

```
vlans:
    vdev:
        id: 101
        link: net1
        addresses:
            - 10.0.1.10/24
    vprod:
        id: 102
        link: net2
        addresses:
            - 10.0.2.10/24
    vtest:
        id: 103
        link: net3
        addresses:
            - 10.0.3.10/24
    vmgmt:
        id: 104
        link: net4
        addresses:
            - 10.0.4.10/24
```

## Next Steps

I was left with an overall very positive impression of netplan. Having the ability to write YAML configuration files and not have to worry about how the actual configuration was generated or what commands need to be used depending on the backend simplifies the process. I would like to continue to attempt some more complex configurations that I can find as well as attempt additional test cases with the ifupdown-migrate subcommand.

## Links & Refrences

* [Netplan Wiki](https://wiki.ubuntu.com/Netplan)
* [Netplan README](https://git.launchpad.net/netplan/tree/doc/netplan.md)
* [Netplan Source Code](https://git.launchpad.net/netplan?h=master)
* [Netplan Design Doc](https://wiki.ubuntu.com/Netplan/Design)
* [Netplan Bugs](https://bugs.launchpad.net/cloud-init)

[Get in touch

Interested in running Ubuntu in your organization?](https://ubuntu.com/about/contact-us/form)

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

By submitting this form, I confirm that I have read and agree to [Canonical's Privacy Policy](https://canonical.com/legal/dataprivacy).

Sign up

## Share on

---

## Related posts

[### A decade of Ubuntu on IBM Z and IBM LinuxONE](https://canonical.com/blog/a-decade-of-ubuntu-on-ibm-z-and-ibm-linuxone)

This year we celebrate a decade of Ubuntu Server support on the s390x architecture: marking a long-standing collaboration between Canonical and IBM that began at LinuxCon 2015....

[Pedro Lazzarotto](https://canonical.com/blog/author/pedro-lazzarotto)

12 June 2026

[### IBM LinuxONE 5 and Ubuntu Server, a great combination from day one](https://canonical.com/blog/ibm-linuxone-emperor-5-ubuntu-server-integration)

Today, IBM announced the launch of their latest server: the new IBM LinuxONE Emperor 5. This fifth generation redefines IBM’s LinuxONE system as their most secure and...

[Frank Heimes](https://canonical.com/blog/author/fheimes)

6 May 2025

[### Canonical announces first Ubuntu Desktop image for Qualcomm Dragonwing™ Platform with Ubuntu 24.04](https://canonical.com/blog/canonical-announces-first-ubuntu-desktop-image-for-qualcomm-dragonwing-platform-with-ubuntu-24-04)

This public beta enables the full Ubuntu Desktop experience on the Qualcomm Dragonwing™ QCS6490 and QCS5430 processors and complements existing Ubuntu Server support with...

[Canonical](https://canonical.com/blog/author/canonical)

30 April 2025

[### Google Authd broker: authenticate to Ubuntu Desktop/Server with your Google account](https://canonical.com/blog/google-authd-broker-ubuntu-desktop-server)

With the Authd broker for Ubuntu you can use your personal or Workspace Google account to authenticate to Ubuntu Server or Desktop

[Massimiliano Gori](https://canonical.com/blog/author/massigori)

6 March 2025
