思科实验4.2.1.3-Packet Tracer - 配置 EtherChannel

Packet Tracer - 配置 EtherChannel
目标

第 1 部分:配置基本交换机设置

第 2 部分:通过思科 PAgP 配置 EtherChannel

第 3 部分:配置 802.3ad LACP EtherChannel

第 4 部分:配置冗余 EtherChannel 链路

背景信息

刚刚安装了三个交换机。 交换机之间存在冗余上行链路。 通常,只能使用其中一条链路;否则,可能会发生桥接环路。 但,仅使用一条链路只利用了可用带宽的一半。 EtherChannel 允许最多八条冗余链路捆绑在一起形成一个逻辑链路。 在本实验中,您将配置端口汇聚协议 (PAgP)(一种思科 EtherChannel 协议)和链路汇聚控制协议 (LACP)(EtherChannel 的 IEEE 802.3ad 开放标准版本)。

第 1 部分:    配置基本交换机设置
第 1 步:    配置基本交换机参数。

a.     根据拓扑图为每个交换机分配一个主机名。

b.    将所有必需的端口配置为中继,具体取决于设备之间的连接。

注:如果端口配置了动态自动模式,并且未将端口的模式设置为中继,则链路不会建立中继并保持接入端口。 2960 交换机的默认模式是动态自动模式。


第 2 部分:    通过思科 PAgP 配置 EtherChannel

注:配置 EtherChannel 时,建议在将两个设备上分组的物理端口配置成通道组之前,先关闭这些端口。 否则,EtherChannel Misconfig Guard 可能将这些端口置于错误禁用状态。 配置完 EtherChannel 后,可重新启用端口和端口通道。

第 1 步:    配置端口通道 1。

a.     为此练习创建的第一个 EtherChannel 会在 S1 和 S3 之间汇聚端口 F0/22 和 F0/21。 使用 show interfaces trunk 命令来确保您拥有这两个链路的活动中继链路。

b.    在两个交换机上,使用 channel-group 1 mode desirable 命令将端口 F0/21 和 F0/22 添加到端口通道 1。 mode desirable 选项使交换机能够主动协商以建立 PAgP 链路。

c.     通过首先输入 interface port-channel number 命令,然后再输入 switchport mode trunk 命令,将逻辑接口配置为中继。 将此配置添加到两个交换机中。

第 2 步:    验证端口通道 1 状态。

a.     发出 show etherchannel summary 命令来验证 EtherChannel 是否正在两台交换机上工作。 此命令显示 EtherChannel 的类型、所使用的端口以及端口状态。

b.    如果 EtherChannel 没有出现,请关闭 EtherChannel 两端的物理接口,然后再次打开这些接口。 这涉及到在这些接口上使用 shutdown 命令,几秒钟后再使用 no shutdown 命令。

show interfaces trunk 和 show spanning-tree 命令还将端口通道显示为一个逻辑链路。

第 3 部分:    配置 802.3ad LACP EtherChannel
第 1 步:    配置端口通道 2。

a.     2000 年,IEEE 发布了 802.3ad,这是 EtherChannel 的开放标准版本。 使用以前的命令,将端口 G0/1 和 G0/2 上 S1 与 S2 之间的链路配置为 LACP EtherChannel。 您必须在 S1 上使用不同的端口通道号,而不是 1,因为您已经在上一步中使用过该端口通道号了。 要将端口通道配置为 LACP,请使用接口配置模式 channel-group number mode active 命令。 活动模式表示交换机主动尝试将该链接协商为 LACP,而不是 PAgP。

第 2 步:    验证端口通道 2 状态。

a.     使用第 1 部分第 2 步中的 show 命令验证端口通道 2 的状态。 查找每个端口使用的协议。

第 4 部分:    配置冗余 EtherChannel 链路
第 1 步:    配置端口通道 3。

输入 channel-group number mode 命令的方式有多个:

S2(config)# interface range f0/23 - 24
S2(config-if-range)# channel-group 3 mode ?
  active     Enable LACP unconditionally
  auto       Enable PAgP only if a PAgP device is detected
  desirable  Enable PAgP unconditionally
  on         Enable Etherchannel only
  passive    Enable LACP only if a LACP device is detected
a.     在交换机 S2 上,使用 channel-group 3 mode passive 命令将端口 F0/23 和 F0/24 添加到端口通道 3。 passive 选项指示只有在检测到其他 LACP 设备时,才需要使用 LACP。 将端口通道 3 静态配置为中继接口。

b.    在交换机 S3 上,使用 channel-group 3 mode active 命令将端口 F0/23 和 F0/24 添加到端口通道 3。 active 选项表示您希望交换机无条件地使用 LACP。 将端口通道 3 静态配置为中继接口。

第 2 步:    验证端口通道 3 状态。

a.     使用第 1 部分第 2 步中的 show 命令验证端口通道 3 的状态。 查找每个端口使用的协议。

b.    端口通道 2 不起作用,因为生成树协议将一些端口置于阻塞模式。 遗憾的是,这些端口是千兆端口。 要恢复这些端口,请将 S1 配置为 VLAN 1 的主根,或将优先级设置为 24576。

S1

en
conf t
 hostname S1
 interface range g0/1-2
 switchport mode trunk
 
 interface range f0/21-22
 switchport mode trunk
 
 end
config t
  interface range f0/21-22
 shutdown
 channel-group 1 mode desirable
 no shutdown
 interface port-channel 1
 switchport mode trunk
 interface range g0/1-2
 shutdown
 channel-group 2 mode active
 no shutdown
 interface port-channel 2
 switchport mode trunk
 spanning-tree vlan 1 root primary

S2

en
conf t
 hostname S2
 interface range g0/1-2
 switchport mode trunk
 interface range f0/23-24
 switchport mode trunk
 end
conf t
 interface range g0/1 - 2
 shutdown
 channel-group 2 mode active
 no shutdown
 interface port-channel 2
 switchport mode trunk
 
 interface range f0/23 - 24
 shutdown
 channel-group 3 mode passive
 no shutdown
 interface port-channel 3
 switchport mode trunk

S3

en
conf t
 hostname S3

 interface range f0/21 - 24
 switchport mode trunk
 end
conf t
 interface range f0/21 - 22
 shutdown
 channel-group 1 mode desirable
 no shutdown
 
 interface port-channel 1
 switchport mode trunk

 interface range f0/23 - 24
 shutdown
 channel-group 3 mode active
 no shutdown
 interface port-channel 3
 switchport mode trunk

 

 

  • 9
    点赞
  • 57
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值