设为首页收藏本站language 语言切换
查看: 3623|回复: 6
收起左侧

[分享] 跨堆叠 交换机EtherChannel 配置

[复制链接]
 成长值: 64660
发表于 2018-3-1 11:10:37 | 显示全部楼层 |阅读模式
本文以思科设备Catalyst 3750 为例
在本文档中,这些接口针对跨堆叠 EtherChannel 进行了捆绑:
其中一台 Catalyst 3750 交换机的两个千兆以太网接口
同一堆叠中另一台 Catalyst 3750 交换机的一个千兆以太网接口
其他堆叠中 Catalyst 3750 交换机上的三个千兆以太网接口

Cisco StackWise 互连技术设计具有两个 16 Gb 的计数循环路径。为了高效实现流量的负载均衡,数据包在这两个逻辑计数循环路径之间进行分配,创建 32 Gb 的互连。在 Catalyst 3750 堆叠内,有从任意端口到其他任意端口的双路径。从而保证了最大的正常运行时间,因为如果其中一条路径出现故障,总有备用路径可以使用。Catalyst 3750 支持:
跨堆叠 EtherChannel
跨堆叠 UplinkFast(具有亚秒级故障切换)
堆叠中不同交换机间的跨堆叠等开销路由

链路聚合控制协议 (LACP) 和端口聚合协议 (PAgP)
PAgP 是 Cisco 专有的协议,只能在 Cisco 交换机和许可供应商授权支持 PAgP 的交换机上运行。IEEE 802.3ad 定义了 LACP。LACP 允许 Cisco 交换机管理符合 802.3ad 协议的交换机之间的以太网信道。
如果 Cisco IOS 软件版本 12.2(25)SEC 及以上版本的跨堆叠 EtherChannel 支持 LACP,则无法在跨堆叠 EtherChannel 上启用 PAgP。交换机接口仅会与具有主动或被动模式配置的伙伴接口交换 LACP 数据包。您可以配置最多 16 个端口以形成信道。八个端口使用主动模式,而另外八个则处于备用模式。当任何一个活动的端口发生故障时,备用端口就会成为活动端口。具有 on 模式配置的接口不会交换 PAgP 或 LACP 数据包。
跨堆叠 EtherChannel 支持这些 EtherChannel 模式:
主动 - 使接口处于主动协商状态,在该状态下,接口通过发送 LACP 数据包开始与其他接口进行协商。
被动 - 将接口置于被动协商状态,在该状态下,接口会响应接口接收到的 LACP 数据包,但不会开始 LACP 数据包协商。该设置最大程度地减少了 LACP 数据包的传输。
on - 强制接口成为 EtherChannel,而不交换 PAgP 或 LACP。在 on 模式中,仅当处于 on 模式的接口组与另一处于 on 模式的接口组相连时,才有可用的 EtherChannel。

EtherChannel 和交换机堆叠
如果有端口加入 EtherChannel 的堆叠成员发生故障或脱离堆叠,则堆叠主交换机会从 EtherChannel 中移除发生故障的堆叠成员交换机端口。EtherChannel 的其余端口(如果有)会继续提供连接。
将交换机添加到现有堆叠时,新的交换机会从堆叠主交换机接收正在运行的配置,并自动更新与 EtherChannel 相关的堆叠配置。堆叠成员也会接收到运行信息(有关正在运行的且属于信道成员的端口列表)。
当两个已在其之间配置 EtherChannel 的堆叠合并时,会产生自循环端口。生成树会检测该情况并执行相应操作。胜出的交换机堆叠上的任何 PAgP 或 LACP 配置都不会受影响,但是失败的交换机堆叠上的 PAgP 或 LACP 配置在堆叠重新启动后将丢失。
使用 PAgP 时,如果堆叠主交换机发生故障或脱离堆叠,则会选择新的堆叠主交换机。除非 EtherChannel 的带宽发生变化,否则不会触发生成树再收敛。新的堆叠主交换机将堆叠成员的配置与该堆叠主交换机的配置同步。除非 EtherChannel 有端口处于旧堆叠主交换机上,否则 PAgP 配置在堆叠主交换机更改后不会受影响。
使用 LACP 时,system-id 使用来自堆叠主交换机的堆叠 MAC 地址,并且如果堆叠主交换机更改,则 LACP system-id 也会更改。如果 LACP system-id 更改,则整个 EtherChannel 将会发生振荡,并且 STP 将重新收敛。请使用 stack-mac persistent timer 命令控制堆叠 MAC 地址在主交换机故障切换期间是否更改。

对于跨堆叠 EtherChannel 配置,请确保用于 EtherChannel 的所有端口配置为 LACP 或手动配置在信道组中。请使用 channel-group channel-group-number mode on 接口配置命令,手动将端口配置到信道组。跨堆叠 EtherChannel 不支持 PAgP 协议。
如果对跨堆叠 EtherChannel 进行配置并对交换机堆叠进行分区,则可能会发生环路和转发问题。
配置最多具有两个 10 千兆以太网模块端口的跨堆叠 EtherChannel。
拓扑图
在此网络图中,有两个 Catalyst 3750 交换机堆叠,堆叠 A 和堆叠 B。堆叠 A 有三个交换机成员,而堆叠 B 只有一个交换机成员。EtherChannel 由堆叠 A 的交换机 1 上的两个端口和交换机 3 上的一个端口组成。这些端口连接到堆叠 B 中的三个端口。
网络设置用于将端口配置为中继端口。
配置
本文档使用以下配置:
  • 配置不启用 PAgP 或 LACP 的跨堆叠 EtherChannel
  • 配置启用 LACP 的跨堆叠 EtherChannel

配置不启用 PAgP 或 LACP 的跨堆叠 EtherChannel
此配置示例提供关闭 PAgP 或 LACP 时的跨堆叠 EtherChannel 配置:
Catalyst 3750 交换机堆叠 A
3750switchstackA(config)#interface range gigabitethernet 1/0/4 - 5
3750switchstackA(config-if-range)#channel-group 1 mode on
3750switchstackA(config-if-range)#switchport trunk encapsulation dot1q
3750switchstackA(config-if-range)#switchport mode trunk
3750switchstackA(config)#interface gigabitethernet 3/0/3
3750switchstackA(config-if)#channel-group 1 mode on
3750switchstackA(config-if)#switchport trunk encapsulation dot1q
3750switchstackA(config-if)#switchport mode trunk
Catalyst 3750 交换机堆叠 B
3750switchstackB(config)#interface range gigabitethernet 1/0/2 - 4
3750switchst(config-if-range)#channel-group 1 mode on
3750switchst(config-if-range)#switchport
3750switchst(config-if-range)#switchport trunk encapsulation dot1q
3750switchst(config-if-range)#switchport mode trunk
可以使用以下方法验证 EtherChannel 状态:
3750switchstackA#show interfaces port-channel 1
Port-channel1 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is 0015.c6c1.3003 (bia 0015.c6c1.3003)
  MTU 1500 bytes, BW 300000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Full-duplex, 100Mb/s, link type is auto, media type is unknown
  input flow-control is off, output flow-control is unsupported
  Members in this channel: Gi1/0/4 Gi1/0/5 Gi2/0/3
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:01, output 00:07:06, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 1000 bits/sec, 2 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     2080 packets input, 191872 bytes, 0 no buffer
     Received 1638 broadcasts (0 multicast)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 1616 multicast, 0 pause input
     0 input packets with dribble condition detected
     3242 packets output, 261916 bytes, 0 underruns
     0 output errors, 0 collisions, 7 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 PAUSE output
     0 output buffer failures, 0 output buffers swapped out

3750switchstackA#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
        w - waiting to be aggregated
        d - default port
Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)          -        Gi1/0/4(P)  Gi1/0/5(P)  Gi2/0/3(P)
注意: 此示例显示尝试配置启用 PAgP 的 EtherChannel 时显示的错误消息:
Catalyst 3750 交换机堆叠 A
3750switchstackA(config)#interface range gigabitethernet 1/0/4 - 5
3750switchstackA(config-if-range)#channel-group 1 mode desirable
3750switchstackA(config-if-range)#switchport trunk encapsulation dot1q
3750switchstackA(config-if-range)#switchport mode trunk
3750switchstackA(config)#interface gigabitethernet 3/0/3
3750switchstackA(config-if)#channel-group 1 mode desirable
%With PAgP enabled, all ports in the Channel should belong to the same switch
Command rejected (Port-channel1, Gi2/0/3): Invalid etherchnl mode

配置启用 LACP 的跨堆叠 EtherChannel
此示例启用 LACP 时 EtherChannel 的配置。在跨堆叠 EtherChannel 中支持 LACP 的 IOS 的最低版本是 Cisco IOS 软件版本 12.2(25)SEC。该示例使用主动-主动模式 LACP 配置:
Catalyst 3750 交换机堆叠 A
3750switchstackA(config)#interface range gigabitethernet 1/0/4 - 5
3750switchstackA(config-if-range)#channel-group 1 mode active

!--- This creates port channel 1 and configures it with LACP.

3750switchstackA(config-if-range)#switchport trunk encapsulation dot1q
3750switchstackA(config-if-range)#switchport mode trunk


3750switchstackA(config)#interface gigabitethernet 3/0/3
3750switchstackA(config-if)#channel-group 1 mode active
3750switchstackA(config-if)#switchport trunk encapsulation dot1q
3750switchstackA(config-if)#switchport mode trunk
Catalyst 3750 交换机堆叠 B
3750switchstackB(config)#interface range gigabitethernet 1/0/2 - 4
3750switchst(config-if-range)#channel-group 1 mode active
3750switchst(config-if-range)#switchport trunk encapsulation dot1q
3750switchst(config-if-range)#switchport mode trunk
您可以使用以下方法验证 EtherChannel 状态:
3750switchstackA#show interfaces port-channel 1

Port-channel1 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is 0015.c6c1.3003 (bia 0015.c6c1.3003)
  MTU 1500 bytes, BW 300000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Full-duplex, 100Mb/s, link type is auto, media type is unknown
  input flow-control is off, output flow-control is unsupported
  Members in this channel: Gi1/0/4 Gi1/0/5 Gi2/0/3
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:01, output 00:01:09, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 1000 bits/sec, 1 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     2628 packets input, 236478 bytes, 0 no buffer
     Received 2112 broadcasts (0 multicast)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 2090 multicast, 0 pause input
     0 input packets with dribble condition detected
     3398 packets output, 280241 bytes, 0 underruns
     0 output errors, 0 collisions, 7 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 PAUSE output
     0 output buffer failures, 0 output buffers swapped out

3750switchstackA#show etherchannel 1 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
        w - waiting to be aggregated
        d - default port


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

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)         LACP      Gi1/0/4(P)  Gi1/0/5(P)  Gi2/0/3(P)
此示例显示被动-主动模式 LACP 配置:
Catalyst 3750 交换机堆叠 A
3750switchstackA(config)#interface range gigabitethernet 1/0/4 - 5
3750switchstackA(config-if-range)#channel-group 1 mode passive
3750switchstackA(config-if-range)#switchport trunk encapsulation dot1q
3750switchstackA(config-if-range)#switchport mode trunk


3750switchstackA(config)#interface gigabitethernet 3/0/3
3750switchstackA(config-if)#channel-group 1 mode passive
3750switchstackA(config-if)#switchport trunk encapsulation dot1q
3750switchstackA(config-if)#switchport mode trunk
Catalyst 3750 交换机堆叠 B
3750switchstackB(config)#interface range gigabitethernet 1/0/2 - 4
3750switchst(config-if-range)#channel-group 1 mode active
3750switchst(config-if-range)#switchport trunk encapsulation dot1q
3750switchst(config-if-range)#switchport mode trunk
您可以使用以下方法验证 EtherChannel 状态:
3750switchstackA#show interfaces port-channel 1

Port-channel1 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is 0015.63f6.b704 (bia 0015.63f6.b704)
  MTU 1500 bytes, BW 300000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Full-duplex, 100Mb/s, link type is auto, media type is unknown
  input flow-control is off, output flow-control is unsupported
  Members in this channel: Gi1/0/4 Gi1/0/5 Gi2/0/3
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:00, output 00:07:33, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 1000 bits/sec, 2 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     3436 packets input, 302216 bytes, 0 no buffer
     Received 2807 broadcasts (0 multicast)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 2785 multicast, 0 pause input
     0 input packets with dribble condition detected
     3632 packets output, 306875 bytes, 0 underruns
     0 output errors, 0 collisions, 7 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 PAUSE output
     0 output buffer failures, 0 output buffers swapped out

3750switchstackA#show etherchannel 1 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
        w - waiting to be aggregated
        d - default port


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

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)         LACP      Gi1/0/4(P)  Gi1/0/5(P)  Gi2/0/3(P)
验证

使用本部分可确认配置能否正常运行。
命令输出解释程序(仅限注册用户)(OIT) 支持某些 show 命令。 使用 OIT 可查看对 show 命令输出的分析。
要验证运行 Cisco IOS 系统软件的 Catalyst 3750 交换机中的端口信道,请发出以下命令:
show interfaces port-channel [channel-group-number]
show etherchannel [channel-group-number] summary

发表于 2018-4-17 14:51:40 | 显示全部楼层
感谢楼主分享!
地板 2018-4-17 14:51:40 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2018-7-9 21:49:38 | 显示全部楼层

thank you for sharing
5# 2018-7-9 21:49:38 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2020-2-2 21:14:42 | 显示全部楼层
ddddddddddddddd
6# 2020-2-2 21:14:42 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2020-2-22 22:31:06 | 显示全部楼层
ddddddddddddd
7# 2020-2-22 22:31:06 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-27 01:09 , Processed in 0.109912 second(s), 22 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表