Linux服务器端口access改为trunk all

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

posted @ 2019-09-18 09:49  发喜小爹  阅读(1262)  评论(0编辑  收藏  举报