我正在尝试在服务器和路由器之间的连接上设置多个 VLAN。服务器运行 Arch Linux。我正在使用 netctl 来设置这些。问题是第二个 VLAN 接口(按时间顺序,无论我先启动哪个)已关闭。可能是什么原因造成的?这是我的配置文件:
~ cat /etc/netctl/local
Description='VLAN 100 - Local network'
Interface=enp2s0.100
Connection=vlan
# The variable name is plural, but needs precisely one interface
BindsToInterfaces=enp2s0
VLANID=100
IP=static
Address="192.168.88.5/24"
Gateway="192.168.88.1"
DNS=("127.0.0.1 192.168.88.1 8.8.8.8 8.8.4.4")
Hostname="foo-server"
DNSDomain="local.foo.xyz"
DNSSearch="local.foo.xyz"
~ cat /etc/netctl/vlan-static
Description='VLAN 102 - Public IP'
Interface=enp2s0.102
Connection=vlan
# The variable name is plural, but needs precisely one interface
BindsToInterfaces=enp2s0
VLANID=102
IP=static
Address=('xxx.xxx.212.62/32' '172.27.1.2/30')
Routes=('default via 172.27.1.1 src xxx.xxx.212.62 dev enp2s0')
DNS=('172.27.1.1' '8.8.8.8')