本文档讨论运行 Catalyst OS (CatOS) 的 Catalyst 5500/5000 交换机和运行 Cisco IOS® 软件的 Catalyst 6500/6000 或 Catalyst 4500/4000 的交换机之间的 EtherChannel 设置。EtherChannel 将单个链路绑定到在交换机或其他设备之间提供更高带宽和冗余的单个逻辑链路中。您可将 EtherChannel 作为 Fast EtherChannel (FEC) 或 Gigabit EtherChannel (GEC);它取决于用来形成 EtherChannel 的接口或端口的速度。此配置也适用于运行 CatOS 的 Catalyst 4500/4000 或 6500/6000 系列交换机(连接到运行 Cisco IOS 软件的 Catalyst 4500/4000 或 6500/6000 系列交换机)。
本文档中的配置将每台交换机的两个快速以太网 (FE) 端口绑定到 FEC。本文档使用术语“EtherChannel”讨论 GEC、FEC、端口信道、信道和端口组。
本文档仅显示交换机的配置文件,以及相关 show 命令示例的输出。有关如何配置 EtherChannel 的详细信息,请参阅以下文档:
在您尝试此配置前,请确保您已基本了解以下内容:
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的系统要求。
本文档中的信息都是基于特定实验室环境中的设备编写的。所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
您可无条件(信道模式为 on)或通过自动协商配置 EtherChannel。当您通过自动协商配置时,交换机与远端协商信道。为此,它使用 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 的推荐模式是 desirable 模式。PAgP 可防止在两个设备之间出现任何不正确的配置。当连接设备不支持 PAgP 并且您需要无条件设置信道时,可使用信道模式 on。您可在 auto 和 desirable 信道模式下使用静默或非静默关键字。在默认情况下,Catalyst 6500/6000 或 4500/4000 交换机在所有端口上启用静默关键字。默认情况下,Catalyst 5500/5000 系列交换机在铜线端口上启用静默关键字。对于所有光纤端口(FE 和千兆以太网 [GE]),5500/5000 交换机默认启用非静默关键字。当您连接 Cisco 交换机时,请使用默认的静默或非静默关键字。
注意:有关PAgP信道模式和静默/非静默模式的其他信息,请参阅文档在Catalyst 4500/4之间配置EtherChannel(建议)和静默/非静默模式部分的“使用PAgP”配置EtherChannel运行CatOS系统软件的000、5500/5000和6500/6000交换机。
此部分存在信息配置在本文描述的功能中。
本文档使用以下网络设置:
当活动链路聚合到 EtherChannel 时,端口会暂时离开生成树并作为单个逻辑端口回到生成树。在生成树重新收敛之前,网络流量将中断。
如果您出于其他考虑不使用 PAgP 或 LACP 等协议对 EtherChannel 进行配置,请确保两端所需的参数相同。如果这些参数不同,则信道的一端将进入 err-disable 模式。要从 err-disable 模式恢复端口,请参阅以下内容:
本文档使用以下配置:
注意:要验证您配置的模块或交换机端口的功能,请对运行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 部分。
本部分提供可用于确认您的配置是否正常运行的信息。
命令输出解释程序工具(仅限注册用户)支持某些 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
按照本文档所述,Cisco 推荐对端口信道配置使用 PAgP。如果由于任何理由无条件配置 EtherChannel(使用信道模式 on),您应该创建一个端口信道。本部分提供过程。如果创建了端口信道,您可在配置过程中避免可能出现的 STP 问题。如果您在另一端成为信道前配置其中一端,则 STP 环路检测可以禁用端口。
要设置端口信道的端口以禁用 CatOS 交换机的模式,请发出 set port disable module/port 命令。
在 Cisco IOS 交换机上创建端口信道(端口组),并将信道模式设置为 on。
在 CatOS 交换机上创建端口信道,并将信道模式设置为 on。
要在第一台 CatOS 交换机上重新启用您之前禁用的端口,请发出 set port enable module/port 命令。
EtherChannels 的性能问题由多种情况引起。常见原因包括负载平衡算法不正确和端口特定物理层问题。
要更好地了解并配置负载平衡算法,请参阅以下文档:
有关如何对物理层问题进行故障排除的信息,请参阅对交换机端口和接口问题进行故障排除。