配置bonding

2019-05-08  本文已影响0人  缘觉如来

概述

bonding是一种linux系统下的网卡绑定技术,可以把服务器上多个个物理网卡在系统内部抽象(绑定)成一个逻辑上的网卡,能够提升网络吞吐量、实现网络冗余、负载均衡等功能。 bonding技术是linux系统内核层面实现的,它是一个内核模块(驱动)。使用它需要系统有这个模块, 我们可以modinfo命令查看下这个模块的信息, 一般来说都支持。 bonding技术提供了[七种工作模式],在使用的时候需要指定一种,每种有各自的优缺点。

deepin上配置bonding

环境:

 系统:Deepin15.2 专业版 
 网卡:eth2 eth3 
 bond0 :192.168.1.10 
 负载模式 :mode6 

/etc/network/interfaces 配置如下:

auto bond0
iface bond0 inet static
address 192.168.1.10
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
slaves eth2 eth3
bond_mode 6
bond_miimon 100
bond_downdelay 200
bond_updelay 200 

/etc/modules 配置如下

bonding mode=6 miimon=100

在/etc/modprobe.d目录下新建文件aliases-bond.conf,内容为:

alias bond0 bonding miimon=100 mode=6

完成以上的配置之后,重启系统。登录系统之后,查看文件/proc/net/bonding/bond0如下:

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200

Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:e0:00:e0:a2:a2
Slave queue ID: 0

Slave Interface: eth3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:e0:00:e0:a2:a3
Slave queue ID: 0
上一篇 下一篇

猜你喜欢

热点阅读