深度分析Linux网卡绑定的七种模式.docVIP

  • 3
  • 0
  • 约1.02万字
  • 约 9页
  • 2017-05-27 发布于河南
  • 举报
深度分析Linux网卡绑定的七种模式

深度分析Linux下双网卡绑定七种模式 现在一般的企业都会使用双网卡接入,这样既能添加网络带宽,同时又能做相应的冗余,可以说是好处多多。而一般企业都会使用linux操作系统下自带的网卡绑定模式,当然现在网卡产商也会出一些针对windows操作系统网卡管理软件来做网卡绑定(windows操作系统没有网卡绑定功能 需要第三方支持)。进入正题,linux有七种网卡绑定模式:0:round robin Mode=1:active-backup Mode=2:load balancing (xor) Mode=3:fault-tolerance (broadcast) Mode=4:lacp Mode=5:transmit load balancing Mode=6:adaptive load balancing 第一种:bond0:round robin 标准:round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance. 特点:(1)所有链路处于负载均衡状态,轮询方式往每条链路发送报文,基于per packet方式发送。服务上ping 一个相同地址:1.1.1.1 双网卡的两个网卡都有流量发出。负载到两条链路上,说明是基于per packet方式 ,进行轮询发送。(2)这模式的特点增加了带宽,同时支持容错能力,当有链路出问题,会把流量切换到正常的链路上。 实际绑定结果: cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: load balancing (round-robin)  -----RR的模式 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Link Failure Count: 0 Permanent HW addr: 74:ea:3a:6a:54:e3 Slave Interface: eth1 MII Status: up Link Failure Count: 0 应用拓扑:交换机端需要配置聚合口,cisco叫port channel。拓扑图如下: 第二种:bond1:active-backup 标准文档定义:Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond’s MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode. 模式的特点:一个端口处于主状态 ,一个处于从状态,所有流量都在主链路上处理,从不会有任何流量。当主端口down掉时,从端口接手主状态。 实际绑定结果: root@1:~# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: fault-tolerance (active-backup) —–backup模式 Primary Slave: None Currently Active Slave: eth0 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Link Failure Count: 0 Permanent HW addr: 74:ea:3a:6a:54:e3 Slave Interface: eth1 MII St

文档评论(0)

1亿VIP精品文档

相关文档