前置条件:安装vlan包
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet manual
auto eno1.4
iface eno1.4 inet manual
vlan-raw-device eno1
auto eno1.5
iface eno1.5 inet manual
vlan-raw-device eno1
auto eno1.6
iface eno1.6 inet manual
vlan-raw-device eno1
auto eno1.7
iface eno1.7 inet manual
vlan-raw-device eno1
auto eno1.26
iface eno1.26 inet manual
vlan-raw-device eno1
auto br0
iface br0 inet static
address 172.17.240.197
network 172.17.240.0
netmask 255.255.255.0
gateway 172.17.240.254
dns-nameservers 202.96.134.133
dns-nameservers 114.114.114.114
bridge_ports eno1.26
bridge_stp off
bridge_fd 0
bridge_maxwait 0
auto br1
iface br1 inet manual
bridge_ports eno1.4
bridge_stp off
bridge_fd 0
bridge_maxwait 0
auto br2
iface br2 inet manual
bridge_ports eno1.5
bridge_stp off
bridge_fd 0
bridge_maxwait 0
auto br3
iface br3 inet manual
bridge_ports eno1.6
bridge_stp off
bridge_fd 0
bridge_maxwait 0
auto br4
iface br4 inet manual
bridge_ports eno1.7
bridge_stp off
bridge_fd 0
bridge_maxwait 0