I have a Netgear switch and a Unifi Seurity gateway, which together allow me to seperate my network into different vlans. For the case in point I have servers on VLAN 10.
With other hardware I have i.e. my NAS, I simply tell the network configuration to use VLan 10 and as long as the port in the netgear switch is marked as Tagged on Vlan 10 everything works.
I am really struggling with Ubuntu 18.04 and Vlans. I don't want to do anything fancy other than have my Ubuntu 18 servers on vlan10
By the way I'm am using a Raspberry Pi 4 Model B
Here is my current configuration in /etc/netplan/50-cloud-init-.yaml
network:
version: 2
renderer: networked
ethernets:
eth0:
addresses:
- 192.168.10.20/24
gateway4: 192.168.10.1
nameservers:
addresses: [192.168.10.3, 8.8.8.8]
vlans:
vlan10:
id: 10
link: eth0
addresses: [192.168.10.21/24]
With the above configuration netplan apply does not give me any errors and everything is shown as correct when I run ip addr.
The problem however is that I can access any devices outside of vlan 10 from the Ubuntu box. I can however ssh into my NAS which is on Vlan 10 and from there SSH into the Ubuntu server.
It almost makes me think the problem is in my netgear switch configuration, but the ports the ubuntu server are plugged into are configured just the same as the NAS, which as I say works just fine.