局域网交换 : EtherChannel

EtherChannel Between 在运行 Cisco IOS系统软件的Catalyst 3550/3560/3750 系列交换机和Catalyst 交换机之间的EtherChannel 配置示例

2016 年 10 月 27 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 10 月 7 日) | 反馈


目录


简介

本文为如何设置在运行Cisco IOS�系统软件的Catalyst 3550和Catalyst 6500/6000之间的一EtherChannel提供一配置示例。可以根据用于形成 EtherChannel 的接口或端口的速度,将 EtherChannel 称为 Fast EtherChannel 或千兆 EtherChannel。

注意: 本文档中应用于 Catalyst 3550 交换机的 EtherChannel 命令也可以应用于 Catalyst 3750 系列交换机。

先决条件

要求

本文档没有任何特定的要求。

使用的组件

本文档中的信息基于以下软件和硬件版本:

  • 运行Cisco IOS软件版本12.1(14)ea的Catalyst 3550交换机

  • Catalyst 6500/6000交换机运行Cisco IOS软件版本12.1(13)E1

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

背景理论

在本文档中,Catalyst 3550 交换机上的两个千兆以太网接口--3500 上的千兆以太网接口是 10/100/1000 协商以太网接口--已与运行 Cisco IOS 系统软件的 Catalyst 6500/6000 交换机上的两个快速以太网接口一起被捆绑到 Fast EtherChannel 中,以形成第 2 层 (L2) EtherChannel。

注意: 在本文档中,Fast EtherChannel、千兆 EtherChannel、端口信道和信道组都指 EtherChannel。

本文档中的 Catalyst 交换机配置适用于运行 Cisco IOS 系统软件的所有 Catalyst 6500/6000 或 Catalyst 4500/4000 系列交换机。

本文档只显示交换机的配置文件,以及相关示例 show 命令的输出。有关如何配置 EtherChannel 的详细信息,请参阅以下文档:

重要说明

可以使用适当的命令手动配置 EtherChannel。还可以使用端口聚合协议 (PAgP) 自动配置 EtherChannel,以使交换机可与另一端协商信道。有关 PAgP 的详细信息,请参阅以下文档:

本文档中的配置是使用 desirable 模式实施的。如果计划手动配置 EtherChannel,请使用所提供的步骤来创建端口信道。这可避免在配置过程中出现生成树协议 (STP) 问题。如果一端在另一端可以配置为信道之前已配置为信道,则 STP 可能关闭一些端口状态为错误禁用 [errdisable] 的端口。

请执行以下步骤以创建端口信道:

  1. 保留要用于端口信道的接口状态为管理性关闭。

  2. 在 Catalyst 6500/6000 交换机上创建端口信道(信道组)。

    确保将信道模式设置为 on,例如,channel-group 1 mode on。

  3. 在 Catalyst 3550、3560 或 3750 交换机上创建端口信道。

    确保将信道模式设置为 on。

  4. 使用 no shut 命令重新启用 Catalyst 6500/6000 交换机上之前被禁用的接口。

配置

本部分提供有关如何配置本文档所述功能的信息。

注意: 要查找本文档所用命令的其他信息,请使用命令查找工具仅限注册用户)。

网络图

本文档使用此图中所示的网络设置:

/image/gif/paws/12033/89-a.gif

注意: Catalyst 3550 上的千兆以太网接口是 10/100/1000 Mbps 协商以太网接口。Catalyst 3550 上的千兆端口还可以连接到 Catalyst 6500/6000 上的快速以太网 (100 Mbps) 端口。

注意: Catalyst 3750 系列交换机支持跨堆叠 EtherChannel,该 EtherChannel 允许不同堆叠交换机的接口成为同一个 EtherChannel 组的成员。欲知在aï ¿  ½被堆积的交换机环境的更多信息onï ¿  ½ EtherChannel,参考EtherChannel并且交换配置的EtherChannel文档的堆叠部分Catalyst 3750系列交换机的。

配置

本文档使用以下配置:

Catalyst 3550
Building configuration...
Current configuration : 1610 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Cat3550
!
enable password ww
!
ip subnet-zero
no ip finger
!
!
!
!
!--- A logical port-channel interface is automatically created 
!--- when ports are grouped into a channel group.

interface Port-channel 1


!--- In this example, the L2 EtherChannel is configured.
!--- A Layer 3 (L3) EtherChannel can also be configured on the Catalyst 3550 switches.
!--- For more information, refer to the document Configuring EtherChannel.

switchport mode access no ip address snmp trap link-status!

!--- Note: The Gigabit Ethernet interface on the Catalyst 3550 is a 
!--- 10/100/1000 Mbps negotiated Ethernet interface. The Gigabit port on the Catalyst 3550 is 
!--- connected to a FastEthernet (100 Mbps) port on the Catalyst 6500/6000.

!--- The port is a member of channel group 1.

interface GigabitEthernet0/1
 switchport mode access
 no ip address
 snmp trap link-status
 channel-group 1 mode desirable
!


!--- The port is a member of channel group 1.

interface GigabitEthernet0/2
 switchport mode access
 no ip address
 snmp trap link-status
 channel-group 1 mode desirable
!
interface GigabitEthernet0/3
 switchport mode access
 no ip address
 snmp trap link-status
!


!--- Output suppressed.

interface GigabitEthernet0/12
 switchport mode access
 no ip address
 snmp trap link-status


!--- Interface VLAN1 is required for management purposes.

interface Vlan1
 ip address 10.1.1.1 255.255.255.0
!
ip classless
ip http server
!
!
line con 0
 transport input none
line vty 5 15
!
end

Catalyst 6500/6000
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 bootldr bootflash:c6msfc-boot-mz.121-4.E1
 enable password ww
 !
 redundancy
  main-cpu
   auto-sync standard
 ip subnet-zero
 !
 !
 no ip finger
 !
 !
 !
 !


!--- A logical port-channel interface is automatically created 
!--- when ports are grouped into a channel group.

 interface Port-channel 1
  no ip address
  switchport
  switchport mode access
 !
 interface GigabitEthernet1/1
  no ip address
  shutdown
 !
 interface GigabitEthernet1/2
  no ip address
  shutdown
 !

!--- Note: The Gigabit Ethernet interface on the Catalyst 3550 is a
!--- 10/100/1000 Mbps negotiated Ethernet interface. The Gigabit port on the Catalyst 3550 is 
!--- connected to a FastEthernet (100 Mbps) port on the Catalyst 6500/6000.

 interface FastEthernet3/1
  no ip address


!--- In this example, the L2 EtherChannel is configured.
!--- An L3 EtherChannel can also be configured on the Catalyst 6500/6000 running
!--- Cisco IOS System Software. For more details, refer to the document
!--- Configuring EtherChannel.

!--- On a Catalyst 6500/6000, you must issue the switchport
!--- command once, without any keywords, in order 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;
!--- no additional command is required.

 switchport

!--- This command puts the interface in VLAN1, by default.

 switchport mode access

!--- The port is a member of channel group 1.

 channel-group 1 mode desirable
 !
 interface FastEthernet3/2
  no ip address

!--- On a Catalyst 6500/6000, you must issue the switchport 
!--- command once, without any keywords, in order 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;  
!--- no additional command is required.

  switchport

!--- This command puts the interface in VLAN1, by default.

  switchport mode access

!--- The port is a member of channel group 1.

  channel-group 1 mode desirable
 !
 interface FastEthernet3/3
  no ip address
 switchport
  switchport mode access
 !


!--- Output suppressed.

 !
 interface FastEthernet3/48
  no ip address
 switchport
  switchport mode access
 !


!--- Interface VLAN1 is required for management purposes.

 interface Vlan1
  ip address 10.1.1.2 255.255.255.0
 !
 ip classless
 no ip http server
 !
 !
 !
 line con 0
  transport input none
 line vty 0 4
 !
 end

注意: 配置示例显示一个使用接入链路的 EtherChannel 配置。同一配置也适用于 EtherChannel 中继链路。发出 switchport mode trunk 命令,或者允许交换机使用 dynamic desirable 模式来协商模式。有关如何配置中继的详细信息,请参阅文档配置 VLAN配置 VLAN 中继部分。

Port-Channel子接口配置

Port-Channel的配置的另一示例与子接口的在Catalyst 3560交换机运行Cisco IOS软件版本12.2(25)。

Catalyst 3560
Building configuration...
  
Current configuration : 2480 bytes
!
version 12.2
!
interface Port-channel5
no switchport
no ip address
!
interface Port-channel5.690
!
interface Port-channel10
no switchport
no ip address
!
interface Port-channel10.1
!
interface Port-channel10.690
!
interface Port-channel11
no switchport
no ip address

验证

命令输出解释程序工具仅限注册用户)支持某些 show 命令,使用此工具可以查看对 show 命令输出的分析。

要验证运行 Cisco IOS 系统软件的 Catalyst 6500/6000 和 Catalyst 3500 交换机中的端口信道,请发出以下命令:

要检查运行 Cisco IOS 系统软件的 Catalyst 6500/6000 和 Catalyst 3500 交换机中的 STP 状态,请发出以下命令:

Catalyst 3550

Cat3550#show interface port-channel 1
Port-channel1 is up, line protocol is up
Hardware is EtherChannel, address is 0002.4b28.db02 (bia 0002.4b28.db02)
MTU 1500 bytes, BW 200000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
 Full-duplex, 100Mb/s
input flow-control is off, output flow-control is off
 Members in this channel: Gi0/1 Gi0/2
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:03:27, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
26 packets input, 5344 bytes, 0 no buffer
Received 17 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
59 packets output, 5050 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

Cat3550#show spanning-tree vlan 1 detail
 
 VLAN1 is executing the ieee compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, address 0002.4b28.db01
  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
  Number of topology changes 1 last change occurred 00:00:38 ago
          from Port-channel1
  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 0
 
 Port 65 (Port-channel1) of VLAN1 is forwarding
   Port path cost 12, Port priority 128, Port Identifier 128.65.
   Designated root has priority 32768, address 0002.4b28.db01
   Designated bridge has priority 32768, address 0002.4b28.db01
   Designated port id is 128.65, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   BPDU: sent 34, received 0 

Cat3550# show etherchannel 1 summary
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        R - Layer3      S - Layer2
        U - port-channel in use
Group Port-channel  Ports
-----+------------+-----------------------------------------------------------
1     Po1(SU)     Gi0/1(P)   Gi0/2(P)

Cat3550# ping 10.1.1.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

Catalyst 6500/6000

Cat6500# show interface port-channel 1
Port-channel1 is up, line protocol is up
  Hardware is EtherChannel, address is 0002.7ef1.36e1 (bia 0002.7ef1.36e1)
  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
  Members in this channel: Fa3/1 Fa3/2
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output never, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/2000, 0 drops
  5 minute input rate 1000 bits/sec, 1 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     407 packets input, 34994 bytes, 0 no buffer
     Received 311 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
     93 packets output, 16598 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

Cat6500# show spanning-tree vlan 1 detail
 
 VLAN1 is executing the ieee compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, address 00d0.024f.6001
  Configured hello time 2, max age 20, forward delay 15
  Current root has priority 32768, address 0002.4b28.db01
  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:02:13 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 0002.4b28.db01
   Designated bridge has priority 32768, address 0002.4b28.db01
   Designated port id is 128.65, designated path cost 0
   Timers: message age 1, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   BPDU: sent 0, received 66

Cat6500# show etherchannel 1 summary
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        R - Layer3      S - Layer2
Group Port-channel  Ports
-----+------------+-----------------------------------------------------------
1     Po1(SU)     Fa3/1(P)   Fa3/2(P)

Cat6500# ping 10.1.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

故障排除

Err-Disable 状态

在 EtherChannel 配置过程中,一个常见问题是接口进入了 err-disable 模式。当一台交换机上的 Etherchannel 切换到 On 模式,而另一台交换机没有立即配置时,可以看到这种情况。如果保持此状态一分钟左右,已启用 EtherChannel 的交换机上的 STP 会认为存在环路。这将导致信道端口被置于 err-disable 状态。有关如何确定 EtherChannel 接口是否处于 err-disable 状态的详细信息,请参阅以下示例:

%SPANTREE-2-CHNL_MISCFG: Detected loop due to etherchannel misconfiguration of Gi0/9
%PM-4-ERR_DISABLE: channel-misconfig error detected on Po10, putting Gi0/9 in err-disable state
%PM-4-ERR_DISABLE: channel-misconfig error detected on Po10, putting Gi0/10 in err-disable state
Switch1#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 - unsuitable for bundling
        U - in use      f - failed to allocate aggregator
        d - default port

Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
10     Po10(SD)         -        Gi0/9(D)    Gi0/10(D)

Switch1#show interfaces GigabitEthernet 0/9 status

Port      Name               Status       Vlan       Duplex  Speed Type
Gi0/9                        err-disabled 1            auto   auto 10/100/1000BaseTX

Switch1#show interfaces GigabitEthernet 0/10 status

Port      Name               Status       Vlan       Duplex  Speed Type
Gi0/10                       err-disabled 1            auto   auto 10/100/1000BaseTX

该错误消息表明 EtherChannel 遇到了生成树环路。为了解决问题,设置信道模式对理想在连接的两边,然后重新启用接口:

Switch1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch1(config)#interface gi0/9
Switch1(config-if)#channel-group 10 mode desirable

这将导致只有在两端都同意建立信道时,每端才会形成信道。如果两端不都同意建立信道,则它们将继续用作普通端口。

将连接两端的信道模式都设置为 desirable 之后,对关联接口发出 shutdown 和 no shutdown 命令以手动重新启用端口:

Switch1(config-if)#shutdown
Switch1(config-if)#no shutdown

speed nonegotiate 命令未出现于运行配置中

在端口信道上配置的 speed nonegotiate 命令并不是总是出现在运行配置中。之所以发生这种情况,是因为端口信道接口上的 nonegotiate 取决于捆绑的端口的 nonegotiate 配置。当端口信道处于活动状态时,会根据各个信道端口配置将它插入。


相关信息


Document ID: 12033