此配置示例说明了如何在没有 VLAN 中继的情况下,在运行 Cisco IOS® 系统软件的 Cisco 路由器和 Cisco Catalyst 6500 交换机之间设置第 3 层 (L3) EtherChannel。EtherChannel 可称为快速以太通道 (FEC) 或 Gigabit EtherChannel (GEC);此术语取决于用来形成 EtherChannel 的接口或端口的速度。在本示例中,来自 Cisco 路由器和 Catalyst 6500 交换机的两个快速以太网端口被捆绑到一个 FEC 中。在本文档中,“FEC”、“GEC”、“端口信道”、“信道”和“端口组”这些术语都是指 EtherChannel。
本文档仅包含交换机和路由器的配置文件,以及相关示例显示命令的输出。
尝试进行此配置之前,请确保满足以下要求:
运行 Cisco IOS 软件的 Catalyst 6500/6000 和 4500/4000 系列交换机:
运行 Cisco IOS 软件的 Catalyst 6500/6000 和 4500/4000 系列交换机支持第 2 层 (L2) 和第三层 (L3) EtherChannel,每个模块上拥有多达八个兼容配置的以太网接口。每个 EtherChannel 中的所有接口必须具有相同的速度。它们都必须配置为 L2 或 L3 接口。
EtherChannel 负载均衡可以使用 MAC 地址、IP 地址或者 TCP 端口号。
注意:所选模式适用于交换机上配置的所有EtherChannel。
Catalyst 6500/6000 Cisco IOS 软件版本 12.1E 或更新版本以及 Catalyst 4500/4000 Cisco IOS 软件版本 12.1(8a)EW 或更新版本。
Cisco 路由器:
IP 流量通过端口信道接口进行分配,而来自其他路由协议的数据流则通过单个链路发送。桥接流量根据数据包中的 L3 信息分配。如果数据包中不存在 L3 信息,那么流量将通过第一个链路发送。
多种 Cisco 路由器都支持 EtherChannel。要查找支持 Cisco 路由器上的 EtherChannel 的平台或代码版本,请使用 Cisco Feature Navigator II (仅限注册用户)。在 FEC 功能下,可找到支持 EtherChannel 的路由器和 Cisco IOS 软件版本列表。
有关其他思科产品上 EtherChannel 的硬件与软件要求,请参阅在 Catalyst 交换机上实施 EtherChannel 的系统要求。
本文档中的信息基于以下软件和硬件版本:
运行 Cisco IOS 软件版本 12.1(8b)E10 的 Catalyst 6500 交换机
运行 Cisco IOS 软件版本 12.1(21) 的 Cisco 7500 路由器
本文档中的交换机配置适用于运行 Cisco IOS 软件的所有 Catalyst 6500/6000 和 Catalyst 4500/4000 系列交换机。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
注意:使用write erase命令可清除所有设备上的配置,以确保它们具有默认配置。在发出 write erase 命令以清除所有非默认配置后,请确保重新加载设备。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
如果您最初在物理接口下发出 channel-group 命令,则该命令会自动创建端口信道接口。在开通物理接口的信道之前,如果配置了端口信道接口,请首先移除该端口信道接口。这仅适用于 Catalyst 交换机。7500 路由器的配置顺序有所不同。在物理接口下配置信道组之前,必须配置端口信道接口。
在 Catalyst 6500/6000 和 4500/4000 Cisco IOS 软件中,端口信道的配置顺序是很重要的。在物理接口中,最好在发出 channel-group 命令之前发出所有的 switchport 命令。
如果在物理接口(接口 Gigabit Ethernet 1/1)上发出 switchport 命令之前发出 channel-group 命令,则端口信道接口将被自动创建并且变为 L3 接口。然后,如果您在物理接口下发出 switchport 命令,则物理接口就会变为 L2 接口。并且,您之前所创建的端口信道接口将没有物理接口与之相关联。请注意,channel-group 命令在物理接口下失效。在这种情况下,您必须首先在新配置的端口信道接口下发出 switchport 命令。然后,物理端口将再次接受 channel-group 命令。此时端口信道已从 L3 接口变为 L2 接口。
相反,我们来看看在物理接口上先发出 switchport 命令再添加 channel-group 命令的情况如何。在该情况下,端口信道接口将自动创建,并且继承所有已配置的 switchport 命令。
默认情况下,在运行的 Cisco IOS 软件的 Catalyst 6500/6000 交换机上,所有的端口均为 L3 端口。默认情况下,在运行 Cisco IOS 软件的 Catalyst 4500/4000 交换机上,所有的端口均为 L2 端口。
本部分提供有关如何配置本文档所述功能的信息。
注意:使用命令查找工具(仅限注册客户)查找有关本文档中使用的命令的详细信息。
本文档使用以下网络设置:
本文档使用以下配置:
注意:注释和说明以蓝色斜体显示。
Catalyst 6500 交换机(没有 VLAN 中继) |
---|
Building configuration... Current configuration : 5869 bytes ! version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname cat6500 ! boot buffersize 126968 boot system flash slot0:c6sup11-jsv-mz.121-8b.E15.bin boot bootldr bootflash:c6msfc-boot-mz.121-8b.E15 enable password ww ! redundancy main-cpu auto-sync standard ip subnet-zero ! ! no ip finger ! ! ! ! !--- In this example, you configure L3 EtherChannel. !--- For more details, refer to this document: !--- Configuring EtherChannels. !--- A logical port-channel interface is automatically created !--- when ports are grouped into a channel group. interface Port-channel 1 ip address 11.1.1.2 255.255.255.0 duplex full speed 100 !--- If you specify the speed and duplex setting at the port channel !--- level, these settings pass down to the physical ports. !--- In other words, the physical ports inherit the same speed !--- and duplex settings as the port-channel interface. hold-queue 300 in ! interface GigabitEthernet1/1 no ip address shutdown ! interface GigabitEthernet1/2 no ip address shutdown ! interface FastEthernet3/1 no ip address duplex full speed 100 !--- Port is a member of channel group 1. Routers do not support !--- EtherChannel negotiation (Port Aggregation Protocol [PAgP]), so PAgP !--- needs to be disabled. On a Catalyst 4500/4000 switch, all ports are !--- L2 ports by default. Convert this port from a physical L2 port to !--- a physical L3 port with the no switchport command. channel-group 1 mode on interface FastEthernet3/2 no ip address duplex full speed 100 !--- Port is a member of channel group 1. Routers do not support !--- EtherChannel negotiation (PAgP), so PAgP needs to be disabled. !--- On a Catalyst 4500/4000 switch, all ports are L2 ports by default. !--- Convert this port from a physical L2 port to a physical L3 port !--- with the no switchport command. channel-group 1 mode on interface FastEthernet3/3 no ip address switchport switchport mode access ! !--- Output suppressed. ! ip classless no ip http server ! ! ! line con 0 transport input none line vty 0 4 ! end |
Cisco 7500 路由器(没有 VLAN 中继) |
---|
!--- Output suppressed. ! interface Port-channel1 ip address 11.1.1.1 255.255.255.0 full-duplex hold-queue 300 in ! interface FastEthernet0/0 no ip address full-duplex speed 100 channel-group 1 ! interface FastEthernet0/1 no ip address full-duplex speed 100 channel-group 1 !--- Output suppressed. |
本部分所提供的信息可用于确认您的配置是否正常工作。
命令输出解释程序工具(仅限注册用户)支持某些 show 命令,使用此工具可以查看对 show 命令输出的分析。
show etherchannel channel-id port-channel — 查看 Cisco IOS 交换机中的端口信道。
show interfaces port-channel channel-id — 查看 Cisco IOS 路由器中的端口信道。
show etherchannel channel-id port-channel
Router#show etherchannel 1 port-channel Port-channels in the group: ---------------------- Port-channel: Po1 ------------ Age of the Port-channel = 01h:56m:20s Logical slot/port = 10/1 Number of ports in agport = 2 GC = 0x00010001 HotStandBy port = null Passive port list = Fa3/1 Fa3/2 Port state = Port-channel L3-Ag Ag-Inuse Ports in the Port-channel: Index Load Port ------------------- 0 55 Fa3/1 1 AA Fa3/2 Time since last port bundled: 01h:55m:44s Fa3/2 Router#
show interfaces port-channel channel-id
Router#show interfaces port-channel 1 Port-channel1 is up, line protocol is up Hardware is FastEtherChannel, address is 00e0.1476.7600 (bia 0000.0000.0000) Internet address is 11.1.1.1/24 MTU 1500 bytes, BW 400000 Kbit, DLY 100 usec, rely 255/255, load 62/255 Encapsulation ARPA, loopback not set, keepalive set (10 sec), hdx ARP type: ARPA, ARP Timeout 04:00:00 No. of members in this fechannel: 2 Member 0 : FastEthernet0/0 Member 1 : FastEthernet0/1 Last input never, output never, output hang never Last clearing of "show interface" counters 10:51:55 Queueing strategy: fifo Output queue 0/40, 0 drops; input queue 0/300, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 98281000 bits/sec, 8762 packets/sec 4545 packets input, 539950 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 0 watchdog, 0 multicast 0 input packets with dribble condition detected 342251216 packets output, 3093422680 bytes, 0 underruns 0 output errors, 0 collisions, 0 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out
目前没有针对此配置的故障排除信息。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
08-Mar-2002
|
初始版本 |