apt install vlan
systemctl disable dhcpcd.service
Include files from /etc/network/interfaces.d:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.10.10.143
netmask 255.255.255.0
network 10.10.10.0
gateway 10.10.10.1
#auto eth0:1
#iface eth0:1 inet dhcp
auto eth0.100
iface eth0.100 inet static
vlan-raw-device eth0
address 10.100.1.15
netmask 255.255.255.248
auto eth0.101
iface eth0.101 inet static
vlan-raw-device eth0
address 10.22.21.161
netmask 255.255.255.240
#static route
up ip ro add 50.50.160.10/32 via 10.10.10.254
Ссылки:
https://raspberrypi.stackexchange.com/questions/85408/raspbian-stretch-routing-vlan https://raspberrypi.stackexchange.com/questions/85408/raspbian-stretch-routing-vlan https://itc-life.ru/kak-dobavit-marshrut-v-linux-static-routes/ http://jodies.de/ipcalc ### mask #255.255.255.255 #/32 #255.255.255.252 #/30 #255.255.255.248 #/29 #255.255.255.240 #/28 #255.255.255.224 #/27 #255.255.255.0 #/24 #255.255.0.0 #/16 #255.0.0.0 #/8