centos7 bond双网卡

这一生的挚爱 提交于 2019-12-07 10:35:37

[root@pay network-scripts]# cat ifcfg-bond0 |grep -v \#
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
IPADDR="192.168.67.111"
NETMASK="255.255.255.0"
GATEWAY="192.168.67.2"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
DEVICE="bond0"
ONBOOT="yes"
BONDING_OPTS="miimon=100 mode=1"
[root@pay network-scripts]# cat ifcfg-ens38 |grep -v \#
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
DEVICE="ens38"
MASTER=bond0
SLAVE=yes
[root@pay network-scripts]# cat ifcfg-ens39 |grep -v \#
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
DEVICE="ens39"
MASTER=bond0
SLAVE=yes

 

 

[root@pay network-scripts]# service network restart 

 

[root@pay ~]# ip a |egrep 'bond|ens38|ens39'
4: ens38: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
5: ens39: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
8: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
inet 192.168.67.111/24 brd 192.168.67.255 scope global bond0
[root@pay ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: ens39
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: ens38
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 00:0c:29:52:f7:35
Slave queue ID: 0

Slave Interface: ens39
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:52:f7:3f
Slave queue ID: 0
[root@pay ~]# ifdown ens39
Device 'ens39' successfully disconnected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!