如果节点上有多个网络接口时可以通过bonding将多个网络接口虚拟为一个网络接口,bonding可以提供高可用及负载均衡功能,从而提高节点的网络接口性能及可用性。

配置单bond

一、使用如下命令安装

apt-get install ifenslave-2.6

二、配置bonding

修改网络接口配置文件/etc/network/interfaces

配置一个bond

auto lo
iface lo inet loopback auto eth8
iface eth8 inet manual
bond-master bond0 auto eth7
iface eth7 inet manual
bond-master bond0 auto eth6
iface eth6 inet manual
bond-master bond0 auto eth5
iface eth5 inet manual
bond-master bond0 auto eth0
iface eth0 inet static
address 192.168.8.102
netmask 255.255.0.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 auto bond0
iface bond0 inet static
address 10.0.0.102
netmask 255.255.0.0 bond-slaves none
bond-miimon 100
bond-mode balance-alb

配置双bond

auto lo
iface lo inet loopback auto eth2
iface eth2 inet manual
bond-master bond0 auto eth3
iface eth3 inet manual
bond-master bond0 auto eth4
iface eth4 inet manual
bond-master bond0 auto eth0
iface eth0 inet static
address 10.0.0.103
netmask 255.255.0.0 auto bond0
iface bond0 inet static
address 192.168.9.103
netmask 255.255.0.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8
bond-slaves none
bond-miimon 100
bond-mode balance-alb auto eth5
iface eth5 inet manual
bond-master bond1 auto eth6
iface eth6 inet manual
bond-master bond1 auto eth7
iface eth7 inet manual
bond-master bond1 auto bond1
iface bond1 inet static
address 10.1.0.103
netmask 255.255.0.0
bond-slaves none
bond-miimon 100
bond-mode balance-alb

配置过程需要按照顺序配置,配置网卡,然后写bond的配置,两组错开就可以了

更新历史

why when
创建 2011年12月30日
更新 2019年12月9日

ubuntu配置bonding的更多相关文章

  1. ubuntu配置NFS

    ubuntu配置NFS: sudo apt-get install nfs-kernel-server 配置/etc/exports 例如:我们要将根目录下的 /opt/FriendlyARM/min ...

  2. ubuntu配置tftp服务

    ubuntu配置TFTP服务: TFTP是用来下载远程文件的最简单的网络协议,基于UDP协议.xinetd是新一代的网络守护进程服务程序,经常用于管理多种轻量型internet服务. sudo apt ...

  3. 关于ubuntu配置静态IP 无法正常上网的解决方案

    在ubuntu中配置静态IP后无法正常上网. 解决: 1.在终端执行 vim /etc/network/interfaces 在文件中加入如下内容,网关要写上,我开始一直无法上网就是因为没有配置网关 ...

  4. 转: ubuntu配置NFS,挂载开发板

    ====================================== 命令: 1. $sudo apt-get install nfs-kernel-server           (安装N ...

  5. Ubuntu配置和修改IP地址

    Ubuntu配置和修改IP地址 1.修改配置文件/etc/network/interfacesroot@ubuntu:~# sudo gedit /etc/network/interfaces 添加以 ...

  6. ubuntu 配置JDK环境变量

    ubuntu 配置JDK环境变量 (2011-11-25 16:45:59) 转载▼ 标签: ubuntu jdk 环境变量 杂谈 分类: Linux_Ubuntu_CentOs 过程如下: 1. 先 ...

  7. Ubuntu配置OpenStack 二:配置时间同步NTP和安装数据库Maridb以及问题总结

    继上一节Ubuntu配置OpenStack 一:配置主机环境,下面继续为安装时间同步,以及配置openstack的安装包源和安装数据库Maridb.(全文截图都是由自己徒手搭建完成并且截图) 一.安装 ...

  8. Ubuntu配置tomcat9

    buntu 安装jdk:[链接] Ubuntu安装eclipse:[链接] Ubuntu下安装MySQL与mysql workbench:[链接] Ubuntu配置tomcat9:[链接] Ubunt ...

  9. ubuntu配置小飞机

    现在有两种方式在ubuntu配置本地shadowsocks(前提已经在服务器上搭建好了ss) windows,ios和安卓配置都是gui,没什么好说的.然后前期工作什么买vps啊,比较无脑,不想记录这 ...

随机推荐

  1. 【C/C++编程入门学习】同样是数据类型,链表对比数组?哪一个更香?

    说起链表,第一反应:链表是一种数据类型!它可以用来存储同种类型多个批量数据.   有了这种认知,很容易去联想到数组,它也是一种数据类型,也可以用来存储同种类型的批量数据.初学者往往对数组的印象比较好, ...

  2. python 爬虫 循环分页

    import osfrom time import sleepimport fakerimport requestsfrom lxml import etreefake = faker.Faker() ...

  3. jdk、eclipse和idea安装

    一.jdk下载与环境配置与IDEA 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-213315 ...

  4. C++ Primer第5版 第三章课后练习

    练习3.1 #include <iostream> using namespace std; int main() { int sum = 0, val = 50; while (val ...

  5. python 实现多层列表拆分成单层列表

    有个多层列表:[1, 2, 3, 4, [5, 6, [7, 8]], ['a', 'b', [2, 4]]],拆分成单层列表 使用内置方法 结果和原列表顺序不同 def split(li): pop ...

  6. ImageLoader简介和使用方法

    1.功能概要 Android-Universal-Image-Loader是一个开源的UI组件程序,该项目的目的是提供一个可重复使用的仪器为异步图像加载,缓存和显示. (1).使用多线程加载图片(2) ...

  7. Tensorflow--Debug

    1.解决tensorflow报错ValueError: Variable conv1/weights already exists, disallowed. 解决方法1:重开一个控制台 解决方法2:在 ...

  8. C#连接Access

    连接数据库 string oleCon = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " + Application.Sta ...

  9. django支持多语言

    Django支持多语言切换 下面介绍下如何使网站或APP国际化,让其支持多种语言 . 官网 效果 1.创建locale文件夹 先在项目根目录下创建一个名为locale的文件夹,这个文件夹是用来存放dj ...

  10. 什么是 session 和 cookie

    cookie 大家应该都熟悉,比如说登录某些网站一段时间后,就要求你重新登录:再比如有的同学很喜欢玩爬虫技术,有时候网站就是可以拦截住你的爬虫,这些都和 cookie 有关.如果你明白了服务器后端对于 ...