netplan does not use permaddr to match macaddress:

Bug #2065870 reported by Tristan Hoar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Netplan
Triaged
Undecided
Unassigned

Bug Description

When creating a bonded interface using only match: macaddress once the bond is created the mac is no longer unique, and re running netplan apply throws an error.

e.g. a config like this
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      set-name: eth0
      match:
        macaddress: 00:50:56:29:00:b4
    eth1:
      set-name: eth1
      match:
        macaddress: 00:50:56:29:00:b5
    eth2:
      set-name: eth2
      match:
        macaddress: 00:50:56:29:00:b6
    eth3:
      set-name: eth3
      match:
        macaddress: 00:50:56:29:00:b7
  bonds:
    bond0:
      interfaces: ['eth0', 'eth3']
      parameters:
        mode: active-backup
        mii-monitor-interval: 100
        primary: eth0
        primary-reselect-policy: always
      addresses:
        - 10.0.0.10/24
      routes:
        - to: default
          via: 10.0.0.1
          metric: 100
    bond1:
      interfaces: ['eth2', 'eth1']
      parameters:
        mode: active-backup
        mii-monitor-interval: 100
        primary: eth2
        primary-reselect-policy: always
      addresses:
        - 10.0.1.10/24

netplan apply works to initially create the bonds, but on re run fails as eth0, eth2 and bond0 all have the same mac.

netplan apply
[]
Cannot find unique matching interface for eth0
[]
Cannot find unique matching interface for eth1
[]
Cannot find unique matching interface for eth2
[]
Cannot find unique matching interface for eth3

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Hello, thanks for your bug report.

Can you tell us what versions of Ubuntu and netplan.io you are using please?

Matching by permanent MAC address is the default since netplan 0.106 (which is available on Ubuntu 22.04 and newer). But apparently the CLI is missing support for it. We'll take a look at it.

Revision history for this message
Tristan Hoar (trishoar) wrote :

Hi, Sure thing, details below.

cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

dpkg -l netplan.io
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-======================================================
ii netplan.io 1.0-2ubuntu1 amd64 Declarative network configuration for various backends

Changed in netplan:
status: New → Triaged
tags: added: foundations-todo
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.