I will start by saying I do not know whether I am dealing with a user (me!) error (me!), a netplan bug, or even a systemd bug. I won't bloat this question with configurations and diagnostics yet, just in case someone tells me I have missed something obvious.

I have a network that I am slowly and cautiously upgrading to 802.1Q VLAN. I have basically four VLANs, but three are tagged exclusively by my Netgear prosafe switches at the moment. The fourth VLAN is running with my ubuntu server firewall (shorewall), which is also my core router, defining a VLAN interface via systemd-networkd. My two wifi access points (unifi) also tag the traffic for clients themselves. This all works the way I would expect, including my isc-dhcp-server leasing ip4 addresses to clients connecting to this guest SSID, subnet and VLAN.

This core router has three files associated with the real ethernet interface in /etc/systemd/network/. The first is a netdev to define the VLAN virtual interface, the second is a network file that defines the underlying ethernet interface and assigns it three static ip4 and three static ip6 subnetworks (addresses and routes), as well as associating the VLAN with itself. The third is another network file that assigns a single ip4 and single ip6 address for the VLAN interface.

As I said, I haven't seen anything that suggests this is an illegal combination and all my testing confirms that it works as intended. The "real" interface has six addresses, and the VLAN interface has its own addresses that DO NOT OVERLAP with the six subnets of the "real" interface.

I've spent ages looking at netplan examples, but can't see anything similar. Basically, my best effort resulted in traffic mayhem because the VLAN interface inherited ALL the addresses and routes of the real interface, as well as its own!

I gave up and reverted to systemd on my core router and tried to work on a simplified netplan configuration for a development system (ubuntu server 18.04.1 with netplan.io version 0.40.1~18.04.2).

With one "real" and one VLAN interface, each with a single ip4 and ip6 static address. My best effort (in a single yaml) yields identical ip4 and ip6 addresses for both interfaces, while the ip4 and ip6 of the VLAN interface are nowhere to be seen. This configuration is non-functional - traffic can't get in and out successfully.

So, to ask a simple question: am I trying to do something that netplan OUGHT to support? (i.e. addresses/routes assigned to the physical ethernet interface and different addresses/routes assigned to the VLAN interface?)

If someone can give me a simple answer (that I can understand!!), I'll either fix it myself, or ask for help and provide more detailed information.

Thanks in anticipation...

  • For further assistance, please attach your netplan.yaml, the output of your routing table, and a description of what part of the routing table is not what you expect. – slangasek Nov 14 '18 at 1:00
  • I have set up the configuration with systemd-networkd and tested that traffic flows as I expect, on both the base interface and the VLAN. I thought it would be useful to report this first. – Brian Burch Nov 28 '18 at 0:20

Yes, netplan should support addresses both on the ethernet interface and on a vlan attached to that interface.

  • Thanks very much for your replies! This is excellent news. I am much happier knowing that I am trying to do something which ought to be possible.I will set up a systemd-networkd definition on my test server and show you the "correct" address/routes, then add the yaml and the "wrong" address/routes for comparison. Don't think I am rude if it takes a day or so to do - we have house guests all weekend and my wife says they get priority! – Brian Burch Nov 16 '18 at 4:24
  • Having to put files elsewhere is a bit boring, but here is my working systemd network configuration: pastebin.com/J1rzScCE – Brian Burch Nov 28 '18 at 3:29
  • ... and here is a collection of my systemd network definitions which created the configuration above. pastebin.com/Wta6N3md – Brian Burch Nov 28 '18 at 3:37
  • Here is my best-efforts netplan definition to create the desired network definition: pastebin.com/dfWnsUmQ – Brian Burch Nov 28 '18 at 3:41
  • ... and finally, the network configuration that netplan created: pastebin.com/hvg1XqvB – Brian Burch Nov 28 '18 at 3:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.