How to add network interfaces

[since version 1.6.0]

Multipass can launch instances with additional network interfaces, via the --network option. That is complemented by the networks command, to find available host networks to bridge with.

This is supported only for images with cloud-init support for Version 2 network config, which in turn requires netplan to be installed. So, from 17.10 and core 16 onward, except for snapcraft:core16. And then only in the following scenarios:


Network specification

The --network option can be given multiple times, each one requesting an additional network interface (beyond the default one, which is always present). Each use takes an argument specifying the properties of the desired interface:

  • name — the only required value, it identifies the host network to connect the instance’s device to (see networks for possible values)
  • mode — either auto (the default) or manual; with auto, the instance will attempt automatic network configuration
  • mac — a custom MAC address to use for the device

These properties can be specified in the format <key>=<value>,…. but a simpler form with only <name> is available for the most common use-case. Here is an example:

$ multipass launch --network en0 --network name=bridge0,mode=manual
Launched: upbeat-whipsnake

$ multipass exec upbeat-whipsnake -- ip -br address show scope global
enp0s3           UP   
enp0s8           UP   
enp0s9           DOWN

$ ping -c1  # elsewhere in the same network
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.378 ms

In the example above, we got the following interfaces inside the instance:

  • enp0s3 — the default interface, that the instance can use to reach the outside world and which Multipass uses to communicate with the instance;
  • enp0s8 — the interface that is connected to en0 on the host and which is automatically configured;
  • enp0s9 — the interface that is connected to bridge0 on the host, ready for manual configuration.


Extra interfaces are configured with a higher metric (200) than the default one (100). So, by default the instance will only route through them if they’re a better match for the destination IP:

$ multipass exec upbeat-whipsnake -- ip route
default via dev enp0s3 proto dhcp src metric 100
default via dev enp0s8 proto dhcp src metric 200 dev enp0s3 proto kernel scope link src dev enp0s3 proto dhcp scope link src metric 100 dev enp0s8 proto kernel scope link src dev enp0s8 proto dhcp scope link src metric 200

$ multipass exec upbeat-whipsnake -- ip route get via dev enp0s3 src uid 1000

$ multipass exec upbeat-whipsnake -- ip route get dev enp0s8 src uid 1000

Last updated 9 hours ago.