一、網卡橋接設置:
1、網卡配置文件:
[root@localhost /]# vim /etc/sysconfig/network-scripts/ifcfg-enp8s0
123456TYPE=Ethernet
DEVICE=enp8s0
NAME=enp8s0
BOOTPROTO=none
ONBOOT=
yes
BRIDGE=br0
2、網橋配置文件:
[root@localhost /]# vim /etc/sysconfig/network-scripts/ifcfg-br0
12345678TYPE=Bridge
DEVICE=br0
BOOTPROTO=static
ONBOOT=
yes
IPADDR=192.168.1.200
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=114.114.114.114
二、網卡綁定設置:
1、網卡配置文件01:
[root@localhost /]# vim /etc/sysconfig/network-scripts/ifcfg-enp6s0f0
12345678TYPE=Ethernet
DEVICE=enp6s0f0
NAME=enp6s0f0
BOOTPROTO=none
ONBOOT=
yes
USERCTL=no
MASTER=bond0
SLAVE=
yes
2、網卡配置文件02:
[root@localhost /]# vim /etc/sysconfig/network-scripts/ifcfg-enp6s0f1
12345678TYPE=Ethernet
DEVICE=enp6s0f1
NAME=enp6s0f1
BOOTPROTO=none
ONBOOT=
yes
USERCTL=no
MASTER=bond0
SLAVE=
yes
3、網橋配置文件:
[root@localhost /]# vim /etc/sysconfig/network-scripts/ifcfg-bond0
123456789TYPE=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=114.114.114.114
http://www.bkjia.com/Linuxjc/1191942.html TechArticle