Previously, I configured IPVS loopback addresses in /etc/network/interfaceslike this:

auto lo:0
iface lo:0 inet static
  pre-up sysctl -q -p

On 18.04, I tried adding this section to the netplan config:


And then ran netplan apply. systemd-networkd logs the following:

May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: rtnl: received address with invalid family 129, ignoring

But it doesn't seem to have any effect (ifconfig doesn't list lo:0). Not sure what the invalid family 129 refers to. The actual address (it's not :-) ) works fine when I manually use ifconfig to set it up.

I also tried using lo:0 as the YAML key name, but then I get this error:

May 18 10:00:06 [...] systemd-networkd[3736]: /run/systemd/network/10-netplan-lo:0.network:2: Interface name is not valid or too long, ignoring assignment: (null)

Looks like systemd-networkd doesn't like lo:0 as an interface name. Any suggestions?

  • See my answer in this post, I think that is what you are looking for: askubuntu.com/questions/1033403/… – user822833 May 18 '18 at 17:02
  • @MikaelSchultz This seems very close to I want to do (lo:0 instead of lo:1). I tried explicitly specifying renderer and match, but that didn't seem to have any effect. Also FYI -- I updated the question with some more info from the logs. I wonder what I'm missing. – kartik_subbarao May 18 '18 at 17:14
  • Turns out that my netplan config was actually working, but ifconfig could not display the additional loopback address assigned to lo. Problem solved :-) – kartik_subbarao May 18 '18 at 19:42

It turns out that the netplan configuration did assign the additional loopback address to lo, but ifconfig couldn't display it, which was misleading me. When I manually ran ifconfig lo:0 netmask it displayed lo:0 just fine. But netplan assigned the address to lo, not lo:0. Running ip addr revealed the additional IP address on lo.

Upon further reading, I found that ifconfig (net-tools) has long been deprecated in favor of ip (iproute): https://serverfault.com/questions/633087/where-is-the-statement-of-deprecation-of-ifconfig-on-linux

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.