How to configure persistent 802.1ad VLAN interfaces using netplan

Asked by John F Leach

Hi nplan,

Does netplan support the configuration of persistent 802.1ad VLAN interfaces?

Below is the /etc/netplan/01-netcfg.yaml file:

network:
    version: 2
    renderer: networkd
    ethernets:
        eno1:
            dhcp4: no
            dhcp6: no
            addresses: [192.168.1.2/24]
            nameservers:
                addresses: [192.168.1.100]
    vlans:
        vlan.100:
            id: 100
            link: eno1
            addresses: [192.168.2.2/24]
    vlans:
        vlan.100.200:
            id: 200
            link: vlan.100
            mtu: 1400
            addresses: [192.168.3.2/24]

The user must issue "sudo ip link add link vlan.100 vlan.100.200 type vlan proto 802.1ad id 200" every time at boot because /etc/network/interfaces has been deprecated as of Ubuntu 17.10. Thanks for your help.

Regards,

John

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nplan Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Run:

echo "exit 0" | sudo tee -a /etc/rc.local
sudo chmod +x /etc/rc.local
sudo gedit /etc/rc.local

Add your command above the "exit 0" line. Reboot to test

Revision history for this message
John F Leach (jfleach) said :
#2

@actionparsnip: This is a workaround

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

I know....

Can you help with this problem?

Provide an answer of your own, or ask John F Leach for more information if necessary.

To post a message you must log in.