银河麒麟系统配置bond双网卡绑定

银河麒麟系统配置bond双网卡绑定

一、bond七种模式

mode=0(balance-rr)(平衡抡循环策略)
mode=1(active-backup)(主-备份策略)
mode=2(balance-xor)(平衡策略)
mode=3(broadcast)(广播策略)
mode=4(802.3ad)(IEEE 802.3ad 动态链接聚合)
mode=5(balance-tlb)(适配器传输负载均衡)
mode=6(balance-alb)(适配器适应性负载均衡)

二、配置Bond

1.创建bond,并设置相应模式:
nmcli connection add type bond ifname bond0 mode active-backup
2.为bond配置ip地址:
nmcli connection modify bond-bond0 ipv4.method manual ipv4.addresses ip地址/子网掩码的网络位数 ipv4.gateway 网关地址 ipv6.method ignore
3.将需要绑定的子网卡1加入到bond:
nmcli connection add type bond-slave ifname enpxxxx(网卡名称) master bond-bond0  con-name bond0-enpxxxx 
4.将需要绑定的子网卡2加入到bond:
nmcli connection add type bond-slave ifname enpxxxx(网卡名称) master bond-bond0  con-name bond0-enpxxxx 
5.激活bond子网卡1:
nmcli connection up bond-slave-enpxxxxx
6.激活bond自网卡2:
nmcli connection up bond-slave-enpxxxxx
7.激活bond:
nmcli connection up bond0
8.查看bond配置:
nmcli connection show

三、配置vlan-bond

1.创建bond,并设置相应模式:
nmcli con add type bond ifname bond0 con-name bond0 mode active-backup miimon 100 ipv4.method disabled ipv6.method ignore
2.将需要绑定的子网卡1加入到bond:
nmcli connection add type bond-slave ifname enpxxx con-name bond0-enpxxxx master bond0
3.将需要绑定的子网卡2加入到bond:
nmcli connection add type bond-slave ifname enpxxx con-name bond0-enpxxxx master bond0
4.激活bond:
nmcli connection up bond0
5.为bond配置ip地址:
nmcli connection add type vlan ifname bond0.151 con-name bond0.151 id 151 dev bond0 ip4 xxxxxxx/24 gw4 xxxxx.254

猜你喜欢

转载自blog.csdn.net/weixin_45754407/article/details/134204686