Add a VLAN interface to Raspberry Pi
Note: The Pi needs to be plugged into a switch with the VLANs configured for the port
Step 1: Go into the interface directory
cd /etc/network/interfaces.d
Step 2: Create a new interface
sudo nano eth0.10
Step 3: Add the interface and route:
auto eth0.10
iface eth0.10 inet dhcp
up ip route add 192.168.10.0/24 via 192.168.1.1
Step 4: Restart the networking
sudo systemctl restart networking
Check if the interface is up:
ip addr show eth0.50
No Comments