{"id":795,"date":"2011-06-05T12:17:00","date_gmt":"2011-06-05T04:17:00","guid":{"rendered":"http:\/\/note.systw.net\/note\/?p=795"},"modified":"2023-11-05T12:25:07","modified_gmt":"2023-11-05T04:25:07","slug":"etherchannel-concept","status":"publish","type":"post","link":"https:\/\/systw.net\/note\/archives\/795","title":{"rendered":"EtherChannel concept"},"content":{"rendered":"\n<p>EtherChannel technology<br>scaling link bandwidth by aggregating, or bundling, parallel links<br>2-8 links of Ethernet are bundled as one logical link Etherchannel,respectively.<br>ex;<br>full duplex fast ethernet,\u5c078 port\u5408\u6210etherchannel,max throughput\u53ef\u90541600m<br>ps:<br>the load isn&#8217;t always distributed equally among the individual links<br><\/p>\n\n\n\n<p><strong>EtherChannel also provides redundancy with several bundled physical links<\/strong><br>If one of the links within the bundle fails, traffic sent through that link automatically is moved to an adjacent link. Failover occurs in less than a few milliseconds and is transparent to the end<br>user<\/p>\n\n\n\n<p><strong>A switch also provides some inherent protection against bridging loops with EtherChannels<\/strong><br>When ports are bundled into an EtherChannel, no inbound (received) broadcasts and multicasts are sent back out over any of the remaining ports in the channel. Outbound broadcast and multicast frames are load-balanced like any other: The broadcast or multicast address becomes part of the hashing calculation to choose an outbound channel link<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<\/p>\n\n\n\n<p><strong>methods distributes traffic\u4f7f\u7528hashing algorithm<\/strong><br>1.The hash algorithm computes a binary pattern that selects a link number in the bundle to carry each frame<br>2.binary pattern\u4e00\u822c\u6703\u7531address\u6216port\u6839\u64dahashing\u7522\u751f<br>ex:The algorithm can use source IP address, destination IP address, or a combination of source and destination IP addresses, source and destination MAC addresses, or TCP\/UDP port numbers<\/p>\n\n\n\n<p>\u5728\u5169\u7a2e\u60c5\u6cc1\u4e0b\u7684\u65b9\u6cd5<br>case1:<br>If only one address or port number is hashed:<br>a switch forwards each frame by using one or more low-order bits of the hash value as an index into the bundled links.<br>ex:<br>an EtherChannel consisting of two links bundled together requires a 1-bit index.<br>If the index is 0, link 0 is selected; if the index is 1, link 1 is used.<br>ex:<br>A two-link bundle uses a hash of the last 1 bits<br>A four-link bundle uses a hash of the last 2 bits<br>an eight-link bundle uses a hash of the last 3 bits<br>ex:<br>IP 192.168.1.1 &#8212;&gt; 172.31.67.46.<br>dst ip\u7b2c\u56db\u4f4d\u657846, bits is 00101110<br>a two-link EtherChannel,uses a hash of the last 1 bits(=0),causing Link 0 in the bundle to be used<br>a for-link EtherChannel,uses a hash of the last 2 bits(=10),causing Link 2 in the bundle to be used<br>case2:<br>If two addresses or port numbers are hashed:<br>a switch performs an&nbsp;XOR&nbsp;operation on one or more low-order bits of the addresses or TCP\/UDP port numbers as an index into the bundled links.<br>ex:<br>\u4ee5XOR HASH\u70ba\u4f8b<br>IP 192.168.1.1 &#8212;&gt; 172.31.67.46.<br>src ip\u7b2c\u56db\u4f4d\u65781, bits is 00000001<br>dst ip\u7b2c\u56db\u4f4d\u657846, bits is 00101110<br>a two-link EtherChannel, a 1-bit XOR is performed on the rightmost address bit :<br>1 XOR 0 = 1, causing Link 1 in the bundle to be used<br>A four-link EtherChannel produces a 2-bit XOR:<br>01 XOR 10 = 11,causing Link 3 in the bundle to be used<br>an eight-link EtherChannel requires a 3-bit XOR:<br>001 XOR 110 = 111, where Link 7 in the bundle is selected<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<\/p>\n\n\n\n<p><strong>EtherChannel Negotiation Protocols<\/strong><br>dynamic link configuration<br>To provide automatic EtherChannel configuration and negotiation between switches<br>PAgP(Port Aggregation Protocol),Cisco-proprietary<br>LACP(Aggregation Control Protocol), standards based,IEEE 802.3ad<\/p>\n\n\n\n<p>PAgP and LACP mode<br><strong>on mode<\/strong><br>\u3000All ports channeling<br>\u3000unconditionally bundles the links.<br>\u3000no Negotiation Packets Sent:does not send or receive PAgP or LACP packets.<br>\u3000Therefore,both ends should be set to on mode before the channel can form<br><strong>active mode:desirable(PAgP),active(LACP)<\/strong><br>\u3000a switch actively asks a far end switch to negotiate an EtherChannel<br>\u3000using Negotiation Packets Sent<br>\u3000Therefore, the other end must be set to either desirable or auto mode<br><strong>passive mode:auto(PAgP),passive(LACP)<\/strong><br>\u3000passively listen , Waits to channel until asked(far end asks for participation)<br>\u3000\u3000switch negotiates an EtherChannel only if the far end initiates it<br>\u3000using Negotiation Packets Sent<br>\u3000Therefore,&nbsp;two switches in the auto or passive mode will not form an EtherChannel<br>ps:<br>on mode\u548cpassive mode\u7121\u6cd5\u5f62\u6210etherchannel<\/p>\n\n\n\n<p><br><strong>silent submode<\/strong>(PAgp default)<br>PAgP packets Not necessarily be received if a channel will form<br>allows ports to be added to an EtherChannel even&nbsp;if the other end of the link is silent and never transmits PAgP packets<br>\u7279\u8272:<br>\u540c\u6642\u64c1\u6709desirable\u548cauto modes\u7279\u9ede<br>\u512a\u9ede:<br>This allows a switch to form an EtherChannel with a device (such as a file server or a network analyzer) that doesn&#8217;t participate in PAgP<br>\u904b\u4f5c\u7684\u95dc\u9375:<br>The silent submode listens for any PAgP packets from the far end, looking to negotiate a channel<br>If none is received, silent submode assumes that a channel should be built anyway,so no more PAgP packets are expected from the far end<br>ps:<br>\u5169switch\u540c\u6642\u4f7f\u7528default PAgP auto mode and silent submode.<br>the total delay before data can pass over the link is actually approximately 45 or 50 seconds<br>15sec:PAgP silent mode waiting to hear inbound PAgP messages<br>\u3000Each interface waits to be asked to form a channel<br>\u3000each interface waits and listens before accepting silent channel partners<br>30sec:the STP moving through the listening and learning stages.<br>ps:<br>Even if the two interfaces are using PAgP auto mode, the link will still eventually come up,<br>although not as a channel<br>ps:<br>err-disable:EtherChannel misconfiguration<br>\u5047\u8a2dSwitch A\u8a2d\u5b9aFEC\u70baon mode(\u8a72mode\u4e0d\u6703\u767c\u9001PAgP packet\u548c\u76f8\u9023\u7684Switch B negotiation FEC, \u8a72mode\u5047\u8a2dSwitch B\u5df2\u8a2d\u5b9a\u597dFEC)<br>\u82e5Swtich B\u672a\u8a2d\u5b9aFEC,\u4e14Switch B\u72c0\u614b\u8d85\u904e1\u5206\u937e,\u5247Switch A\u7684STP\u6703\u5224\u65b7\u51fa\u73feloop\uff0c\u56e0\u6b64\u6703\u51fa\u73feerr-disable<br>\u89e3\u6c7a\u8fa6\u6cd5\u5c31\u662f\u914d\u7f6emode desirable non-silent<\/p>\n\n\n\n<p><strong>non-silent submode<\/strong><br>PAgP packets must be received before a channel will form.<br>This requires each port to receive PAgP packets before adding them to a channel<br>\u9069\u7528\u6642\u6a5f:<br>If you expect a PAgP-capable switch to be on the far end, you should add the non-silent keyword to the desirable or auto mode<br>ps:<br>If PAgP isn&#8217;t heard on an active port, the port remains in the up state, but PAgP reports to the\u3000STP that the port is down<br>non-silent\u672c\u7aef\u4f1a\u8981\u6c42\u5468\u671f\u6027\u7684\u63a5\u6536\u5230\u5bf9\u7aef\u7684PagP\u5e27\u540e\u518d\u4f7f\u7aef\u53e3\u53c2\u52a0etherchannel\u7684\u901a\u4fe1\uff0c\u5982\u679c\u6ca1\u6709\u63a5\u6536\u5230\u5bf9\u7aef\u7684PagP\u5e27\u5219\u4f1a\u901a\u77e5STP\u628a\u6b64\u7aef\u53e3\u4e3adown\u7684\u72b6\u6001\uff0c\u5bfc\u81f4\u7aef\u53e3\u65e0\u6cd5\u53c2\u52a0etherchannel\u548cstp\u7684\u8ba1\u7b97\uff01<br>ps:<br>\u5728\u4f7f\u7528\u4e00\u4e2a\u4f1a\u7ee7\u7eed\u4f20\u9001\u6570\u636e(\u5982BPDUs)\u800c\u53c8\u68c0\u6d4b\u4e0d\u5230\u5355\u5411\u8fde\u63a5\u6761\u4ef6\u7684\u8bbe\u5907\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528non-slient\u6a21\u5f0f\u4f7f\u7528\u7aef\u53e3\u4fdd\u6301\u975e\u652f\u6301\u72b6\u6001\uff0c\u76f4\u63a5\u94fe\u8def\u786e\u8ba4\u5904\u4e8e\u53cc\u5411\u8fde\u63a5\u4e3a\u6b62<\/p>\n\n\n\n<p>&#8230;<\/p>\n\n\n\n<p>PAgP\u904b\u4f5c<br><strong>PAgP packets are exchanged between switches over EtherChannel-capable ports<\/strong><br>1. Neighbors are identified and port group capabilities are learned and compared with local switch capabilities<br>2. Ports that have the same neighbor device ID and port group capability are bundled together as a bidirectional , point-to-point EtherChannel link.<br>3. PAgP \u5c01\u5305\u6bcf30sec\u50b3\u9001\u4e00\u6b21<br>4. Dest Multicast MAC\u70ba0010:0CCC:CCCC<br>5. Ether Type:0X0104<\/p>\n\n\n\n<p>PAgP\u5f62\u6210\u689d\u4ef6<br>PAgP forms an EtherChannel only on ports that are configured for&nbsp;<strong>either identical static VLANs or trunking<\/strong><\/p>\n\n\n\n<p>PAgP\u529f\u80fd<br><strong>PAgP dynamically modifies parameters of the EtherChannel<\/strong><br>ex:<br>if the configured VLAN, speed, or duplex mode of a port in an established bundle is changed, PAgP reconfigures that parameter for all ports in the bundle.<\/p>\n\n\n\n<p><br>&#8230;<\/p>\n\n\n\n<p>LACP\u904b\u4f5c<br><strong>1. LACP packets are exchanged between switches over EtherChannel-capable ports<\/strong><br>ps:As with PAgP, neighbors are identified and port group capabilities are learned and compared with local switch capabilities<br><strong>2. LACP also assigns roles to the EtherChannel&#8217;s endpoints.<\/strong><br>\u53ef\u8a2d\u5b9a\u6700\u591a16 potential links,\u4e26\u6839\u64daLACP switch and port roles\u9078\u51fa\u6700\u591a8 active links<br><strong>The other links are placed in a standby state&nbsp;<\/strong>and will be enabled in the EtherChannel if one of the active links goes down<\/p>\n\n\n\n<p>LACP switch and port roles<br><strong>LACP system priority<\/strong><br>The switch with<strong>&nbsp;the lowest system priority is allowed to make decisions<\/strong>&nbsp;about what ports actively are participating in the EtherChannel at a given time<br>ps: system priority=2byte priority+6byte switch MAC address<br><strong>LACP port priority<\/strong><br>Ports are selected and become&nbsp;<strong>active according to their port priority value<\/strong><br>a lower port priority for any interfaces that must be active<br>a higher priority for interfaces that might be held in the standby state<br>ps:port priority=2byte priority+2byte port number<\/p>\n","protected":false},"excerpt":{"rendered":"<p>EtherChannel technologyscaling &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[26],"tags":[],"class_list":["post-795","post","type-post","status-publish","format-standard","hentry","category-osi-layer2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/comments?post=795"}],"version-history":[{"count":0,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/795\/revisions"}],"wp:attachment":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/media?parent=795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/categories?post=795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/tags?post=795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}