本文討論執行Catalyst OS(CatOS)的Catalyst 5500/5000交換器與執行Cisco IOS®軟體的Catalyst 6500/6000或Catalyst 4500/4000交換器之間的EtherChannel設定。EtherChannel將各個鏈路捆綁到單個邏輯鏈路中,從而在交換機或其他裝置之間提供更高的頻寬和冗餘。您可以將EtherChannel稱為快速EtherChannel(FEC)或Gigabit EtherChannel(GEC);這取決於用來形成EtherChannel的介面或連線埠的速度。此組態也適用於執行CatOS的Catalyst 4500/4000或6500/6000系列交換器,連線到執行Cisco IOS軟體的Catalyst 4500/4000或6500/6000系列交換器。
本文檔中的配置將兩台交換機的快速乙太網(FE)埠捆綁為一個FEC。本檔案使用術語「乙太通道」指代GEC、FEC、連線埠通道、通道和連線埠群組。
本檔案只會顯示交換器的組態檔,以及相關show指令範例的輸出。有關如何配置EtherChannel的詳細資訊,請參閱以下文檔:
設定EtherChannel(適用於執行Cisco IOS軟體的Catalyst 6500/6000交換器)
設定EtherChannel(適用於執行Cisco IOS軟體的Catalyst 4500/4000交換器)
在嘗試此設定之前,請確認您已對以下內容有基本瞭解:
EtherChannel配置
使用指令行介面(CLI)設定Catalyst 6500/6000和Catalyst 5500/5000系列交換器
本文中的資訊係根據以下軟體和硬體版本:
執行CatOS 6.4(8)軟體的Cisco Catalyst 5505交換器
執行Cisco IOS軟體版本12.1(20)E的Cisco Catalyst 6509交換器
註:有關Catalyst交換機上的EtherChannel系統要求,請參閱在Catalyst交換機上實施EtherChannel的系統要求。
本文中的資訊是根據特定實驗室環境內的裝置所建立。所有裝置都以已清除(預設)的配置啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
您可以無條件配置EtherChannel(通道模式為on)或通過自動協商。透過自動交涉設定時,交換器會與遠端交涉通道。為此,它使用Cisco專有埠聚合協定(PAgP)(使用channel mode desirable命令)或IEEE 802.3ad鏈路聚合控制協定(LACP)(使用channel mode active或channel mode passive命令)。 在本檔案中,EtherChannel組態使用PAgP進行自動交涉。
所有運行CatOS系統軟體的Catalyst交換機都支援PAgP。執行Cisco IOS系統軟體的Catalyst 6500/6000或4500/4000系列交換器也支援PAgP。建議在支援PAgP的裝置之間建立EtherChannel的模式是理想模式。PAgP可防止兩台裝置之間的任何不正確配置。當連線裝置不支援PAgP並且需要無條件設定通道時,可以使用通道模式。可以在自動和期望通道模式下使用silent或non-silent關鍵字。Catalyst 6500/6000或4500/4000交換器預設在所有連線埠上啟用silent關鍵字。Catalyst 5500/5000系列交換器在銅纜連線埠上預設啟用silent關鍵字。對於所有光纖連線埠(FE和Gigabit乙太網路[GE]),5500/5000交換器預設啟用non-silent關鍵字。在Cisco交換機之間連線時,使用預設的silent或non-silent關鍵字。
註:有關PAgP通道化模式和靜默/非靜默模式的其他資訊,請參閱使用PAgP配置EtherChannel(推薦)部分和在運行CatOS系統軟體的Catalyst 4500/4000、5500/5000和6500/6000交換機之間配置EtherChannel文檔的Silent/Non-Silent Mode部分。
本節提供用於設定本檔案中所述功能的資訊。
本檔案會使用以下網路設定:
當活動鏈路聚合到EtherChannel中時,埠會暫時離開生成樹,然後作為單個邏輯埠連線回來。在生成樹重新收斂之前,網路流量會中斷。
如果出於其他考慮沒有使用PAgP或LACP等協定來配置EtherChannel,請確保兩端所需的引數相同。如果兩者不同,通道的一端會進入錯誤停用模式。若要將連線埠從錯誤停用模式中復原,請參閱以下內容:
本檔案會使用以下設定:
注意:要驗證所配置的模組或交換機埠的功能,請對運行CatOS的交換機使用show port capabilities module命令。對於運行Cisco IOS軟體的交換機,請使用show interfaces capabilities 命令。
註:在配置中,輸出之間的註釋以藍色斜體顯示。
Catalyst 5500 |
---|
cat5500 (enable) show config This command shows non-default configurations only. Use 'show config all' to show both default and non-default configurations. ...... ................ ................ .. begin ! # ***** NON-DEFAULT CONFIGURATION ***** ! ! # time: Wed Jan 28 2004, 09:39:55 ! # version 6.4(2) ! # errordetection set errordetection portcounter enable ! # frame distribution method set port channel all distribution mac both ! # vtp set vtp domain cisco set vlan 1 name default type ethernet mtu 1500 said 100001 state active set vlan 1002 name fddi-default type fddi mtu 1500 said 101002 state active set vlan 1004 name fddinet-default type fddinet mtu 1500 said 101004 state active stp ieee set vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active stp ibm set vlan 1003 name token-ring-default type trcrf mtu 1500 said 101003 state active mode srb aremaxhop 7 stemaxhop 7 backupcrf off ! # ip !--- This is the IP address for management. set interface sc0 1 10.10.10.2/255.255.255.0 10.10.10.255 ! # set boot command set boot config-register 0x2102 set boot system flash bootflash:cat5000-supg.6-4-8.bin ! # mls set mls nde disable ! # port channel !--- Ports are assigned to admin-group 200. Administrative groups !--- specify which ports can form an EtherChannel together. An administrative group !--- can contain a maximum of eight ports. This admin-group assignment happens !--- automatically with the configuration of the port channel. You can also !--- assign it manually, as done in this example. However, you do not need to assign !--- the admin-group manually. Let the switch create !--- the admin-group automatically. !--- Note: This configuration sets ports 4/1 through 4/4 !--- for port channel, but only configures ports 4/1-2. This is !--- normal behavior. You can use ports 4/3 and 4/4 for any other purpose. set port channel 4/1-4 200 ! # default port status is enable ! ! #module 1 : 0-port Supervisor III ! #module 2 : 2-port MM MIC FDDI ! #module 3 : 24-port 10/100BaseTX Ethernet ! #module 4 : 12-port 10/100BaseTX Ethernet !--- This enables port channeling with PAgP and configures desirable silent mode. set port channel 4/1-2 mode desirable silent ! #module 5 : 2-port MM OC-3 Dual-Phy ATM !--- Output suppressed. end |
如需設定中命令的詳細資訊,請參閱Catalyst 5000系列命令參考(6.3和6.4)。
Catalyst 6500 |
---|
Cat6509# show running-config Building configuration... Current configuration : 3852 bytes ! version 12.1 no service single-slot-reload-enable service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Cat6509 ! ! redundancy main-cpu auto-sync standard ip subnet-zero ! ! interface port-channel1 no ip address !--- This example has configured a Layer 2 (L2) EtherChannel. !--- You can configure a Layer 3 (L3) EtherChannel on the Catalyst !--- 6500/6000 switches running Cisco IOS Software; however, this is not !--- the focus of this document. For details on the Layer 3 EtherChannel configuration, !--- refer to the document Configuring EtherChannels. switchport !--- This command puts the interface in VLAN1, by default. switchport mode access ! interface FastEthernet6/1 no ip address !--- On the Catalyst 6500/6000, you must issue the switchport command once, !--- without any keywords, to configure the interface as an L2 port. !--- By default, all the ports are router ports (L3 ports). !--- On a Catalyst 4500/4000 switch, all ports are L2 ports by default. !--- You do not need an additional command. switchport !--- This command puts the interface in VLAN1, by default. switchport mode access !--- The port is a member of channel group 1 with autonegotiation !--- that uses PAgP and silent mode. channel-group 1 mode desirable ! interface FastEthernet6/2 no ip address !--- On the Catalyst 6500/6000, you must issue the switchport command once, !--- without any keywords, to configure the interface as a L2 port. !--- By default, all the ports are router ports (L3 ports). !--- On a Catalyst 4500/4000 switch, all ports are L2 ports by default. !--- You do not need an additional command. switchport !--- This command puts the interface in VLAN1, by default. switchport mode access !--- The port is a member of channel group 1 with autonegotiation !--- that uses PAgP and silent mode. channel-group 1 mode desirable ! interface FastEthernet6/3 no ip address ! interface FastEthernet6/4 no ip address ! !--- Output suppressed. interface FastEthernet6/45 no ip address shutdown ! interface FastEthernet6/46 no ip address shutdown ! interface FastEthernet6/47 no ip address shutdown ! interface FastEthernet6/48 no ip address shutdown ! !--- This is the IP address for management. ip address 10.10.10.3 255.255.255.0 ! ip classless no ip http server ! ! ! line con 0 line vty 0 4 ! end Cat6509# |
如需設定中命令的詳細資訊,請參閱Catalyst 5000系列命令參考(6.3和6.4)。
注意:如果將介面分配給不存在的VLAN,該介面將關閉,直到您在VLAN資料庫中建立VLAN。如需更多詳細資訊,請參閱設定VLAN的建立或修改乙太網路VLAN一節。
本節提供的資訊可用於確認您的組態是否正常運作。
Output Interpreter Tool (僅供註冊客戶使用)支援某些show命令,這允許您檢視show命令輸出的分析。
要檢查CatOS交換機中的埠通道,請發出以下命令:
若要檢查CatOS交換器中的跨距樹狀目錄通訊協定(STP)狀態,請發出以下命令:
若要檢查執行Cisco IOS軟體的Catalyst 6500/6000或Catalyst 4500/4000系列交換器中的連線埠通道,請發出以下命令:
若要檢查執行Cisco IOS軟體的Catalyst 6500/6000或Catalyst 4500/4000系列交換器中的STP狀態,請發出以下命令:
此命令驗證模組是否能夠進行通道化。它還告訴您可以捆綁哪組埠來形成EtherChannel。在本例中,您可以將兩個埠4/1-2或四個埠4/1-4分組以形成通道:
cat5500 (enable) show port capabilities 4 Model WS-X5203 Port 4/1 Type 10/100BaseTX Speed auto,10,100 Duplex half,full Trunk encap type ISL Trunk mode on,off,desirable,auto,nonegotiate Channel 4/1-2,4/1-4 Broadcast suppression pps(0-150000),percentage(0-100) Flow control no Security yes Membership static,dynamic Fast start yes QOS scheduling rx-(none),tx-(none) CoS rewrite no ToS rewrite no Rewrite no UDLD yes AuxiliaryVlan no SPAN source,destination !--- Output suppressed.
此命令以及show port命令會驗證連線埠通道的狀態。
cat5500 (enable) show port channel Port Status Channel Admin Ch Mode Group Id ----- ---------- -------------------- ----- ----- 4/1 connected desirable silent 200 865 4/2 connected desirable silent 200 865 ----- ---------- -------------------- ----- ----- Port Device-ID Port-ID Platform ----- ------------------------------- ------------------------- ---------------- 4/1 Switch Fa6/1 cisco Catalyst 6000 4/2 Switch Fa6/2 cisco Catalyst 6000 ----- ------------------------------- ------------------------- ---------------- cat5500 (enable)
cat5500 (enable) show port 4/1 Port Name Status Vlan Level Duplex Speed Type ----- ------------------ ---------- ---------- ------ ------ ----- ------------ 4/1 connected 1 normal a-full a-100 10/100BaseTX !--- Output suppressed. Port Status Channel Admin Ch Mode Group Id ----- ---------- -------------------- ----- ----- 4/1 connected desirable silent 200 865 4/2 connected desirable silent 200 865 ----- ---------- -------------------- ----- ----- !--- Output suppressed. cat5500 (enable) show port 4/2 Port Name Status Vlan Level Duplex Speed Type ----- ------------------ ---------- ---------- ------ ------ ----- ------------ 4/2 connected 1 normal a-full a-100 10/100BaseTX !--- Output suppressed. Port Status Channel Admin Ch Mode Group Id ----- ---------- -------------------- ----- ----- 4/1 connected desirable silent 200 865 4/2 connected desirable silent 200 865 ----- ---------- -------------------- ----- ----- !--- Output suppressed.
cat5500 (enable) show port channel info Switch Frame Distribution Method: Mac both Port Status Channel Admin Channel Speed Duplex Vlan mode group id ----- ---------- -------------------- ----- ------- ----- ------ ---- 4/1 connected desirable silent 200 865 a-100 a-full 1 4/2 connected desirable silent 200 865 a-100 a-full 1 ----- ---------- -------------------- ----- ------- ----- ------ ---- Port ifIndex Oper-group Neighbor Oper-Distribution PortSecurity/ Oper-group Method Dynamic port ----- ------- ---------- ---------- ----------------- ------------- 4/1 334 1 65537 Mac both 4/2 334 1 65537 Mac both ----- ------- ---------- ---------- ----------------- ------------- Port Device-ID Port-ID Platform ----- ------------------------------- ------------------------- ---------------- 4/1 Switch Fa6/1 cisco Catalyst 6000 4/2 Switch Fa6/2 cisco Catalyst 6000 ----- ------------------------------- ------------------------- ---------------- !--- Output suppressed.
STP命令驗證通道中的所有埠是否分組在一起並處於轉發狀態。
cat5500 (enable) show spantree 1 VLAN 1 Spanning tree enabled Spanning tree type IEEE Designated Root 00-30-40-a7-a4-00 Designated Root Priority 32768 Designated Root Cost 0 Designated Root Port 1/0 Root Max Age 20 sec Hello Time 2 sec Forward Delay 15 sec Bridge ID MAC ADDR 00-30-40-a7-a4-00 Bridge ID Priority 32768 Bridge Max Age 20 sec Hello Time 2 sec Forward Delay 15 sec Port Vlan Port-State Cost Priority Portfast Channel_id ------------------------ ---- ------------- ----- -------- ---------- ---------- 2/1-2 1 not-connected 19 32 disabled 0 3/1 1 not-connected 100 32 disabled 0 3/2 1 not-connected 100 32 disabled 0 3/3 1 not-connected 100 32 disabled 0 3/4 1 not-connected 100 32 disabled 0 3/5 1 not-connected 100 32 disabled 0 3/6 1 not-connected 100 32 disabled 0 3/7 1 not-connected 100 32 disabled 0 3/8 1 not-connected 100 32 disabled 0 3/9 1 not-connected 100 32 disabled 0 3/10 1 not-connected 100 32 disabled 0 3/11 1 not-connected 100 32 disabled 0 3/12 1 not-connected 100 32 disabled 0 3/13 1 not-connected 100 32 disabled 0 3/14 1 not-connected 100 32 disabled 0 3/15 1 not-connected 100 32 disabled 0 3/16 1 not-connected 100 32 disabled 0 3/17 1 not-connected 100 32 disabled 0 3/18 1 not-connected 100 32 disabled 0 3/19 1 not-connected 100 32 disabled 0 3/20 1 not-connected 100 32 disabled 0 3/21 1 not-connected 100 32 disabled 0 3/22 1 not-connected 100 32 disabled 0 3/23 1 not-connected 100 32 disabled 0 3/24 1 not-connected 100 32 disabled 0 4/1-2 1 forwarding 12 32 disabled 865 4/3 1 forwarding 19 32 disabled 0 4/4 1 forwarding 19 32 disabled 0 4/5 1 not-connected 100 32 disabled 0 4/6 1 not-connected 100 32 disabled 0 4/7 1 not-connected 100 32 disabled 0 4/8 1 not-connected 100 32 disabled 0 4/9 1 not-connected 100 32 disabled 0 4/10 1 not-connected 100 32 disabled 0 4/11 1 not-connected 100 32 disabled 0 4/12 1 not-connected 100 32 disabled 0 cat5500 (enable)
cat5500 (enable) show spantree 4/1 Port Vlan Port-State Cost Priority Portfast Channel_id ------------------------ ---- ------------- ----- -------- ---------- ---------- 4/1-2 1 forwarding 12 32 disabled 865 cat5500 (enable) show spantree 4/2 Port Vlan Port-State Cost Priority Portfast Channel_id ------------------------ ---- ------------- ----- -------- ---------- ---------- 4/1-2 1 forwarding 12 32 disabled 865 cat5500 (enable)
註:連線埠4/1和4/2的show spantree module/port 的輸出顯示相同的結果。這是因為它們被組合在一個通道ID為865的通道中。
此命令驗證模組是否能夠進行通道化。
Cat6509# show interfaces capabilities module 6 FastEthernet6/1 Model: WS-X6348-RJ-45 Type: 10/100BaseTX Speed: 10,100,auto Duplex: half,full Trunk encap. type: 802.1Q,ISL Trunk mode: on,off,desirable,nonegotiate Channel: yes Broadcast suppression: percentage(0-100) Flowcontrol: rx-(off,on),tx-(none) Membership: static Fast Start: yes QOS scheduling: rx-(1q4t), tx-(2q2t) CoS rewrite: yes ToS rewrite: yes Inline power: yes SPAN: source/destination UDLD yes Link Debounce: yes Link Debounce Time: no FastEthernet6/2 Model: WS-X6348-RJ-45 Type: 10/100BaseTX Speed: 10,100,auto Duplex: half,full Trunk encap. type: 802.1Q,ISL Trunk mode: on,off,desirable,nonegotiate Channel: yes Broadcast suppression: percentage(0-100) Flowcontrol: rx-(off,on),tx-(none) Membership: static Fast Start: yes QOS scheduling: rx-(1q4t), tx-(2q2t) CoS rewrite: yes ToS rewrite: yes Inline power: yes SPAN: source/destination UDLD yes Link Debounce: yes Link Debounce Time: no
show interfaces port-channel port-channel interface number
此命令檢查埠通道的狀態。它還會告訴您形成此通道的埠。
Cat6509# show interfaces port-channel 1 Port-channel1 is up, line protocol is up Hardware is EtherChannel, address is 0009.1267.27d9 (bia 0009.1267.27d9) MTU 1500 bytes, BW 200000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Full-duplex, 100Mb/s input flow-control is off, output flow-control is off Members in this channel: Fa6/1 Fa6/2 ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue :0/40 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 126880 packets input, 10173099 bytes, 0 no buffer Received 126758 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 input packets with dribble condition detected 6101 packets output, 1175124 bytes, 0 underruns 0 output errors, 0 collisions, 2 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out Cat6509#
此命令顯示每個通道組的一行摘要。在此輸出範例中,可以看到連線埠Fa6/1和Fa6/2 的標幟P。這表示這些連線埠形成了連線埠通道。
Cat6509# show etherchannel summary Flags: D - down P - in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3 S - Layer2 U - in use f - failed to allocate aggregator u - unsuitable for bundling Number of channel-groups in use: 1 Number of aggregators: 1 Group Port-channel Protocol Ports --------- +-----------------------+ ----------------+ --------------- 1 Po1(SU) PAgP Fa6/1(P) Fa6/2(P)
此命令顯示埠通道資訊。
Cat6509# show etherchannel port-channel Channel-group listing: ----------------------- Group: 1 ---------- Port-channels in the group: ---------------------- Port-channel: Po1 ------------ Age of the Port-channel = 00d:00h:02m:25s Logical slot/port = 14/1 Number of ports = 2 GC = 0x00010001 HotStandBy port = null Port state = Port-channel Ag-Inuse Protocol = PAgP Ports in the Port-channel: Index Load Port EC state No of bits ------+------+------+------------------+----------- 1 55 Fa6/1 Desirable-Sl 4 0 AA Fa6/2 Desirable-Sl 4 Time since last port bundled: 00d:00h:01m:03s Fa6/1 Time since last port Un-bundled: 00d:00h:01m:05s Fa6/1
此命令驗證通道是否處於特定VLAN的轉送狀態。
Cat6509# show spanning-tree detail VLAN1 is executing the IEEE compatible Spanning Tree protocol Bridge Identifier has priority 32768, address 00d0.029a.8001 Configured hello time 2, max age 20, forward delay 15 Current root has priority 32768, address 0030.40a7.a400 Root port is 833 (Port-channel1), cost of root path is 12 Topology change flag not set, detected flag not set Number of topology changes 0 last change occurred 00:23:59 ago Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Timers: hello 0, topology change 0, notification 0, aging 300 Port 833 (Port-channel1) of VLAN1 is forwarding Port path cost 12, Port priority 128, Port Identifier 131.65. Designated root has priority 32768, address 0030.40a7.a400 Designated bridge has priority 32768, address 0030.40a7.a400 Designated port id is 131.97, designated path cost 0 Timers: message age 2, forward delay 0, hold 0 Number of transitions to forwarding state: 1 BPDU: sent 1, received 718
此命令顯示VLAN1的生成樹資訊。
Cat6509# show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32768 Address 0030.40a7.a400 Cost 12 Port 833 (Port-channel1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 Address 00d0.029a.8001 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Po1 Root FWD 12 128.833 P2p
思科建議對連線埠通道組態使用PAgP,如本檔案所述。如果由於任何原因而無條件配置EtherChannel(使用channel mode on),則應建立埠通道。本節提供了操作步驟。如果建立埠通道,則可以避免配置過程中可能出現的STP問題。如果將一側配置為通道,而另一側成為通道,STP環路檢測可以禁用埠。
若要將連線埠通道化的連線埠設定為CatOS交換器上的停用模式,請發出set port disable module/port 命令。
在Cisco IOS交換機上建立埠通道(埠組),並將通道模式設定為on。
在CatOS交換機上建立埠通道,並將通道模式設定為on。
要在第一個CatOS交換機上重新啟用之前禁用的埠,請發出set port enable module/port 命令。
EtherChannel的效能問題是由多種情況導致的。常見原因包括負載均衡演算法不正確以及埠特定的物理層問題。
要更好地瞭解和配置負載均衡演算法,請參閱以下文檔:
有關如何解決物理層問題的資訊,請參閱疑難排解交換器連線埠和介面問題。