I yaml’d my network: netplan and the new world order

[Put on your peril-sensitive sunglasses. If you are expecting a high-level blog post here, this is not for you :]

So, systemd. Its eating the world. I joked that soon the kernel would run from systemd, and systemd would replace grub (and it is!).

I have a relatively complex home network, and was feeling pretty proud of myself for moving the config to upstart (/etc/network/interfaces.d/*) from /etc/rc.local.

And then a wild NetworkManager appeared. And after some trial and error, I managed to... well I gave up and let it stay in upstart, telling NetworkManager to ignore those interfaces with per-route MTU's.

And then a wild systemd-networkd appeared. And I ignored it. Because who in their right mind would write a bunch of /etc/systemd/systemd/*service files for each thing? I would never get an upgrade to work or remember. Why can't the network config just be in one spot like upstart?

And then suddenly, netplan. Maybe my prayers are answered, I can have networkd and 1-shot config in this shiny-new YAML format. Right? I mean, what does it say about software if someone has to develop new software to configure it? I've gone from a couple of IP/mask/mtu, to a dozen files in different directories, even I couldn't keep it straight, so netplan to the rescue right?

Well, several failed boot (and remembering to use "systemd.unit=emergency.target" to grub to resolve, I mean, that's easy right?), I'm back, and editing my yaml file.

edit/netplan generate/netplan apply.

So, what pops out?

Well, for 1, you cannot set the MTU of a VLAN. You can't change the MAC of an interface (remember my IPv6 privacy post? I need to now!). And you certainly cannot have a per-route MTU.

Sigh. Progress. Get off my lawn!

So i kept the yaml from netplan, and let it drive the networkd, but I added this 'hack' cuz, well, how else?

# I cannot figure out how to do this w/ netplan
# it seems you cannot set the mtu of a vlan
# and you cannot set the mtu of a route
# --dab
Description=Set mtu on device

ExecStart=/sbin/ip link set dev eno1 up mtu 9000
ExecStart=/sbin/ip link set dev eno1.3 up mtu 9000
ExecStart=/sbin/ip r c dev eno1 mtu 1500
ExecStart=/sbin/ip r c default via mtu 1500

3 comments on “I yaml’d my network: netplan and the new world order
  1. db Mathieu Trudel-Lapierre says:

    Feedback noted.

    Please, don’t hesitate to share more feedback, we’re working actively on fixing things that are missing in netplan.

  2. db Dan says:

    This reinventing of the wheel drives me insane. For one, yaml sucks as far as human readability/writability. Secondly, by using netplan you actually sacrifice functionality – it also can’t do promiscuous mode, fyi, and goodness knows what else. It’s systemd all over again – less functionality and control for the sake of “ease of configurability” or something (which is not even real if you want to do anything at all which the developer didn’t think you might want to do in the typical “it suits my needs” fashion)

  3. db Michael says:

    Linux used to be about the beauty of simplicity. And about choice.
    Now its some bloody hipsters forcefeeding you unnecessary “solutions” to problems you don’t have, and integrating these “solutions” so deeply in the system that it’s a royal PITA _not_to use them. And they don’t give a damn about the Unix philosophy (https://en.wikipedia.org/wiki/Unix_philosophy). Rule of Simplicity? Rule of Robustness? Hah – who needs human readable config files when you can have complex yamlised, daemonised stuff?!
    At least for some of us there’s still some choice left: don’t use Redhat, don’t use Ubuntu.
    My sympathy goes out to all those poor people whose job forces them to use “hip”, “professional” distros.

Leave a Reply

Your email address will not be published. Required fields are marked *