Ubuntu 16.04 amd64 bond mode6 配置
1、简介
本文 旨在 介绍 在 Ubuntu 16.04 环境下 配置 bond mode6
1.1 操作 系统
## 本文 测试 使用的是 Ubuntu 16.04 的操作系统
# lsb_release -a
1.2 bond
1.2.1 为什么 使用 bond
随着 网络 信息 时代的发展,很多 时候 单个 网卡 不能 满足 我们 的日常需求,单个 的 千兆(哪怕是 万兆)如今 都已经 出现 了瓶颈;Linux bonding 驱动提供了一种 将多个物理网络端口捆绑为单个逻辑网络端口的方法,用于网络负载均衡、冗余 来 提升网络的性能,解决 单个 网卡 带来的 瓶颈 问题
1.2.2 bond 驱动
Linux的多网卡绑定功能使用的是内核中的"bonding"模块(关于此模块可以参考Linux Ethernet Bonding Driver文档,幸运的 是 目前发布各个Linux版本内核均已包含了此模块,大多数情况下不需要重新编译内核);Linux 的 bonding 驱动提供了绑定/集成(bond)多个网卡为一个虚拟逻辑网口的功能;
1.2.3 bond 模式
网口绑定 (bonded)有多种工作模式: 目前网卡绑定mode共有七种(0~6)bond0、bond1、bond2、bond3、bond4、bond5、bond6(bond6 只是 个名称,bond 配置的 mode6 模式;所以 为了 方便 直观了解,就 已经 成为了 一种 约定俗成 的规范);一般来说,分为 热后备(hot standby) 和 负载均衡(load balancing);本文 只介绍 bond6 (其余 模式 暂不介绍)
1.3 bond6
属于 负载 均衡(发送、接收 都会进行 负载),配置 bond6 不需要对 交换机(switch) 进行相关配置,因此 比较 简单操作(哈哈哈,不需要 配置 交换机哦,我貌似 也不会配交换机)
2.1 bond 模块 查看
## 内核模块操作相关的命令:lsmod、modinfo、depmod、rmmod、inmod、modprobe
## lsmod 结果
## 第一列 :表示 模块的名称
## 第二列 :表示 模块的大小
## 第三列 :表示 依赖该模块的个数
## 第四列 :表示 依赖 该模块 的内容(如果 依赖 个数 为0,则第四列为空)
# lsmod | grep "bond*"
bonding 147456 0
2.2 bond 模块加载
## 如果 bond 模块 没有加载,我们需要 手动 加载 该模块
# modprobe bonding
2.3 bond 模块信息
## 可以 通过 modinfo 命令 查看 某一模块的具体 信息
## 不想 详细 解释了:filename、author、license、depends...
# modinfo bonding
3、网卡 查看
# ifconfig -a
4、bond 配置/检测
不同 操作 系统 对于 bond 配置 方式 不一样,所以 在此处 在此 提示 一下,本文 针对 Ubuntu 16.04 操作 系统 配置 bond的 说明
4.1 安装 ifenslave
## 在线安装
# apt-get install ifenslave
4.2 bond 模块 开机 自启
## 系统 开启 如果 不自动 加载 bond 驱动,可以 手动添加
# cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.## bond 模块 开机自启
sudo modprobe bondingexit 0
4.3 bond 配置
# cat /etc/network/interface
# cat /etc/network/interfaces# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*# The loopback network interface
auto lo
iface lo
inet loopback# The primary network interface
auto bond0
iface bond0 inet static
address XXX.XXX.XXX.XXX
netmask XXX.XXX.XXX.XXX
gateway XXX.XXX.XXX.XXXbond-slaves ens1f0 ens1f1
bond-lacp-rate 1
bond-mode 6
bond-miimon 100auto ens1f0
iface ens1f0 inet manual
bond-master bond0auto ens1f1
iface ens1f1 inet manual
bond-master bond0
4.4 bond 检测
# cat /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: ens1f0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0Slave Interface: ens1f0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: f8:f2:1e:39:93:60
Slave queue ID: 0Slave Interface: ens1f1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: f8:f2:1e:39:93:61
Slave queue ID: 0
5、网络/带宽 测试(简单介绍)
5.1 iperf 服务器端
本文测试的是 TCP 方式下的 网络带宽测试(根据自己需求,也可测试 UTP方式)
# iperf -s
5.2 iperf 客户端
## iperf_server_ip iperf 服务端 IP地址
## thread_num 多进程,进程 数量
## time 测试时长(s)
## num 客户端 每次打印信息间隔(s)
# iperf -c {iperf_server_ip} -P {thread_num} -t {time} -i {num}
6、网口流量监测(简单介绍)
监测 网口 流量 命令 很多,再次 不过多 介绍,一笔带过,后期 编写 文章 详细 描述
## 执行 nmon 命令,再按键 "N"
# nmon
转载于:https://blog.51cto.com/11495268/2345761
Ubuntu 16.04 amd64 bond mode6 配置相关推荐
- ubuntu 16.04 tightvncserver VNC 安装配置,安装xrdp,x11vnc、Ubuntu 18.04
ubuntu 安装 VNC 1,ubuntu 安装 VNC 2,VNC配置 3,macOS VNC Viewer 安装 4,安装xrdp 5,macOS 使用Microsoft Remote Desk ...
- ubuntu 16.04下安装pytorch配置caffe2(cuda 9.0+cudnn 7.6)
caffe2已经合并进啦pytorch里面,所以我们可以通过安装pytorch完成对caffe2的配置,相较于安装caffe2源码的方式,操作上更为简单. 操作系统: Ubuntu 16.04.5 L ...
- Ubuntu 16.04 amd64下deb安装gcc5.4和所有依赖
Ubuntu 16.04下deb安装gcc5.4和所有依赖 某次装完系统发现缺少gcc和g++,因为无法联网,便到https://packages.ubuntu.com上寻找了相关deb安装包以及依赖 ...
- linux怎么运行amd64,Ubuntu 10.04 amd64安装和配置
先晒下系统信息(老机了): Linux mepc 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64 GNU/Li ...
- Ubuntu 16.04 LTS 双网卡配置
需求 电脑双网卡,需要实现一个静态IP分配(产品测试用),另外一个DHCP(上网查资料) 实现 打开终端,输入的ifconfig,如下图所示,我的两个网卡叫enp3s0和enp4s0. ifconfi ...
- Ubuntu 16.04 amd64架构下安装使用i386程序动态链接库依赖
设置启用多架构 首先可以查看自己的64位系统是否开启了32位支持功能,可以参考 http://linux.cn/article-2935-1.html 在终端输入 dpkg –print-archit ...
- linux下opengl开发环境,Ubuntu 16.04 OpenGL 开发环境配置指南
在 Visual Studio Code 中撰写一段测试程序 // test.c /* light.c 此程序利用GLUT绘制一个OpenGL窗口,并显示一个加以光照的球. */ /* 由于头文件gl ...
- 在Ubuntu 16.04上安装和配置VNC
目录 1.VNC客户端配置 2.VNC服务端配置 2.1 本机远程连接服务器 2.2 更新依赖包 2.3 安装Xfce桌面环境 2.4 安装tightvncserver 3.客户端VNC连接服务端 4 ...
- 如何在Ubuntu 16.04上安装和配置GitLab
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-ubuntu-16-04 ...
最新文章
- Redis的RDB持久化和AOF持久化区别
- 通过OAuth 2.0和Okta构建具有安全的服务器到服务器通信的Spring Boot应用
- 服务器被攻击怎么修改,服务器一直被攻击怎么办?
- Android官方开发文档Training系列课程中文版:后台加载数据之使用CursorLoader进行查询
- C++类的定义和对象的创建
- Java开发框架——Struts框架
- 关于SQL语句中的双引号、单引号和
- 服务器日志egl文件,【图片】Liddy's Linux编译日志(版本8.4)【蕾迪猫的linux吧】_百度贴吧...
- L1-032 Left-pad (20 分)—团体程序设计天梯赛
- java设计模式,百度网盘
- 大疆推出Avata无人机以及飞行眼镜Goggles 2
- 插值法(最邻近,双线性,双三次),图像放缩 python实现
- STM32F4系列定时器简介
- 根据月份,计算当月周数(非自然周)
- Nodejs使用robotjs轻松控制鼠标键盘
- ps怎么把图片上面的字去掉
- 电影评论分类:二分类问题 —— R语言实现
- H5企业微信如何返回到菜单页?
- 安卓开发ESC/POS打印机打印
- 达芬奇密码 第五十五章 第五十六章