Ubuntu 多网卡绑定 bonding

 网口绑定的模式

  1. (balance-rr) Round-robin policy: (平衡轮询策略):传输数据包顺序是依次传输,直到最后一个传输完毕,此模式提供负载平衡和容错能力。
  2. (active-backup) Active-backup policy:(活动备份策略):只有一个设备处于活动状态。一个宕掉另一个马上由备份转换为主设备。mac地址是外部可见得。此模式提供了容错能力。
  3. (balance-xor) XOR policy:(平衡策略):传输根据[(源MAC地址xor目标MAC地址)mod设备数量]的布尔值选择传输设备。 此模式提供负载平衡和容错能力。
  4. (broadcast) Broadcast policy:(广播策略):将所有数据包传输给所有设备。此模式提供了容错能力。
  5. (802.3ad) IEEE 802.3ad Dynamic link aggregation. IEEE 802.3ad 动态链接聚合:创建共享相同的速度和双工设置的聚合组。此模式提供了容错能力。每个设备需要基于驱动的重新获取速度和全双工支持;如果使用交换机,交换机也需启用 802.3ad 模式。
  6. (balance-tlb) Adaptive transmit load balancing(适配器传输负载均衡):通道绑定不需要专用的交换机支持。发出的流量根据当前负载分给每一个设备。由当前设备处理接收,如果接受的设 备传不通就用另一个设备接管当前设备正在处理的mac地址。
  7. (balance-alb) Adaptive load balancing: (适配器负载均衡):包括mode5,由 ARP 协商完成接收的负载。bonding驱动程序截获 ARP在本地系统发送出的请求,用其中之一的硬件地址覆盖从属设备的原地址。就像是在服务器上不同的人使用不同的硬件地址一样。
     
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
#source-directory /etc/network/interfaces.d


# eth1 is manually configured, and slave to the "bond0" bonded NIC
auto eth1
iface eth1 inet manual
    bond-master bond0

# eth2 ditto, thus creating a 2-link bond.
auto eth2
iface eth2 inet manual
    bond-master bond0

# bond0 is the bonded NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
    address 192.168.1.75
    gateway 192.168.1.1
    netmask 255.255.255.0

    bond-mode 6
    bond-miimon 100
    bond-lacp-rate 1
    bond-slaves eth1 eth2

参考:

官方文档

Ubuntu服务器使用active-backup模式进行网口绑定

​​​​​​57-Ubuntu-多网卡绑定_dushansao的博客-CSDN博客Ubuntu七种bond模式和双网卡桥接绑定七种bond模式说明:第⼀种模式:mod=0,即:(balance-rr) Round-robin policy(平衡抡循环策略)特点:传输数据包顺序是依次传输(即:第1个包⾛eth0,下⼀个包就⾛eth1….⼀直循环下去,直到最后⼀个传输完毕),此模式提供负载平衡和容错能⼒第⼆种模式:mod=1,即: (active-backup) Act...https://blog.csdn.net/dushansao/article/details/103791014

 Ubantu基础设置以及多网卡绑定_李凯的博客-CSDN博客更改主机~$ sudo -i~# vim /etc/hostnamehosname~# reboot更改网卡名称为eth*~$ sudo vim /etc/default/grubGRUB_DEFAULT=0GRUB_TIMEOUT_STYLE=hiddenGRUB_TIMEOUT=2GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev...https://blog.csdn.net/weixin_45651006/article/details/103740940

How to Setup, Modify, and Delete Linux Network Bridges and Bonds

解绑 

#删除
rm /etc/network/interfaces

#要是ssh到服务器的,建议直接重启,后面不用操作


sudo rmmod bonding

#重启或者
sudo systemctl restart networking.service

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值