欢迎来到天天文库
浏览记录
ID:47403030
大小:119.50 KB
页数:9页
时间:2019-07-04
《Linux下双网卡绑定七种模式》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、深度分析Linux下双网卡绑定七种模式现在一般的企业都会使用双网卡接入,这样既能添加网络带宽,同时又能做相应的冗余,可以说是好处多多。而一般企业都会使用linux操作系统下自带的网卡绑定模式,当然现在网卡产商也会出一些针对windows操作系统网卡管理软件来做网卡绑定(windows操作系统没有网卡绑定功能需要第三方支持)。进入正题,linux有七种网卡绑定模式:0. roundrobin,1.active-backup,2.loadbalancing(xor), 3.fault-tolerance(broadcast),4.lacp, 5.transm
2、itloadbalancing,6.adaptiveloadbalancing。第一种:bond0:roundrobin标准:round-robinpolicy:Transmitpacketsinsequentialorderfromthefirstavailableslavethroughthelast.Thismodeprovidesloadbalancingandfaulttolerance.特点:(1)所有链路处于负载均衡状态,轮询方式往每条链路发送报文,基于perpacket方式发送。服务上ping一个相同地址:1.1.1.1双网卡的两个网卡都
3、有流量发出。负载到两条链路上,说明是基于perpacket方式,进行轮询发送。(2)这模式的特点增加了带宽,同时支持容错能力,当有链路出问题,会把流量切换到正常的链路上。实际绑定结果:cat/proc/net/bonding/bond0EthernetChannelBondingDriver:v3.6.0(September26,2009)BondingMode:loadbalancing(round-robin) -----RR的模式MIIStatus:upMIIPollingInterval(ms):100UpDelay(ms):0DownDela
4、y(ms):0SlaveInterface:eth0MIIStatus:upLinkFailureCount:0PermanentHWaddr:74:ea:3a:6a:54:e3SlaveInterface:eth1MIIStatus:upLinkFailureCount:0应用拓扑:交换机端需要配置聚合口,cisco叫portchannel。拓扑图如下:第二种:bond1:active-backup标准文档定义:Active-backuppolicy:Onlyoneslaveinthebondisactive.Adifferentslavebecome
5、sactiveif,andonlyif,theactiveslavefails.Thebond’sMACaddressisexternallyvisibleononlyoneport(networkadapter)toavoidconfusingtheswitch.Thismodeprovidesfaulttolerance.Theprimaryoptionaffectsthebehaviorofthismode.模式的特点:一个端口处于主状态,一个处于从状态,所有流量都在主链路上处理,从不会有任何流量。当主端口down掉时,从端口接手主状态。实际绑定结
6、果:root@1:~#cat/proc/net/bonding/bond0EthernetChannelBondingDriver:v3.6.0(September26,2009)BondingMode:fault-tolerance(active-backup)—–backup模式PrimarySlave:NoneCurrentlyActiveSlave:eth0MIIStatus:upMIIPollingInterval(ms):100UpDelay(ms):0DownDelay(ms):0SlaveInterface:eth0MIIStatus:u
7、pLinkFailureCount:0PermanentHWaddr:74:ea:3a:6a:54:e3SlaveInterface:eth1MIIStatus:upLinkFailureCount:0PermanentHWaddr:d8:5d:4c:71:f9:94应用拓扑:这种模式接入不需要交换机端支持,随便怎么接入都行。第三种:bond2:loadbalancing(xor)标准文档描述:XORpolicy:Transmitbasedon[(sourceMACaddressXOR'dwithdestinationMACaddress)modulos
8、lavecount].Thisselectsthesameslaveforeac
此文档下载收益归作者所有