群晖网卡添加VLAN子网
无论是DSM7还是DSM6,都无法通过WEB界面添加多个VLAN子网,需要通过SSH手工添加:
1、首先在shell里确认要创建的VLAN属于哪个bond或哪个eth网卡,可以通过ovs-vsctl show查看,本例我要在ovs_bond1去添加VLAN子网,这里的ovs_bond1是指
Bridge "ovs_bond1"
# ovs-vsctl show Bridge "ovs_bond0" Port "bond0" Interface "eth1" Interface "eth0" Port "ovs_bond0" Interface "ovs_bond0" type: internal Bridge "ovs_bond1" Port "ovs_bond1" tag: 20 Interface "ovs_bond1" type: internal Port "bond1" Interface "eth3" Interface "eth2"
2、在/root目录下创建一个network_start.sh脚本文件
cat network_start.sh #!/bin/bash ip link delete ovs_bond1.120 ovs-vsctl add-port ovs_bond1 ovs_bond1.120 tag=120 -- set interface ovs_bond1.120 type=internal ip link set ovs_bond1.120 up ip addr add 192.168.120.1/24 dev ovs_bond1.120
3、执行network_start.sh脚本,可以将脚本通过WEB界面的“任务计划”里添加到开机执行
浙公网安备 33010602011771号