ubuntu快速配置网卡bonding
来源:互联网 发布:python实现dbscan 编辑:程序博客网 时间:2024/06/05 12:09
网卡bonding可以带来网络处理能力的提升,网络接口的冗余等.
前提条件:至少两块可用的网卡,下面以简洁的步骤描述如何快速配置bonding:
1.加载内核模块
vi /etc/modules 加入
bonding
配置好后类似以下:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
loop
lp
rtc
bonding
2.断开网络
stop networking
3.加载模块
modprobe bonding
4.编辑网卡配置,加入bonding
vi /etc/network/interfaces eth0 eth1设置为bonding模式,编辑好后类似如下:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet manual
bond-master bond0
auto eth1
iface eth1 inet manual
bond-master bond0
auto bond0
iface bond0 inet static
address 192.168.1.110
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# load balancing and fault tolerance
#bond-mode balance-rr
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate 1
bond-slaves none
#bond-downdelay 200
#bond-updelay 200
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
5.启动网络
start networking
注:这里的bond-mode有多种,根据实际情况和需求进行设置:
- Mode 0
balance-rr
Round-robin policy: 从第一块可用的slave网卡开始顺序传输数据包.拥有负载均衡和容错的能力。
- Mode 1
active-backup
Active-backup policy: 同一时刻只有一块网卡处于工作模式,另外一块仅当active出现故障时才会启用.
- Mode 2
balance-xor
XOR policy: 基于目的mac异或运算传输数据包,提供负载均衡和容错能力.
- Mode 3
broadcast
Broadcast policy: 所有数据包要传送至所有slave,具有很高的容错能力.
- Mode 4
802.3ad 遵循IEEE 802.3ad 规范.
Mode 5
balance-tlb
自适应负载均衡: 流出流量基于当前各slave速率负载. 进入流量由当前active slave接收.如果流入处理失败,由其他slave接替.
Mode 6
balance-alb
自适应负载均衡: 包含tlb和rlb, 流入负载基于arp协商.
参考文档:https://help.ubuntu.com/community/UbuntuBonding
其他参考:https://www.kernel.org/doc/Documentation/networking/bonding.txt
younstar原创内容,本人转载
- ubuntu快速配置网卡bonding
- 配置linux双网卡bonding
- suse linux配置网卡bonding
- linux 下配置网卡bonding
- redhatEL7网络配置,网卡bonding
- 多网卡绑定配置-bonding
- linux下网卡bonding配置
- Ubuntu14配置Bonding多网卡
- 服务器网卡bonding配置浅读
- linux下的双网卡bonding配置
- 为RAC私有网络配置网卡Bonding
- 网卡bonding
- Ubuntu网络配置——vlan+bonding
- linux 多网卡bonding
- XenServer网卡Bonding
- 网卡bonding过程介绍
- 网卡bonding模式
- Linux双网卡bonding举例
- uva 437 - The Tower of Babylon(DP)
- U-Boot移植(二)——U-Boot编译过程分析(3)
- DIV+CSS来布局网站
- C++引用与指针的关系
- samba 4.0.7 devel 编程之用户管理篇
- ubuntu快速配置网卡bonding
- ASP.NET MVC
- 定位 与浮动
- 白话经典算法系列之七 堆与堆排序
- oracle cache buffer lru chain
- java String类详解
- QWidget与HWND的互相转换
- HTML 标签复习 2、表单和服务器连接 3、框架笔记
- windows下python项目骨架所需配置