Hi,
I setup three VLANs on Libreelec 11.0.3
Code
rock64:~/.config/system.d # cat eth0-1.service
[Unit]
Description=Set VLAN interface for direct internet VLAN
Before=network.target multi-user.target
After=dbus.service network-base.service
[Service]
ExecStart=/sbin/vconfig add eth0 1
[Install]
WantedBy=multi-user.target
rock64:~/.config/system.d # cat eth0-2.service
[Unit]
Description=Set VLAN interface for direct internet VLAN
Before=network.target multi-user.target
After=dbus.service network-base.service
[Service]
ExecStart=/sbin/vconfig add eth0 2
[Install]
WantedBy=multi-user.target
rock64:~/.config/system.d # cat eth0-7.service
[Unit]
Description=Set VLAN interface for direct internet VLAN
Before=network.target multi-user.target
After=dbus.service network-base.service
[Service]
ExecStart=/sbin/vconfig add eth0 7
[Install]
WantedBy=multi-user.target
rock64:~/.config/system.d # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0.1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.1
192.168.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0.1
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.2
192.168.2.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0.2
192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.7
192.168.7.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0.7
rock64:~/.config/system.d #
Display More
Can anybody tell how I can control which network interface becomes the default route?
Thanks
Rainer