本檔案將提供在Catalyst 3524XL和Catalyst 2950交換器之間的IEEE 802.1Q中繼和EtherChannel上的組態範例。每個命令的結果在執行時顯示。任何Catalyst第2層固定組態交換器(包括2900XL/3500XL、2940、2950/2955和2970)都可以在本檔案所介紹的案例中使用,以取得相同的結果。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
在本文檔中,每台交換機的四個快速乙太網埠已設定為802.1Q中繼並捆綁到快速EtherChannel(FEC)中。
若要建立本檔案中的範例,我們已在實驗室環境中使用下列已清除組態交換器:
執行Cisco IOS®軟體版本12.0(5.2)XU的Catalyst 3524XL交換器
執行Cisco IOS軟體版本12.1(6)EA2a的Catalyst 2950交換器
無需在這些交換機上使用連續埠來形成FEC。
使用執行Cisco IOS軟體版本11.2(8)SA1或11.2(8)SA2的Catalyst 2900XL,每台交換器允許四個FEC(連線埠群組),且每個群組的連線埠數不受限制。通道中鏈路間的負載均衡始終基於目標MAC地址。屬於同一portchannel的所有埠都必須以相同方式配置。它們需要承載相同的VLAN集,並且所有交換機都必須具有中繼或非中繼作為運行中繼狀態。不支援交換式連線埠分析器(SPAN)和連線埠安全功能。
在執行Cisco IOS軟體版本11.2(8)SA3或更新版本的Catalyst 2900XL、執行Cisco IOS軟體版本11.2(8)SA6或更新版本的Catalyst 3500XL和Catalyst 2950/2955上,通道中連結間的負載均衡可設定為基於來源或目的地MAC位址,且來源為預設值。基於源的轉發允許一個FEC(埠組)中最多八個埠。 基於目標的轉發允許每個埠組有無限的埠。每台交換機最多可以配置12個FEC埠組,並且可以混合使用基於源/目標的組。屬於同一portchannel的所有埠都必須以相同方式配置。它們需要承載相同的VLAN集,並且所有交換機都必須具有中繼或非中繼作為運行中繼狀態。不支援SPAN和埠安全。
Catalyst 2940和2950/2955交換器僅支援802.1Q中繼,不支援交換器間連結通訊協定(ISL)中繼。Catalyst 2970支援802.1Q和ISL中繼協定。
有建立中繼的方法。如果埠可以成為中繼,它還可以自動中繼,在某些情況下,甚至可以協商要在埠上使用的中繼型別。這種與另一裝置協商中繼方法的能力稱為動態中繼協定(DTP)。
註:Catalyst 2900XL/3500XL交換機不支援DTP。Catalyst 2950/2955交換器使用Cisco IOS軟體版本12.1(6)EA2或更新版本支援動態中繼的DTP。Catalyst 2940和2970在所有Cisco IOS軟體版本中支援DTP。
埠聚合協定(PAgP)有助於自動建立FECl鏈路。在支援FECl的埠之間傳送PAgP資料包以協商通道的形成。PAgP中特意引入了一些限制。限制如下:
PAgP不會在針對動態VLAN配置的埠上形成捆綁包。PAgP要求通道中的所有埠屬於同一個VLAN或配置為中繼埠。如果套件組合已存在,且修改了連線埠的VLAN,則套件組合中的所有連線埠都會修改為與該VLAN相符。
PAgP不對以不同速度或埠雙工運行的埠進行分組。如果存在捆綁包時更改了速度和雙工,PAgP將更改捆綁包中所有埠的埠速度和雙工。
PAgP模式為off、auto、desirable和on。只有auto-desirable、desirable-desirable和on-on組合才允許形成通道。
PAgP模式解釋如下。
於:PAgP將不會運行。頻道被迫上來。
off:PAgP將不會運行。通道被迫保持關閉。
自動:PAgP被動運行。需要形成通道;但是,它不會啟動。
desirable:PAgP正在積極運行。希望並啟動通道的形成。
只有auto-desirable、desirable-desirable和on-on的組合才能形成通道。如果通道一端的裝置(例如路由器)不支援PAgP,則另一端的裝置必須將PAgP設定為on。
註:Catalyst 2900XL/3500XL交換機不支援PAgP。Catalyst 2950/2955交換器支援PagP,以便與Cisco IOS軟體版本12.1(6)EA2或更新版本進行通道交涉;Cisco IOS軟體版本12.0僅支援靜態配置。Catalyst 2940和2970在所有Cisco IOS軟體版本中支援PAgP。
鏈路聚合控制協定(LACP)中繼支援四種操作模式:
於:強制形成鏈路聚合而不進行任何LACP協商。換句話說,交換機既不傳送LACP資料包,也不處理任何入站LACP資料包。這類似於PAgP的on狀態。
Off:未形成鏈路聚合。我們不傳送或理解LACP資料包。這類似於PAgP的off狀態。
被動:交換器不會啟動通道,但會瞭解傳入LACP封包。對等體(處於活動狀態)發起協商(當它發出一個LACP資料包時),我們接收並應答該資料包,最終與對等體形成聚合通道。這類似於PAgP中的自動模式。
活動:我們可以形成聚合鏈路並啟動協商。如果另一端以LACP主動或被動模式運行,則會形成鏈路聚合。這類似於PAgP的desirable模式。
注意:預設情況下,配置LACP通道時,LACP通道模式為被動模式。
註:Catalyst 2900XL/3500XL交換機不支援LACP。Catalyst 2950/2955交換器支援LACP,以便與Cisco IOS軟體版本12.1(6)EA2或更新版本進行通道交涉。Cisco IOS軟體版本12.0僅支援靜態配置。在所有Cisco IOS軟體版本中,Catalyst 2940和2970都支援LACP。
本文檔使用下圖所示的網路設定。
本文檔使用如下所示的配置。
Catalyst 3524 XL |
---|
Comments between the outputs are added in blue italics for explanation. Flush#show run Building configuration... Current configuration: ! version 12.0 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Flush ! ! ip subnet-zero ! !--- Since the 2900XL/3500XL switches do not support !--- dynamic channel negotiation, verify the !--- configuration before enabling secondary links. !--- You may see a loop before the configuration is finished if !--- both ports are connected while doing changes. !--- Shut down the ports involved in the channel first. When the !--- configuration is complete, enable them back. !--- An example of a brief loop is shown below. !--- flush# !--- 6d12h: %LINK-4-ERROR: FastEthernet0/1 is experiencing errors. !--- 6d12h: %RTD-1-ADDR_FLAP: FastEthernet0/3 relearning five addresses per minute. !--- 6d12h: %LINK-4-ERROR: FastEthernet0/1 is experiencing errors. !--- 6d12h: %RTD-1-ADDR_FLAP: FastEthernet0/24 relearning eight addresses per minute. !--- 6d12h: %LINK-4-ERROR: FastEthernet0/1 is experiencing errors. ! ! interface FastEthernet0/1 port group 1 !--- Assigned port to port channel 1. switchport trunk encapsulation dot1q !--- Configured the port to use the trunking encapsulation dot1Q. switchport mode trunk !--- Configured port to be in trunking mode. ! interface FastEthernet0/2 port group 1 !--- Assigned port to port channel 1. switchport trunk encapsulation dot1q switchport mode trunk ! interface FastEthernet0/3 port group 1 !--- Assigned port to port channel 1. switchport trunk encapsulation dot1q switchport mode trunk ! interface FastEthernet0/4 port group 1 !--- Assigned port to port channel 1. switchport trunk encapsulation dot1q switchport mode trunk ......(output Suppressed) ! interface VLAN1 ip address 1.1.1.2 255.255.255.0 no ip directed-broadcast no ip route-cache ! line con 0 transport input none stopbits 1 line vty 0 4 login line vty 5 15 login |
Catalyst 2950 |
---|
Comments between the outputs are added in blue italics for explanation. Hanka>en Hanka#show run Building configuration... Current configuration : 1298 bytes ! version 12.1 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Hanka ! ! ip subnet-zero ! interface Port-channel1 flowcontrol send off switchport mode trunk !--- Since the 2900XL/3500XL series switches do not !--- support dynamic channel negotiation, !--- verify the configuration before !--- enabling secondary links. !--- You may see a loop before the configuration is !--- finished if both ports are connected while doing changes. !--- We suggest shutting down the ports involved in the channel !--- first, and when the configuration is complete, !--- enabling them back. !--- An example of a brief loop is shown below. !--- flush# !--- 6d12h: %LINK-4-ERROR: FastEthernet0/1 is experiencing errors. !--- 6d12h: %RTD-1-ADDR_FLAP: FastEthernet0/3 relearning five addresses per minute. !--- 6d12h: %LINK-4-ERROR: FastEthernet0/1 is experiencing errors. !--- 6d12h: %RTD-1-ADDR_FLAP: FastEthernet0/24 relearning eight addresses per minute. !--- 6d12h: %LINK-4-ERROR: FastEthernet0/1 is experiencing errors. ! interface FastEthernet0/1 switchport mode trunk !--- Configured port to be in trunking mode. channel-group 1 mode on !--- Assigned port to port channel 1. !--- Catalyst 2950/2955 switches only support 802.1Q encapsulation, !--- which is configured automatically !--- when trunking is enabled on the interface by !--- issuing the switchport mode trunk command. !--- Note: The channel-group command is introduced in !--- Cisco IOS Software Release 12.1. Cisco IOS Software Release 12.0 has !--- the port group command to configure channeling. ! interface FastEthernet0/2 switchport mode trunk channel-group 1 mode on !--- Assigned port to port channel 1. ! interface FastEthernet0/3 switchport mode trunk channel-group 1 mode on !--- Assigned port to port channel 1. ! interface FastEthernet0/4 switchport mode trunk channel-group 1 mode on !--- Assigned port to port channel 1. ......(output Suppressed) interface Vlan1 ip address 1.1.1.1 255.255.255.0 no ip route-cache ! ip http server ! line con 0 transport input none line vty 0 4 login line vty 5 15 login ! end |
本節提供的資訊可用於確認您的組態是否正常運作。
show CDP neighbor Flush#show cdp neighbor Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater Device ID Local Intrfce Holdtme Capability Platform Port ID Hanka Fas 0/4 173 S I WS-C2950T-Fas 0/4 Hanka Fas 0/3 173 S I WS-C2950T-Fas 0/3 Hanka Fas 0/2 173 S I WS-C2950T-Fas 0/2 Hanka Fas 0/1 173 S I WS-C2950T-Fas 0/1 Flush# show port group Flush>en Flush#show port group Group Interface Transmit Distribution ----- --------------------- --------------------- 1 FastEthernet0/1 source address 1 FastEthernet0/2 source address 1 FastEthernet0/3 source address 1 FastEthernet0/4 source address show spanning-tree Flush#show spanning-tree Spanning tree 1 is executing the IEEE compatible Spanning Tree protocol Bridge Identifier has priority 32768, address 0001.4264.82c0 Configured hello time 2, max age 20, forward delay 15 We are the root of the spanning tree Topology change flag not set, detected flag not set, changes 2 Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Timers: hello 0, topology change 0, notification 0 Interface Fa0/1 (port 1) in Spanning tree 1 is FORWARDING Port path cost 8, Port priority 128 Designated root has priority 32768, address 0001.4264.82c0 Designated bridge has priority 32768, address 0001.4264.82c0 Designated port is 1, path cost 0 Timers: message age 0, forward delay 0, hold 0 BPDU: sent 41527, received 231 Interface Fa0/5 (port 17) in Spanning tree 1 is down Port path cost 100, Port priority 128
註:介面Fa0/2 — 輸出中不顯示介面Fa0/4,因為它們與埠通道中的Fa0/1捆綁在一起。
show interface x/x switchport Flush#show interface fast 0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: Disabled Access Mode VLAN: 0 ((Inactive)) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Trunking VLANs Active: 1,2 Pruning VLANs Enabled: 2-1001 Priority for untagged frames: 0 Override vlan tag priority: FALSE Voice VLAN: none Appliance trust: none Flush#show interface fast 0/2 switchport Name: Fa0/2 Switchport: Enabled Administrative mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: Disabled Access Mode VLAN: 0 ((Inactive)) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Trunking VLANs Active: 1,2 Pruning VLANs Enabled: 2-1001 Priority for untagged frames: 0 Override vlan tag priority: FALSE Voice VLAN: none Appliance trust: none Flush#
show CDP neighbor Hanka#show cdp neighbor Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater Device ID Local Intrfce Holdtme Capability Platform Port ID Flush Fas 0/4 127 T S WS-C3524-XFas 0/4 Flush Fas 0/3 127 T S WS-C3524-XFas 0/3 Flush Fas 0/2 127 T S WS-C3524-XFas 0/2 Flush Fas 0/1 127 T S WS-C3524-XFas 0/1 Hanka# show etherchannel
注意:此命令最初是在Cisco IOS軟體版本12.1(6)EA2中引入的。它取代了show port group命令。
Hanka#show etherchannel port-channel Channel-group listing: ----------------------- Group: 1 ---------- Port-channels in the group: ---------------------- Port-channel: Po1 ------------ Age of the Port-channel = 00d:23h:06m:07s Logical slot/port = 1/0 Number of ports = 4 GC = 0x00010001 HotStandBy port = null Port state = Port-channel Ag-Inuse Ports in the Port-channel: Index Load Port EC state ------+------+------+------------ 0 00 Fa0/1 on 0 00 Fa0/2 on 0 00 Fa0/3 on 0 00 Fa0/4 on Time since last port bundled: 00d:23h:05m:46s Fa0/4 show spanning-tree Hanka#show spanning-tree Port 65 (Port-channel1) of VLAN1 is forwarding Port path cost 8, Port priority 128, Port Identifier 128.65. Designated root has priority 32768, address 0001.4264.82c0 Designated bridge has priority 32768, address 0001.4264.82c0 Designated port id is 128.1, designated path cost 0 Timers: message age 2, forward delay 0, hold 0 Number of transitions to forwarding state: 1 BPDU: sent 5, received 41627 show interfaces trunk
註:此命令最初是在Cisco IOS軟體版本12.1(6)EA2中引入的。
Hanka#show interfaces trunk Port Mode Encapsulation Status Native vlan Po1 on 802.1Q trunking 1 Port Vlans allowed on trunk Po1 1-1005 Port Vlans allowed and active in management domain Po1 1-2,999 Port Vlans in spanning tree forwarding state and not pruned Po1 1-2,999 Hanka#
目前尚無適用於此組態的具體疑難排解資訊。