NetworkManager renderer for Netplan ignores link-local: []

Bug #1950049 reported by Nate Stuyvesant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Triaged
Low
Unassigned

Bug Description

If I am trying to get rid of IPv4 and IPv6 addresses on a particular interface using Netplan, if I use NetworkManager as the renderer, it does not follow the last of these three Netplan documentation examples:
Example to enable only IPv4 link-local: link-local: [ ipv4 ]
Example to enable all link-local addresses: link-local: [ ipv4, ipv6 ]
Example to disable all link-local addresses: link-local: [ ]

/etc/netplan/01-network-manager-all.yaml
network:
  version: 2
  renderer: NetworkManager
  ethernets:
    lan:
      match:
        macaddress: a8:20:XX:XX:9f:da
      dhcp6: true
      addresses:
        - 192.168.1.3/24
      routes:
        - to: default
          via: 192.168.1.1
          metric: 100
      nameservers:
        addresses: [192.168.1.1]
        search: []
      set-name: lan
    softether:
      match:
        macaddress: 40:6c:XX:XX:4a:93
      optional: true
      link-local: []
      set-name: softether

Followed by `netplan generate` and `netplan apply`, results of `ip a` for the softether interface...
2: softether: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 40:6c:XX:XX:4a:93 brd ff:ff:ff:ff:ff:ff
    altname enp9s0
    inet 169.254.65.216/16 brd 169.254.255.255 scope link noprefixroute softether
       valid_lft forever preferred_lft forever
    inet6 fd8b:a698:e8f4:3:426c:8fff:fe35:4a93/64 scope global deprecated dynamic mngtmpaddr
       valid_lft 769sec preferred_lft 0sec
    inet6 fd97:65c2:6883:1:426c:8fff:fe35:4a93/64 scope global dynamic mngtmpaddr
       valid_lft 1785sec preferred_lft 1785sec
    inet6 fda2:db11:4cad:2:426c:8fff:fe35:4a93/64 scope global deprecated dynamic mngtmpaddr
       valid_lft 769sec preferred_lft 0sec
    inet6 fdaa:ed5f:f69b:4:426c:8fff:fe35:4a93/64 scope global deprecated dynamic mngtmpaddr
       valid_lft 770sec preferred_lft 0sec
    inet6 fe80::426c:8fff:fe35:4a93/64 scope link
       valid_lft forever preferred_lft forever

However, if the renderer is changed to networkd...
network:
  version: 2
  renderer: networkd
  ethernets:
    lan:
      match:
        macaddress: a8:20:XX:XX:9f:da
      dhcp6: true
      addresses:
        - 192.168.1.3/24
      routes:
        - to: default
          via: 192.168.1.1
          metric: 100
      nameservers:
        addresses: [192.168.1.1]
        search: []
      set-name: lan
    softether:
      match:
        macaddress: 40:6c:XX:XX:4a:93
      optional: true
      link-local: []
      set-name: softether

Then `netplan generate` and `netplan apply`, results of `ip a` for the softether interface...
2: softether: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 40:6c:XX:XX:4a:93 brd ff:ff:ff:ff:ff:ff
    altname enp9s0

To recap, using NetworkManager as the renderer for Netplan fails to eliminate IPv4 and IPv6 addresses when setting link-local: [].

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 5.13.0-20.20-generic 5.13.14
Uname: Linux 5.13.0-20-generic x86_64
NonfreeKernelModules: wl zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckResult: pass
Date: Sat Nov 6 12:51:59 2021
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
InstallationDate: Installed on 2021-11-05 (0 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Release amd64 (20211012)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubiquity
Symptom: installation
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nate Stuyvesant (nstuyvesant) wrote :
affects: ubuntu → ubiquity (Ubuntu)
affects: ubiquity (Ubuntu) → netplan.io (Ubuntu)
Revision history for this message
Lukas Märdian (slyon) wrote :

Indeed, the NetworkManager backend renderer does not seem to act upon those settings. As it does not seem to have any handler implemented as of v0.106. It seems to fallback to "ipv4.method=link-local" whenever nothing else is defined for NetworkManager.

We should improve the implementation of this or at least clearly state the limitation in the documentation.

Changed in netplan.io (Ubuntu):
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.