1.確認可用網卡及vlan id
eth5可用
vlan25:10.118.25.0/24
2.編輯網卡配置文件
vim /etc/sysconfig/network-scripts/ifcfg-eth5
DEVICE=eth5.25
BOOTPROTO=static
ONBOOT=yes
VLAN=yes
BRIDGE=br_eth5.25
vim /etc/sysconfig/network-scripts/ifcfg-eth5.25
DEVICE=eth5.25
BOOTPROTO=static
ONBOOT=yes
VLAN=yes
BRIDGE=br_eth5.25
vim /etc/sysconfig/network-scripts/ifcfg-br_eth5.25
DEVICE=br_eth5.25
BOOTPROTO=static
ONBOOT=yes
TYPE=Bridge
IPADDR=10.118.25.225
NETMASK=255.255.255.0
GATEWAY=10.118.25.1
重啟OS
reboot
驗證
ip a