个人工具
登录
查看“UbuntuHelp:LinkAggregation”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:LinkAggregation”的源代码
来自Ubuntu中文
←
UbuntuHelp:LinkAggregation
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/LinkAggregation}} {{Languages|UbuntuHelp:LinkAggregation}} Link Aggregation can also be known as: * "NIC Bonding" (Mainly Linux world) * "NIC Teaming" (Mainly Windows world) * "Port Trunking" (Mainly hardware world) * "Etherchannel" (Mainly AIX and HP-UX) * "Ether bonding" The advantages of aggregation are that the virtual NIC interface created by Link Aggregation provides increased bandwidth by merging the bandwidth of the individual ports/NICs It's primary use _is_ to increase a network link speed beyond the limits of any one single cable or port. Although It can also be used for failover, if one link dies all traffic to and from the machine should be routed to the remaining links. Ok, so thats a brief explanation of the technology. So how do I put it into practice with Dapper (Edubuntu Dapper). === Requirements === At least two NIC's and preferably a switch capable of IEEE 802.3ad Standard Dynamic Link Aggregation (not required if using adaptive load balancing or active/backup). === Bonding Modes === You can bond your interfaces in a variety of modes, depending on your hardware capabilities, as follows: ==== mode=0 (balance-rr) ==== Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance. ==== mode=1 (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. ==== mode=2 (balance-xor) ==== XOR policy: Transmit based on [(source MAC address XOR'd with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance. ==== mode=3 (broadcast) ==== Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance. ==== mode=4 (802.3ad) ==== IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification. Pre-requisites: 1. Ethtool support in the base drivers for retrieving the speed and duplex of each slave. 2. A switch that supports IEEE 802.3ad Dynamic link aggregation. Most switches will require some type of configuration to enable 802.3ad mode. ==== mode=5 (balance-tlb) ==== Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave. Prerequisite: Ethtool support in the base drivers for retrieving the speed of each slave. ==== mode=6 (balance-alb) ==== Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server. === Installing ifenslave === ''ifenslave'' is a tool to attach and detach slave network interfaces to a bonding device. A bonding device will act like a normal Ethernet network device to the kernel, but will send out the packets via the slave devices using a variety of techniques. This allows for simple load-balancing, identical to "channel bonding" or "trunking" techniques used in switches. <pre><nowiki> sudo apt-get install ifenslave </nowiki></pre> === Loading bonding driver at boot === To load the bonding module at boot just add the style of bonding you want to use into your <code><nowiki>/etc/modules</nowiki></code> file <pre><nowiki> sudo sh -c "echo bonding mode=1 miimon=100 >> /etc/modules" </nowiki></pre> where 1 in this case represents active-backup (most reliable method & will work with all switches, fastest supporting all switches is 6, fastest with 802.3ad supporting switch is 4) === Adjusting /etc/network/interfaces === Firstly [[UbuntuHelp:NetworkManager|NetworkManager]] will play havoc with any static configurations you setup, and bonding is generally for server environments where you have predefined network settings so to make things easy we just get rid of it! <pre><nowiki> sudo apt-get remove network-manager </nowiki></pre> Now load up <code><nowiki>/etc/network/interfaces</nowiki></code> in your favourite editor (try <code><nowiki>vimtutor</nowiki></code> at a prompt to get used to vim) <pre><nowiki> sudo vim /etc/network/interfaces # 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.1.1 netmask 255.255.255.0 gateway 192.168.1.254 dns-nameservers 192.168.1.254 post-up ifenslave bond0 eth0 eth1 pre-down ifenslave -d bond0 eth0 eth1 </nowiki></pre> In this case your bonded ip address will be 192.168.1.1 and your gateway (router) & dns server are at the same address (192.168.1.254) === Loading Modules & Restarting Networking === Make sure you use the same mode you selected above in replacement of 1 <pre><nowiki> sudo modprobe bonding mode=1 miimon=100 sudo /etc/init.d/networking restart </nowiki></pre> == Finish == OK, you now have to configure your switch/network equipment to accept the newly created aggregated link. Please consult your switch manufacturers manual on how to do this. Congratulations you should now be up and running with an aggregated link. == Links == [http://www.howtoforge.com/nic_bonding] [http://www.linuxhorizon.ro/bonding.html] [http://en.wikipedia.org/wiki/Link_aggregation] [[UbuntuHelp:UbuntuBonding|UbuntuBonding]] ---- [[category:CategoryNetworking]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:LinkAggregation
。