{"id":962,"date":"2011-09-07T22:43:00","date_gmt":"2011-09-07T14:43:00","guid":{"rendered":"http:\/\/note.systw.net\/note\/?p=962"},"modified":"2023-11-07T22:46:10","modified_gmt":"2023-11-07T14:46:10","slug":"cisco-etherchannel","status":"publish","type":"post","link":"https:\/\/systw.net\/note\/archives\/962","title":{"rendered":"Cisco Etherchannel"},"content":{"rendered":"\n<p>\u8a2d\u5b9a\u6642\u6ce8\u610f\u4e8b\u9805<br>1. all bundled ports first must&nbsp;belong to the&nbsp;<strong>same VLAN<\/strong>.<br>(If used as a trunk, bundled ports must be in trunking mode, have the same native VLAN, and pass the same set of VLANs.)<br>2. Each of the ports should have the&nbsp;<strong>same speed and duplex<\/strong>&nbsp;settings before being bundled<br>3. Bundled ports also must be configured with identical spanning-tree settings.<br>ps<br>Configuration changes made on the port-channel interface apply to all physical ports assigned to the portchannel interface.<br>ps:<br>support l2 and l3 feature<br>disable &#8220;switchport mode&#8221; if in l3 feature&nbsp;<\/p>\n\n\n\n<p>&#8230;<\/p>\n\n\n\n<p>\u555f\u7528etherchannel<br><strong>(config)# interface range &lt; interface-range&gt;<br>(config-if)#shutdown<\/strong><br><strong>(config-if)# channel-protocol &lt; pagp | lacp&gt;<\/strong><\/p>\n\n\n\n<p>\u8a2d\u5b9apagp channel<br><strong>(config-if)#channel-group &lt; number&gt; mode &lt; on | &lt; auto | desirable&gt; [non-silent] | passive | active&gt;<\/strong><br>\u5404\u53c3\u6578\u8aaa\u660e\u5982\u4e0b<br><strong>&lt; number&gt;<\/strong><br>Each interface included in a single EtherChannel bundle must be assigned to the same unique channel group number (1 to 64)<br><strong>on&nbsp;<\/strong>:unconditionally channel, no PAgP or LACP negotiation&nbsp;<br><strong>&lt; auto | desirable &gt; [non-silent]<\/strong>&nbsp;:for pagp<br>auto:(default)<br>[non-silent]:\u5728desirable\u548cauto modes\u4e0b,PAgP\u9810\u8a2d\u4e0d\u555f\u7528non-slient<br><strong>&lt; passive | active &gt;&nbsp;<\/strong>:for lacp<br>passive:passively listen and wait to be asked&nbsp;<br>active:actively ask&nbsp;<br>ps:<br>Some older models, however, offer only PAgP, so the channel-protocol command is not available<br>ps<br>verify method<br>show interfaces &lt; interface&gt; etherchannel<br>show etherchannel &lt; number&gt; port-channel<br>show etherchannel &lt; number&gt; summary<br>ex:<br>PAgP configuration,&nbsp;<br>to use an EtherChannel load-balancing hash of both source and destination port numbers.&nbsp;<br>A Gigabit EtherChannel will be built from interfaces Gigabit Ethernet 3\/1-4, with the switch actively negotiating a channel.&nbsp;<br>The switch should not wait to listen for silent partners<br>Switch(config)# port-channel load-balance src-dst-port<br>Switch(config)# interface range gig 3\/1-4<br>Switch(config-if)# shutdown&nbsp;<br>Switch(config-if)# channel-protocol pagp<br>Switch(config-if)# channel-group 1 mode desirable non-silent<\/p>\n\n\n\n<p>&#8230;..<\/p>\n\n\n\n<p>[option]<br>LACP priority \u8a2d\u5b9a<\/p>\n\n\n\n<p>\u8a2d\u5b9aswitch lacp system-priority<br><strong>(config)# lacp system-priority &lt; priority&gt;<\/strong><br>\u53c3\u6578\u8aaa\u660e\u5982\u4e0b<br><strong>&lt; priority&gt;<\/strong>&nbsp;(1 to 65,535; default 32,768)<br>ps:both switches will have the same system priority (32,768), and the one with&nbsp;<strong>the lower MAC address<\/strong>&nbsp;will become the decision maker<\/p>\n\n\n\n<p>\u8a2d\u5b9ainterface lacp port-priority<br><strong>(config-if)# lacp port-priority &lt; priority&gt;<\/strong><br>prepares extra standby interfaces to replace failed active ones<br><strong>&lt; priority&gt;<\/strong>&nbsp;(1 to 65,535; default 32,768)<br>ps:all ports default to 32,768 and the lower port numbers (in interface number order) are used to<br>select the active ports.<\/p>\n\n\n\n<p>ex<br>LACP configuration<br>This switch actively should negotiate the channel and should be the decision maker about the<br>channel operation<br>to negotiate a Gigabit EtherChannel using interfaces Gig2\/1-4 and 3\/1-4.<br>Interfaces Gig2\/5-8 and 3\/5-8 are standby states<br>step1<br>Switch1(config)# lacp system-priority 100<br>Switch1(config)# interface range gig 2\/1-4 , gig 3\/1-4<br>Switch1(config-if)# shutdown<br>Switch1(config-if)# channel-protocol lacp<br>Switch1(config-if)# channel-group 1 mode active<br>Switch1(config-if)# lacp port-priority 100<br>Switch1(config-if)# exit<br>Switch1(config)# interface range gig 2\/5-8 , gig 3\/5-8<br>Switch1(config-if)# channel-protocol lacp<br>Switch1(config-if)# channel-group 1 mode active<br>step2<br>Switch2&#8230;\u985e\u4f3cswitch1\u8a2d\u5b9a<br>step3<br>Switch1(config)#int port-channel 1<br>Switch1(config)#no shutdown<br>Switch2(config)#int port-channel 1<br>Switch2(config)#no shutdown&nbsp;<\/p>\n\n\n\n<p>&#8230;<\/p>\n\n\n\n<p>ps:<br><strong>\u8a2d\u5b9aetherchannel on trunk<\/strong><br>ex:<br>step1<br>switch1\u8a2d\u5b9a\u5982\u4e0b<br>switch1(config)# interface range fa0\/2-3<br>swtich1(config-if)# shutdown&nbsp;<br>switch1(config-if)# channel-group 1 mode on<br>switch1(config-if)# interface port-channel 1<br>switch1(config-if)# switchport trunk encapsulation dot1q<br>switch1(config-if)# switchport mode trunk<br>switch2\u8a2d\u5b9a\u5982\u4e0b<br>switch2(config)# interface range fa0\/2-3<br>switch2(config-if)# shutdown&nbsp;<br>switch2(config-if)# channel-group 1 mode on<br>switch2(config-if)# interface port-channel 1<br>switch2(config-if)# switchport trunk encapsulation dot1q<br>switch2(config-if)# switchport mode trunk<br>step2<br>switch1(config)#int port-channel 1<br>switch1(config-if)no shutdown<br>switch2(config)#int port-channel 1<br>switch2(config-if)no shutdown<br>ps:<br>#show running-config \u70ba\u4f8b,\u986f\u793a\u7d44\u614b\u5927\u81f4\u5982\u4e0b<br>[omit]<br>interface Port-channel1<br>switchport mode trunk<br>switchport trunk encapsulation dot1q<br>no ip address<br>!<br>interface FastEthernet0\/2<br>switchport mode trunk<br>switchport trunk encapsulation dot1q<br>no ip address<br>channel-group 1 mode on<br>!<br>interface FastEthernet0\/3<br>switchport mode trunk<br>switchport trunk encapsulation dot1q<br>no ip address<br>channel-group 1 mode on<br>[omit]<\/p>\n\n\n\n<p><br><strong>L3 EtherChannel\u8a2d\u5b9a<\/strong><br>1.<br>Creates a port-channel interface<br><strong>Switch(config)# interface port-channel &lt; number&gt;<\/strong><br>2.<br>Specifies L3 and assigns an IP address and subnet mask to the EtherChannel<br><strong>Switch(config-if)# no switchport<\/strong><br>Switch(config-if)# ip address &lt; ip &gt; &lt; mask&gt;<br>3.<br>Configures the interface as L3 and specifies the port channel and the PAgP mode<br>Switch(config-if)# interface range &lt; interface range&gt;<br><strong>Switch(config-if-range)# no switchport<br>Switch(config-if-range)# channel-group &lt; number &gt; mode &lt; mode&gt;<\/strong><br>ex:<br>Switch(config)# interface port-channel 5<br>Switch(config-if)# no switchport<br>Switch(config-if)# ip address 172.10.20.10 255.255.255.0<br>Switch(config-if)# interface range gigabitethernet0\/1 -2&nbsp;<br>Switch(config-if-range)# no switchport&nbsp;<br>Switch(config-if-range)# channel-group 5 mode desirable<br>Switch(config-if-range)# end<\/p>\n\n\n\n<p>&nbsp;&#8230;..<\/p>\n\n\n\n<p><br>\u5b9a\u7fa9loadbalance\u7684\u65b9\u6cd5<br><strong>(config)# port-channel load-balance &lt; method&gt;<\/strong><br>method\u6709\u4ee5\u4e0b\u53ef\u9078,\u683c\u5f0f\u70ba<br>method: hash input ,hash operation ,switch model<br>src-ip: Source IP address ,bits ,All models<br>dst-ip: Destination IP address ,bits ,All models<br>src-dst-ip: Source and destination IP address ,XOR ,All models (default)<br>src-mac: Source MAC address ,bits ,All models<br>dst-mac: Destination MAC address ,bits ,All models<br>src-dst-mac: Source and destination MAC ,XOR ,All models<br>src-port: Source port number ,bits ,6500\/4500<br>dst-port: Destination port number ,bits ,6500\/4500<br>src-dst-port: Source and destination port ,XOR ,6500\/4500<br>ps:<br>The default for the Catalyst 2970 and 3560 is src-mac for Layer 2 switching<br>ps:<br>\u82e5\u8981\u5e73\u5747\u5206\u6524\u6d41\u91cf,src-port\u5728\u6bcf\u6b21\u50b3\u8f38\u90fd\u6703\u4e0d\u4e00\u6a23,\u53ef\u4ee5\u4f7f\u7528\u6b64method<\/p>\n\n\n\n<p>\u986f\u793aetherchannel\u72c0\u614b<br><strong>#show etherchannel port-channel<\/strong><br>include:<br>Load-balancing port index used by hashing algorithm<br>Time stamps of EtherChannel changes<\/p>\n\n\n\n<p>show Load-balancing hashing algorithm<br><strong>#show etherchannel load-balance<\/strong><br>the switches on either end of an EtherChannel can have different load-balancing methods.<br>The only drawback to this is that the load balancing will be asymmetric in the two directions across the channel.<br>ps:<br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Source XOR Destination IP address<\/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;..<\/p>\n\n\n\n<p><strong>find EtherChannel problems way<\/strong><br>the whole concept is based on consistent configurations on both ends of the channel<br>ex:Each must have the same switch mode (access or trunk),native VLAN, trunked VLANs, port speed, port duplex mode, and so on<\/p>\n\n\n\n<p><br>show EtherChannel neighbors on each port<br><strong>#show &lt; pagp | lacp&gt; neighbor<\/strong><\/p>\n\n\n\n<p>show LACP system ID<br><strong>#show lacp sys-id<\/strong><\/p>\n\n\n\n<p>&#8230;<\/p>\n\n\n\n<p>verify the EtherChannel state<br><strong># show etherchannel brief<\/strong><br><br>Detailed status about each EtherChannel component<br><strong>#show etherchannel detail<\/strong><\/p>\n\n\n\n<p>verify the EtherChannel state<br><strong># show etherchannel summary<\/strong><br>Flags:<br>D &#8211; down P &#8211; in port-channel<br>\u3000I &#8211; stand-alone s &#8211; suspended<br>\u3000H &#8211; Hot-standby (LACP only)<br>\u3000R &#8211; Layer3 S &#8211; Layer2<br>\u3000u &#8211; unsuitable for bundling<br>\u3000U &#8211; in use f &#8211; failed to allocate aggregator<br>\u3000d &#8211; default port<br>Number of channel-groups in use: 1<br>Number of aggregators: 1<br>Group,Port-channel,Protocol ,Ports<br>&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br>1\u3000\u3000,Po1(SU)\u3000\u3000,PAgP\u3000,Fa0\/41(P) Fa0\/42(P) Fa0\/43 Fa0\/44(P) Fa0\/45(P)<br>\u8aaa\u660e\u5982\u4e0b<br>flags(SU):\u6b63\u5e38 &nbsp;<br>flags(D):\u8655\u65bcdown\u7684\u72c0\u614b&nbsp;<br>flags(P):most of the channel ports, indicating that they are active in the port-channel<br>flags(I):If a port is connected but not bundled in the channel,it will have an independent<\/p>\n\n\n\n<p>verify the channel negotiation mode<br><strong>#show etherchannel port<\/strong><br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Channel-group listing:<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br>Group: 1<br>&#8212;&#8212;&#8212;-<br>Ports in the group:<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br>Port: Fa0\/41<br>&#8212;&#8212;&#8212;&#8212;<br>Port state = Up Mstr In-Bndl<br>Channel group = 1\u3000\u3000<strong>Mode = Desirable-Sl<\/strong>\u3000\u3000Gcchange = 0<br>Port-channel = Po1\u3000GC = 0x00010001\u3000\u3000Pseudo port-channel = Po1<br>Port index = 0\u3000\u3000Load = 0x00\u3000\u3000<strong>Protocol = PAgP<\/strong><br>Flags:<br>\u3000S &#8211; Device is sending Slow hello. C &#8211; Device is in Consistent state.<br>A &#8211; Device is in Auto mode. P &#8211; Device learns on physical port.<br>d &#8211; PAgP is down.<br>Timers:<br>\u3000H &#8211; Hello timer is running. Q &#8211; Quit timer is running.<br>S &#8211; Switching timer is running. I &#8211; Interface timer is running.<br>Local information:<br>\u3000Port,Flags,State,Timers,HelloInterval,PartnerCount,PAgPPriority,LearningMethod,GroupIfindex<br>\u3000Fa0\/41,SC,U6\/S7,H\u3000\u3000,30s\u3000\u3000\u3000\u3000,1\u3000\u3000\u3000\u3000\u3000,128\u3000\u3000\u3000\u3000,Any\u3000\u3000\u3000\u3000\u3000,55<br>Partner&#8217;s information:<br>\u3000Port,Name,PartnerDeviceID,PartnerPort,PartnerAge,PartnerFlags,GroupCap.<br>\u3000Fa0\/41,FarEnd,00d0.5849.4100,3\/1\u3000\u3000,19s\u3000\u3000\u3000\u3000,SAC\u3000\u3000\u3000,11<br>Age of the port in the current state: 00d:08h:05m:28s<br>\u8aaa\u660e:<br>mode=Desirable-SI\u8868\u793a\u8a72\u4ecb\u9762\u4f7f\u7528desirable silent mode<\/p>\n\n\n\n<p>&#8230;<\/p>\n\n\n\n<p>display a port&#8217;s configuration<br><strong>#show running-config [interface &lt; interface &gt;| port-channel &lt; number&gt; ]<\/strong><br>ps:<br>Switch#show run interface port-channel 1 \u70ba\u4f8b,\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>interface Port-channel1<br>switchport mode dynamic desirable<br>ps:<br>Switch#show run interface gig 0\/9 \u70ba\u4f8b,\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>interface GigabitEthernet 0\/9<br>switchport mode dynamic desirable<br>channel-group 2 mode desirable<br>channel-protocol pagp<\/p>\n\n\n\n<p><br>shows all active EtherChannel parameters for a single port<br><strong>#show interface &lt; interface &gt; etherchannel<\/strong><br>ps:<br>Switch#show interfaces gi0\/9 etherchannel \u70ba\u4f8b,\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Port state =&nbsp;<strong>Up Mstr In-Bndl<\/strong><br><strong>Channel group = 1<\/strong>&nbsp;Mode =&nbsp;<strong>Desirable-Sl<\/strong>&nbsp;Gcchange = 0<br><strong>Port-channel = Po2<\/strong>&nbsp;GC = 0x00020001 Pseudo port-channel = Po1<br>Port index = 0 Load = 0x00<br>Flags:&nbsp;<strong>S &#8211; Device is sending Slow hello. C &#8211; Device is in Consistent state.<\/strong><br>A &#8211; Device is in Auto mode. P &#8211; Device learns on physical port.<br>d &#8211; PAgP is down.<br><strong>Timers: H &#8211; Hello timer is running<\/strong>. Q &#8211; Quit timer is running.<br>S &#8211; Switching timer is running. I &#8211; Interface timer is running.<br>Local information:<br>Hello Partner PAgP Learning Group<br>Port Flags State Timers Interval Count Priority Method Ifindex<br>Gi0\/9&nbsp;<strong>SC<\/strong>&nbsp;U6\/S7&nbsp;<strong>H<\/strong>&nbsp;<strong>30s<\/strong>&nbsp;1 128 Any 15<br>Partner&#8217;s information:<br>Partner Partner Partner Partner Group<br>Port Name Device ID Port Age Flags Cap.<br>Gi0\/9 DSW122&nbsp;<strong>0005.313e.4780<\/strong>&nbsp;Gi0\/9 18s SC 20001<br>Age of the port in the current state: 00d:20h:00m:49s<\/p>\n\n\n\n<p>&#8230;<\/p>\n\n\n\n<p>ps:<br>Some messages look like errors but are part of the normal EtherChannel process<br>ex:<br>new port is configured as a member of an existing EtherChannel<br>message as follows:<br>4d00h: %EC-5-L3DONTBNDL2: FastEthernet0\/2 suspended: incompatible partner port with FastEthernet0\/1<br>description as follows:<br>When the port first is added to the EtherChannel, it is incompatible because the STP runs on the channel and the new port. After STP takes the new port through its progression of states, the port is automatically added into the EtherChannel<\/p>\n\n\n\n<p>ps:<br>Fast Ethernet0\/3 has a different duplex mode than the other ports in the EtherChannel<br>message as follows:<br>4d00h: %EC-5-CANNOT_BUNDLE2: FastEthernet0\/3 is not compatible with FastEthernet0\/1 and will be suspended (duplex of Fa0\/3 is full, Fa0\/1 is half)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8a2d\u5b9a\u6642\u6ce8\u610f\u4e8b\u98051. all bundled ports fi &#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":[34],"tags":[],"class_list":["post-962","post","type-post","status-publish","format-standard","hentry","category-cisco-layer2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/962","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=962"}],"version-history":[{"count":0,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/962\/revisions"}],"wp:attachment":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/media?parent=962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/categories?post=962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/tags?post=962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}