Comment 6 for bug 1771704

Revision history for this message
Daniel Axtens (daxtens) wrote :

Hi,

I added this to my netplan-config-tester and it's turned up a couple of issues with NetworkManager.

1) If a static IPv4 address is specified and link-local: [ipv4] is specified, there is no link-local address added. The documentation doesn't make this clear; it only refers to DHCP conflicting with link-local.

network:
  ethernets:
    ens7:
      addresses: [16.16.250.1/22]
      link-local: [ipv4]
      renderer: NetworkManager
  version: 2

ubuntu@netplan2:~$ sudo ip a flush dev ens7
ubuntu@netplan2:~$ sudo ip l set dev ens7 down
ubuntu@netplan2:~$ sudo netplan apply
ubuntu@netplan2:~$ sleep 15 # give LL addresses time to be set up
ubuntu@netplan2:~$ ip a show dev ens7
9: ens7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:b4:02:6e brd ff:ff:ff:ff:ff:ff
    inet 16.16.250.1/22 brd 16.16.251.255 scope global noprefixroute ens7
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:feb4:26e/64 scope link
       valid_lft forever preferred_lft forever

This is doubly wrong: there's not IPv4 LL address and there is an IPv6 LL address. Which leads me to bug 2...

2) With NM, link-local: [ipv4] and link-local: [] don't disable a IPv6 LL address.

If you modify the config file above to have link-local: [] and repeat the test, you still get an IPv6 link-local address.

I don't know if you want to gate the backport on this working/being documented correctly or if you'd prefer this to go through for now while we get it fixed upstream. Let me know.

Regards,
Daniel