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

相关文章:

  • 2021-12-04
  • 2022-12-23
  • 2021-12-04
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
猜你喜欢
  • 2021-11-23
  • 2021-11-24
  • 2021-08-23
  • 2021-12-27
  • 2022-12-23
  • 2021-09-21
相关资源
相似解决方案