Comment 19 for bug 1664847

Revision history for this message
John Wohlers (john-wohlershome) wrote :

Building on #18
I got the whole process working using netplan. For anyone needing a little more details

$ cat /etc/networkd-dispatcher/routable.d/10-macvlan-interfaces.sh
#! /bin/bash

ip link add macvlan0 link eth0 type macvlan mode bridge
----
$ cat /etc/netplan/docker.yaml
network:
    version: 2
    renderer: networkd
    ethernets:
        macvlan0:
            addresses:
                - 192.168.1.6/32
            routes:
                - to: 192.168.1.2/31
                  via: 192.168.1.6
                  metric: 100
                - to: 192.168.1.4/31
                  via: 192.168.1.6
                  metric: 100
----
Set the script to be executable "chmod o+x,g+x,u+x /etc/networkd-dispatcher/routable.d/10-macvlan-interfaces.sh"
----
Apply the changes:
netplan apply