network:
version: 2
# renderer: NetworkManager
ethernets:
eth0:
addresses:
- 192.168.100.116/24
- 192.168.100.117/24
- 192.168.100.118/24
gateway4: 192.168.100.1
nameservers:
search: [google.com]
addresses: [8.8.8.8, 8.8.4.4]
eth0:1:
addresses: 172.16.1.69/32
netplan apply
Basically the sub interface is the same interface, but having the VLAN tag.
'eth0:1' is not a sub interface, but interface alias.
you can use aliases with 22.04 in this way:
If you just need separate virtual interface, you can use dummy interface, it will use your default route table, have no VLAN, but MAC & IP