Debian/Ubuntu下的网卡绑定-四网卡双bond
1、安装软件
apt-get install ifenslave
2、编辑bonding模块开机自动加载文件
操作系统为Debian Wheezy时,修改/etc/modules文件,添加如下行:
bonding max_bonds=2 mode=6 miimon=100
操作系统为Debian Jessie时,新建/etc/modprobe.d/bonding.conf文件,添加如下行:
alias bond0 bonding
alias bond1 bonding
options bonding max_bonds=2 mode=6 miimon=100
3、修改/etc/network/interfaces文件,具体如下,IP可根据实际配置:
#############################################################
# 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
auto bond0
iface bond0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
post-up ifenslave bond0 eth0 eth2
pre-down ifenslave -d bond0 eth0 eth2
auto bond1
iface bond1 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
post-up ifenslave bond1 eth1 eth3
pre-down ifenslave -d bond1 eth1 eth3
##############################################################
##虚拟网卡绑定模式##
虚拟网卡绑定虚拟网桥配置:
auto br0
iface br0 inet static
bridge_ports bond0
address 10.80.10.100
netmask 255.255.255.0
gateway 10.80.10.1
auto br1
iface br1 inet static
bridge_ports bond1
address 10.80.20.100
netmask 255.255.255.0
gateway 10.80.20.1
auto bond0
iface bond0 inet manual
up ip address add 0/0 dev $IFACE
up ip link set $IFACE up
down ip link set $IFACE down
post-up ifenslave bond0 eth0 eth1
pre-down ifenslave -d bond0 eth0 eth1
auto bond1
iface bond1 inet manual
up ip address add 0/0 dev $IFACE
up ip link set $IFACE up
down ip link set $IFACE down
post-up ifenslave bond0 eth2 eth3
pre-down ifenslave -d bond0 eth1 eth3
##############################################################
##以下几行可不添加,多网卡绑定模式下,物理网卡默认为混杂模式##
auto eth0
iface eth0 inet manual
up ip address add 0/0 dev $IFACE
up ip link set $IFACE up
down ip link set $IFACE down
auto eth1
iface eth1 inet manual
up ip address add 0/0 dev $IFACE
up ip link set $IFACE up
down ip link set $IFACE down
auto eth2
iface eth2 inet manual
up ip address add 0/0 dev $IFACE
up ip link set $IFACE up
down ip link set $IFACE down
auto eth3
iface eth3 inet manual
up ip address add 0/0 dev $IFACE
up ip link set $IFACE up
down ip link set $IFACE down
Debian/Ubuntu下的网卡绑定-四网卡双bond相关推荐
- Linux :debian(ubuntu)下安装和使用haskell
文章目录 Linux :debian(ubuntu)下安装haskell 安装 使用 Linux :debian(ubuntu)下安装haskell 安装 直接使用apt进行安装: sudo apt- ...
- Linux: debian/ubuntu下安装和使用Java 11
Linux: debian/ubuntu下安装和使用Java 11 只需6行命令: su - echo "deb http://ppa.launchpad.net/linuxuprising ...
- Linux: debian/ubuntu下安装和使用Java 8
Linux: debian/ubuntu下安装和使用Java 8 7行命令解决问题: su - echo "deb http://ppa.launchpad.net/webupd8team/ ...
- Linux: debian/ubuntu下安装Neo4j
文章目录 Linux: debian/ubuntu下安装Neo4j Linux: debian/ubuntu下安装Neo4j Neo4j的官方仓库地址:neo4j/neo4j: Graphs for ...
- suse linux双网卡绑定,suse linux双网卡绑定设置详解
<suse linux双网卡绑定设置详解>由会员分享,可在线阅读,更多相关<suse linux双网卡绑定设置详解(2页珍藏版)>请在人人文库网上搜索. 1.suse linu ...
- linux mode4的双网卡绑定,Linux实现双网卡绑定自动化脚本 | 聂扬帆博客
在上一篇写了双网卡绑定和卸载:Linux实现双网卡绑定和卸载 其实认真观察上面的步骤,都是固定的.于是我们就可以写个脚本实现自动化配置#!/bin/bash if [ $# -lt 6 ];then ...
- linux网卡顺序问题,linux网卡绑定及网卡顺序变更测试.docx
Linux网卡顺序变更导致网卡绑定出错及解决办法测试 2012/2/21 描述:linux中新安装网卡会导致原网卡识别顺序紊乱,影响网络及网卡绑定正常工作,此时可以更改/etc/sysconfig/n ...
- ClickHouse系列教程一:Debian/Ubuntu 下ClickHouse的安装和使用
ClickHouse系列教程: ClickHouse系列教程 ClickHouse是一个真正面向列的DBMS.数据按列存储,并在执行数组(向量或列块)期间存储.只要有可能,就会在数组上调度操作,而不是 ...
- centos7 网卡配置vlan_centos 7 下多网卡绑定+ vlan 网卡配置
一.前言 CentOS7之前系统提供给用户的是bonding driver来实现链路聚合,实际上bonding适用于大多数应用.Bonding driver的架构是由内核空间完全控制.管理. Team ...
最新文章
- WSL(windows subsystem for linux)安装错误:安装过程中遇到错误,但可以继续安装。组件: ‘WSL 内核‘ 错误代码: 0x80072f78解决方法
- 47. 全排列 II(回溯算法)
- 产品经理挑战赛,你敢来吗?
- 先序,中序,后序线索二叉树
- ubuntu20下lnmp环境nextcloud安装
- redis之事务主从复制
- 【Antlr】unknown attribute text for rule stat in $stat.text
- php以及Yii里面的常量收集
- mysql事务_MySQL事务提交过程(一)
- android MIT App Inventor 2 Beta 中文资料
- HTTP基本原理(简介)
- python面向对象编程实例:烤地瓜
- c# 问题 vs2017 c# 划前半大括号,下半大扣号不会显示
- vue 临时会话sessionStorage
- 腾讯云服务器基础使用方法
- CRC校验,用于大家参考和日后查阅,内容引用github,非本人创作。
- 边工作边学习的现实选择
- 涉密学位论文不得在联网的计算机上撰写,华南理工大学涉密学位论文管理暂行规定.doc...
- 秋日露营好去处,安化云台山星空露营公园
- 如图一显示了用计算机模拟,(全套打包)北京市各区2017年中考模拟试题汇编·数学...