I'm trying to have a properly configured Ubuntu 20.04 server network at boot.
I have an physical interface connected to a trunk so I want to define some vlan tagged interfaces on it. I'm using netplan. Content of /etc/netplan/50-cloud-init.yaml
follows:
network:
ethernets:
eno1:
match:
macaddress: b8:83:03:XX:XX:XX
mtu: 1500
eno2:
...
version: 2
vlans:
vlan3110:
id: 3110
link: eno1
dhcp4: no
addresses: [X.X.X.X/24]
gateway4: X.X.X.X
vlan3112:
id: 3112
link: eno1
dhcp4: no
vlan3111:
id: 3111
link: eno1
dhcp4: no
Now, if I reboot the system, no IP is assigned to vlan3110:
#ip a
...
9: vlan3110@eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether b8:83:03:XX:XX:XX brd ff:ff:ff:ff:ff:ff
inet6 fe80::ba83:3ff:XXXX:XXXX/64 scope link
valid_lft forever preferred_lft forever
...
And I can't figure why. I added -vv
at networkd-dispatcher
startup option in /etc/default/networkd-dispatcher
:
networkd_dispatcher_args="--run-startup-triggers -vv"
But I can't see any explicit issue:
# journalctl -b | grep vlan3110
Dec 01 17:45:17 hce02 networkd-dispatcher[1565]: DEBUG:Running immediate triggers for NetworkctlListState(idx=9, name='vlan3110', type='vlan', operational='degraded', administrative='pending')
Dec 01 17:45:17 hce02 networkd-dispatcher[1565]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=9, name='vlan3110', type='vlan', operational='degraded', administrative='pending') entering state 'pending': no triggers
Dec 01 17:45:17 hce02 networkd-dispatcher[1565]: DEBUG:Ignoring notification for interface NetworkctlListState(idx=9, name='vlan3110', type='vlan', operational='degraded', administrative='pending') entering state 'degraded': no triggers
networkctl
output follows:
# networkctl status vlan3110
● 9: vlan3110
Link File: /run/systemd/network/10-netplan-eno1.link
Network File: /run/systemd/network/10-netplan-eno1.network
Type: vlan
State: degraded (configured)
Driver: 802.1Q VLAN Support
HW Address: b8:83:03:4d:ca:48 (Hewlett Packard Enterprise)
MTU: 1500 (max: 65535)
Queue Length (Tx/Rx): 1/1
Auto negotiation: yes
Speed: 1Gbps
Duplex: full
Port: tp
Address: fe80::ba83:3ff:fe4d:ca48
Dec 01 18:18:08 hce02 systemd-networkd[1444]: vlan3110: netdev ready
Dec 01 18:18:08 hce02 systemd-networkd[1444]: vlan3110: IPv6 successfully enabled
Dec 01 18:18:08 hce02 systemd-networkd[1444]: vlan3110: Link UP
Dec 01 18:18:12 hce02 systemd-networkd[1444]: vlan3110: Gained carrier
Dec 01 18:18:14 hce02 systemd-networkd[1444]: vlan3110: Gained IPv6LL
If I delete the link and call netplan apply
after the server has completed its boot process the IP is being assigned as expected:
# ip link delete dev vlan3110
# netplan apply
Does anyone know how is happening?