首页 技术 正文
技术 2022年11月14日
0 收藏 753 点赞 4,074 浏览 872 个字

网卡绑定的作用:1、冗余,防止单点故障

        2、防止传输瓶颈

1.交换机端口绑定:

 system-view
link-aggregation group 1 mode manual 比如把端口1和2进行绑定 interface Ethernet1/0/1 #进入交换机1口
port link-aggregation group 1 #把当前端口加入汇聚组1
interface Ethernet1/0/2 #进入交换机2口
port link-aggregation group 1

2.系统网卡绑定

1.设置Bounding
vi /etc/modules.conf #添加以下内容
alias bond0 bonding
options bonding mode=1 miimon=200 primary=eth2 use_carrier=12. 加载bonding模块
modprobe bonding3.创建/修改bond0 eth0 eth1 配置文件
vi /et/sysconfig/network-ifcfg-“网卡名”DEVICE='bond0'
BOOTPROTO='static'
BROADCAST='x.x.x.x'
IPADDR='x.x.x.x'DEVICE=eth0
BOOTPROTO='static'
STARTMODE='onboot'DEVICE=eth1
BOOTPROTO='static'
STARTMODE='onboot'4.重启所有网卡
rcnetwork restart5.绑定eth0 eth1 到bond0
ifenslave bond0 eth0
ifenslave bond0 eth16.重启后自动加载设置:在/etc/init.d/中添加bonding启动文件
vi /etc/init.d/bonding #添加以下语句
case “$1” in
start)
/sbin/ifenslave bond0 eth0
/sbin/ifenslave bond0 eth1
;;
*)
;;
esac7.把加载bonding模块的脚本加入启动脚本中vi /etc/init.d/boot.local
modprobe bonding
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,497
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,910
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,744
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,498
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,135
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,298