VLAN gets IP address assignment from parent device when using "match macaddress"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netplan |
Confirmed
|
Undecided
|
Unassigned | ||
netplan.io (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
System is Ubuntu 18.04 with Netplan 0.99-0ubuntu3~
When using the "match macaddress" mechanism to guarantee the assignment of the ethernet device name to a particular port, VLANs added to that device will not get the the IP addresses assigned to them but rather the IP address of the parent ethernet device.
In the example below from my system, the 'l2club' VLAN would get the 192.168.2.1 address, along with eno1 receiving it. The address 10.232.228.16 was not assigned to anything. With the "match macaddress" section was removed, both interfaces would then get the IP addresses that were expected.
network:
version: 2
renderer: networkd
ethernets:
eno1:
match:
macaddress: 00:24:e8:00:00:00
addresses:
- 192.168.2.1/24
vlans:
l2club:
id: 10
link: eno1
addresses:
- 10.232.228.16/8
tags: |
added: rls-kk-notfixing removed: rls-kk-incoming |
Changed in systemd (Ubuntu): | |
importance: | Undecided → Low |
I just tried it on all releases up to Kinetic, they're all affected. I suspect it's actually a bug in systemd-networkd, as the files generated in /run/systemd/ networkd/ look sane enough:
root@firm-mayfly:~# cat /run/systemd/ network/ 10-netplan- eno1.network 00:16:3e: 10:7a:c2
[Match]
MACAddress=
Type=!vlan bond bridge
[Network] sing=ipv6 192.168. 2.1/24
LinkLocalAddres
Address=
VLAN=l2club
root@firm-mayfly:~# cat /run/systemd/ network/ 10-netplan- l2club. netdev
[NetDev]
Name=l2club
Kind=vlan
[VLAN]
Id=10
root@firm-mayfly:~# cat /run/systemd/ network/ 10-netplan- l2club. network
[Match]
Name=l2club
[Network] sing=ipv6 10.232. 228.16/ 8 tCarrier= yes
LinkLocalAddres
Address=
ConfigureWithou
There wasn't anything suspicious in the journald logs, either.