Debian 9.4 多网卡链路聚合bond配置
Debian 9.4 多网卡链路聚合bond配置
安装ifenslave
- ifenslave 的作用是网卡的负载均衡
root@debian:~# apt-get install ifenslave
root@debian:~# dpkg -l | grep ifenslave
ii ifenslave 2.9 all configure network interfaces for parallel routing (bonding)
编辑 /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
auto eth0 #eth0作为远程使用的IP地址
iface eth0 inet static
address 192.168.121.94
netmask 255.255.255.0
gateway 192.168.121.2
auto bond0
iface bond0 inet static
address 192.168.121.100
netmask 255.255.255.0
gateway 192.168.121.2
bond-mode 0
bond-slaves eth1 eth2
bond-miimon 100
bond-downdelay 200
bond-updelay 200
auto eth1 #eth1和eth2作为需要绑定的网卡,不需要给定IP地址
iface eth1 inet static
auto eth2
iface eth2 inet static
- 注释
auto bond0
iface bond0 inet static
address 192.168.121.100
netmask 255.255.255.0
gateway 192.168.121.2
bond-mode 0 #网卡模式(0代表负载均衡模式;1代表主备模式)
bond-slaves eth1 eth2 #所绑定的网卡
bond-primary eth1 #设置绑定的主网卡,有流量优先走eth1(当模式为1)
bond-miimon 100 #网卡状态监测周期100ms
bond-downdelay 200 #网卡down时间
bond-updelay 200 #网卡up时间
- bond-mode 模式列表
0: balance-rr 负载均衡模式
1: active-backup 主备模式
2: balance-xor 异或策略
3: broadcast 广播策略
4: 802.3ad 动态链接聚合
5: balance-tlb 适配器传输负载均衡
6: balance-alb 适配器负载均衡
开机自动加载bonding模块
- 编辑 /etc/modules 文件
root@debian:~# vim /etc/modules
# /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.
bonding #添加这行
重启服务器
root@debian:~# reboot
- 使用 systemctl restart networking.service 这个命令重启网络服务会一直报错,不知道为啥,重启就好了
查看
root@debian:~# ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:38:1f:4c brd ff:ff:ff:ff:ff:ff
inet 192.168.121.94/24 brd 192.168.121.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe38:1f4c/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000
link/ether 00:0c:29:38:1f:56 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000
link/ether 00:0c:29:38:1f:56 brd ff:ff:ff:ff:ff:ff
5: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:0c:29:38:1f:56 brd ff:ff:ff:ff:ff:ff
inet 192.168.121.100/24 brd 192.168.121.255 scope global bond0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe38:1f56/64 scope link tentative dadfailed
valid_lft forever preferred_lft forever
Debian 9.4 多网卡链路聚合bond配置的更多相关文章
- Ubuntu 20.04 配置多网卡链路聚合
Ubuntu 20.04 配置多网卡链路聚合 多网卡IP配置 首先查看网卡信息 root@it:~# ip add 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65 ...
- ENSP静态链路聚合实验配置要点及实例
链路聚合分为:静态链路聚合.动态链路聚合链路聚合的负载分担模式:对于二层数据流,系统会根据MAC地址(源mac地址和目的mac地址来计算),而对于三层数据流则会根据ip地址来进行负载分担计算. 静态链 ...
- 群晖系统设置链路聚合并配置静态IP的教程【江东网 JDX86.COM】
1.进入控制面板 > 网络 > 网络接口.请单击创建 > 创建 Bond 2.进入聚合配置向导,选择你想要的模式,这里有几种模式意思分别为: 自适应负载平衡: 此模式优化了 Syno ...
- linux初学者-网卡的链路聚合篇
linux初学者-网卡的链路聚合篇 网卡的链路聚合就是将多块网卡连接起来,当一块网卡损坏,网络依旧可以正常运行,可以有效的防止因为网卡损坏带来的损失,同时也可以提高网络访问速度. 网卡的链路聚合一般常 ...
- ESXi与物理交换机静态链路聚合配置过程中的小陷阱
作者:陆斌文章来自微信公众号:平台人生 内容简介:ESXi与物理交换机之间配置静态链路聚合时,因为静态链路聚合的特点,在进行down网卡和从虚拟交换机移除网卡的操作时,可能会无法完成故障流量切换,影响 ...
- Eth-Trunk链路聚合配置
Eth-Trunk概述 Eth-Trunk接口能够实现负载分担.增加带宽和提高可靠性 Eth-Trunk接口把多个物理接口捆绑成一个逻辑接口 Eth-Trunk接口的链路聚合模式 链路聚合模式 应用场 ...
- H3C 交换机基本设置(telnet、SSH、链路聚合)
http://www.h3c.com/cn/d_201710/1038172_30005_0.htm#_Toc493869056 H3C S5560S-SI&S5130S-SI[LI]& ...
- H3C交换机端口链路聚合
H3C交换机端口链路聚合 以太网链路聚合 -- 以太网链路聚合配置命令 -- lacp system-prioritylacp system-priority命令用来配置系统的LACP优先级.undo ...
- HCIA-Datacom 3.3 实验三:以太网链路聚合实验
实验介绍 随着网络规模不断扩大,用户对骨干链路的带宽和可靠性提出越来越高的要求.在传统技术中,常用更换高速率的接口板或更换支持高速率接口板的设备的方式来增加带宽,但这种方案需要付出高额的费用,而且不够 ...
随机推荐
- B. 【例题2】移位包含
解析 判断是否是子串,可以将这个一个环 #include <bits/stdc++.h> using namespace std; int f = 0; string a, b; int ...
- Redis主从&哨兵集群搭建
主从集群 在搭建主从集群前,我们先把Redis安装起来: #解压Redis压缩包 [root@master lf]# tar -zxvf redis-6.2.1.tar.gz -- #安装gcc [r ...
- Dubbo 编解码那些事
一.背景 笔者在一次维护基础公共组件的过程中,不小心修改了类的包路径.糟糕的是,这个类被各业务在facade中进行了引用.传递.幸运的是,同一个类,在提供者和消费者的包路径不一致,没有引起各业务报错. ...
- BUAA_OS lab3 难点梳理
BUAA_OS lab3 难点梳理 实验难点 进程创建 对于初始化部分,首先需要在pmap.c中修改mips_vm_init()函数,为envs开空间,并map到UENVS空间. 其次,模仿page_ ...
- JavaScript深入理解-正则表达式
正则表达式 正则表达式是用于匹配字符串中字符组合的模式.在JavaScript中,正则表达式也是对象.这些模式被用于RegExp的 exec和 text方法,以及String中的 match.matc ...
- 刚转行1年测试新手:学习Python编程经验实战分享
一.开头说两句 作为一名零基础转行刚一年的测试新手来说,深知自己在技术经验方面落后太多,难免会有急于求成的心态,这也就导致自己在学习新知识时似懂非懂,刚开始学完那会还胸有成竹,一段时间之后却又忘的一干 ...
- top:0;bottom:0;left:0;right:0;同时使用的效果
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- vue.js中使用set方法 this.$set
vue教程中有这样一个注意事项: 第一种具体情况如下: 运行结果: 当利用索引改变数组某一项时,页面不会刷新.解决方法如下: 运行结果: 三种方式都可以解决,使用Vue.set.vm.$set()或者 ...
- Windows核心编程 第2 4章 异常处理程序和软件异常
异常处理程序和软件异常 C P U引发的异常,就是所谓的硬件异常(hardware exception).操作系统和应用程序 也可以引发相应的异常,称为软件异常(software exception) ...
- C#-WiFi共享
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...