一、网卡桥接设置:
1、网卡配置文件:
[[email protected] /]# vim /etc/sysconfig/network-scripts/ifcfg-ens32
TYPE=Ethernet DEVICE=ens32 NAME=ens32 BOOTPROTO=none ONBOOT=yes BRIDGE=br0
2、网桥配置文件:
[[email protected] /]# vim /etc/sysconfig/network-scripts/ifcfg-br0
TYPE=Bridge DEVICE=br0 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.1.200 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=8.8.8.8 或者 TYPE=Bridge DEVICE=br0 BOOTPROTO=dhcp ONBOOT=yes
二、网卡绑定设置:
1、网卡配置文件01:
[email protected] /]# vim /etc/sysconfig/network-scripts/ifcfg-enp6s0f0
TYPE=Ethernet DEVICE=enp6s0f0 NAME=enp6s0f0 BOOTPROTO=none ONBOOT=yes USERCTL=no MASTER=bond0 SLAVE=yes
2、网卡配置文件02:
[email protected] /]# vim /etc/sysconfig/network-scripts/ifcfg-enp6s0f1
TYPE=Ethernet DEVICE=enp6s0f1 NAME=enp6s0f1 BOOTPROTO=none ONBOOT=yes USERCTL=no MASTER=bond0 SLAVE=yes
3、网桥配置文件:
[[email protected] /]# vim /etc/sysconfig/network-scripts/ifcfg-bond0
TYPE=Ethernet DEVICE=bond0 BOOTPROTO=static ONBOOT=yes USERCTL=no IPADDR=172.16.1.216 NETMASK=255.255.255.0 GATEWAY=172.16.1.1 DNS1=8.8.8.8
时间: 2024-10-21 16:03:06