Ubuntu双网卡绑定的设置方法
来源:互联网 发布:股市数据接口 编辑:程序博客网 时间:2024/04/30 14:29
转自:http://www.jbxue.com/LINUXjishu/8814.html
发布:脚本学堂/Ubuntu/Debian 编辑:thatboy 2013-05-23 10:14:00 【大 中 小】
发布:脚本学堂/Ubuntu/Debian 编辑:thatboy 2013-05-23 10:14:00 【大 中 小】
本文介绍下,在ubuntu中绑定双网卡的方法,很多朋友都在寻找这个方法,本文分享一下,有需要的朋友参考下吧。
1,安装bonding需要的软件
sudo apt-get install ifenslave
2,在/etc/modules中加入:
bonding mode=1 miimon=100
3,在/etc/network/interfaces中加入:
auto bond0
iface bond0 inet static
address 10.128.1.12
netmask 255.255.255.0
gateway 10.128.1.200
post-up ifenslave bond0 eth0 eth1
pre-down ifenslave -d bond0 eth0 eth1
#静态路由设定 www.jbxue.com
up route add -host 10.128.0.1 gateway 10.128.1.254
up route add -net 10.128.3.0 mask 255.255.255.0 gateway 10.128.1.254
#重启服务器(加载模块,需重启生效)
iface bond0 inet static
address 10.128.1.12
netmask 255.255.255.0
gateway 10.128.1.200
post-up ifenslave bond0 eth0 eth1
pre-down ifenslave -d bond0 eth0 eth1
#静态路由设定 www.jbxue.com
up route add -host 10.128.0.1 gateway 10.128.1.254
up route add -net 10.128.3.0 mask 255.255.255.0 gateway 10.128.1.254
#重启服务器(加载模块,需重启生效)
说明:
miimon是用来进行链路监测的。比如:miimon=100,那么系统每100ms监测一次链路连接状态,如果有一条线路不通就转入另一条线路;mode的值表示工作模式,他共有0,1,2,3四种模式,常用的为0,1两种。
mode=0表示load balancing (round-robin)为负载均衡方式,两块网卡都工作,带宽加倍。
mode=1表示fault-tolerance (active-backup)提供冗余功能,工作方式是主备的工作方式,默认情况下只有一块网卡工作,另一块做备份。
bonding只能提供链路监测,即从主机到交换机的链路是否接通。
如果只是交换机对外的链路down掉了,而交换机本身并没有故障,那么bonding会认为链路没有问题而继续使用。
本文地址:http://www.jbxue.com/LINUXjishu/8814.html
0 0
- Ubuntu双网卡绑定的设置方法
- Ubuntu双网卡绑定的设置方法
- ubuntu双网卡绑定
- Debian/Ubuntu下的网卡绑定-四网卡双bond
- 双网卡的设置方法
- LINUX双网卡绑定设置。
- ubuntu/centos 上的双网卡设置
- Centos系统的单网卡绑定双ip的设置
- linux 双网卡绑定以及解除绑定双网卡方法
- linux 双网卡绑定以及解除绑定双网卡方法
- 双网卡设置双网关的方法
- ubuntu双网卡绑定一个IP
- linux系统单网卡绑定双IP的方法
- linux系统单网卡绑定双IP的方法
- linux系统单网卡绑定双IP的方法
- 虚拟机双网卡绑定的方法和步骤
- Linux查看双网卡绑定设置
- centos设置双网卡绑定band0
- 检测更新
- 大一学生学习没劲、数学不好、想学游戏,怎么办?
- Triangle
- Nginx初步-3:使用nginx-upload-module显示上传进度
- ubuntu gedit中文乱码的问题解决办法
- Ubuntu双网卡绑定的设置方法
- jquery鼠标停止移动事件
- SNMP--Windows API--SnmpUtilOidAppend
- jQuery中读取json文件示例代码
- 温一盏茶,浸满岁月的暗香
- HOG特征
- Reorder List
- Eclipse配置C/C++开发环境 .
- ECLIPSE 添加插件3种方法 .