首页 > 其他 > 详细

CentOS7多网卡手动绑定

时间:2017-04-21 14:50:30      阅读:371      评论:0      收藏:0      [点我收藏+]

关闭NetworkManager:

systemctl stop NetworkManager


一、(mode0)轮询模式:

[root@centos7 network-scripts]# vi ifcfg-bond0 

DEVICE=bond0

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=static

BONDING_OPTS="mode=0 miimon=100"

BONDING_MASTER=yes


[root@centos7 network-scripts]# vi ifcfg-eth0

DEVICE=eth0

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes


[root@centos7 network-scripts]# vi ifcfg-eth1

DEVICE=eth1

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes


二、(mode1)主备模式:

[root@centos7 network-scripts]# vi ifcfg-bond0 

DEVICE=bond0

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=static

BONDING_OPTS="mode=1 miimon=100"

BONDING_MASTER=yes


[root@centos7 network-scripts]# vi ifcfg-eth0

DEVICE=eth0

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes


[root@centos7 network-scripts]# vi ifcfg-eth1

DEVICE=eth1

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes


三、(mode2)802.3ad,LACP模式:


华为交换机侧配置:

interface gigabit0/1

   eth-trunk 14

interface gigabit0/1

   eth-trunk 14


interface Eth-Trunk14

 description link-to-centos-server-bond0

 port default vlan 10

 mode lacp


服务器侧配置:

[root@centos7 network-scripts]# vi ifcfg-bond0 

DEVICE=bond0

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=static

BONDING_OPTS="mode=802.3ad miimon=100 lacp_rate=fast"

BONDING_MASTER=yes


[root@centos7 network-scripts]# vi ifcfg-eth0

DEVICE=eth0

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes


[root@centos7 network-scripts]# vi ifcfg-eth1

DEVICE=eth1

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes


检查bond状态:

cat /proc/net/bonding/bond0


本文出自 “Peter的博客” 博客,请务必保留此出处http://backyard.blog.51cto.com/4925780/1918102

CentOS7多网卡手动绑定

原文:http://backyard.blog.51cto.com/4925780/1918102

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!