Cisco简单配置(十三)—链路聚合

链路聚合能够使用两台设备之间的多余物理链路创建一条逻辑链路,可使得物理链路之间能够进行负载共享,而不是通过STP来阻塞一条或多条链路。接入层和分布层交换机之间的汇聚链路上可以使用更快的链路。

这里注意的是,链路汇聚(EthernetChannel)是链路聚合的其中一种形式。

EtherChannel 技术最初是由思科开发的,作为一种将多个快速以太网或千兆以太网端口集合到一个逻辑通道中的 LAN 交换机到交换机技术。 当配置了 EtherChannel 时,所产生的虚拟接口称为端口通道。物理接口捆绑在一起成为一个端口通道接口。

EtherChannel 优点:

  • 大多数配置任务可以在 EtherChannel 接口(而不是在每个端口上)完成,这能确保链路中的配置一致。
  • EtherChannel 依赖于现有的交换机端口。无需将链路升级到拥有更高带宽的更快、更昂贵的连接。
  • 负载均衡在属于同一 EtherChannel 的链路之间进行。根据硬件平台,可以实施一种或多种负载均衡方法。 这些方法包括物理链路上源 MAC 到目的 MAC 负载均衡或源 IP 到目的 IP 负载均衡。
  • EtherChannel 创建的汇聚被视为一个逻辑链路。当两台交换机之间存在多个 EtherChannel 包时,STP 可能会阻塞其中一个包,以防止交换环路。当 STP 阻塞其中一个冗余链路时,它就阻塞了整个 EtherChannel。这将阻塞属于此 EtherChannel 链路的所有端口。如果只有一个 EtherChannel 链路,则 EtherChannel 中的所有物理链路都处于活动状态,因为 STP 只看到一个(逻辑)链路。
  • EtherChannel 会,提供冗余,因为总体链路被视为一个逻辑连接。

EtherChannel 在一台交换机和另一台交换机或主机之间提供最高为 800 Mb/s或 8 Gb/s的全双工带宽。目前每个 EtherChannel 最多可由八个配置兼容的以太网端口组成

EtherChannel组成成员的端口配置必须一致

拓扑图搭建

 

S1、S2、S3的详细配置

一定要注意:配置EthernetChannel的时候要关闭端口,配置完后再打开。否则,EtherChannel Misconfig Guard 可能将这些端口置于错误禁用状态。

Switch>enable 
Switch#configure 
Switch(config)#hostname S1
S1(config)#interface range fastEthernet 0/21-22
S1(config-if-range)#switchport mode trunk 
S1(config-if-range)#shutdown 
S1(config-if-range)#channel-group 1 mode desirable 
S1(config-if-range)#no shutdown 
S1(config-if-range)#exit
S1(config)#interface port-channel 1
S1(config-if)#switchport mode trunk 
S1(config-if)#exit
S1(config)#interface range gigabitEthernet 0/1-2
S1(config-if-range)#switchport mode trunk 
S1(config-if-range)#shutdown 
S1(config-if-range)#channel-group 2 mode active 
S1(config-if-range)#no shutdown 
S1(config-if-range)#exit
S1(config)#interface port-channel 2
S1(config-if)#switchport mode trunk 
S1(config-if)#exit
S1(config)#spanning-tree vlan 1 root primary 
Switch>enable 
Switch#configure 
Switch(config)#hostname S2
S2(config)#interface range gigabitEthernet 0/1-2
S2(config-if-range)#switchport mode trunk 
S2(config-if-range)#shutdown 
S2(config-if-range)#channel-group 2 mode active 
S2(config-if-range)#no shutdown 
S2(config-if-range)#exit
S2(config)#interface port-channel 2
S2(config-if)#switchport mode trunk 
S2(config-if)#exit
S2(config)#interface range fastEthernet 0/23-24
S2(config-if-range)#switchport mode trunk 
S2(config-if-range)#shutdown
S2(config-if-range)#channel-group 3 mode passive 
S2(config-if-range)#no shutdown 
S2(config-if-range)#exit
S2(config)#interface port-channel 3
S2(config-if)#switchport mode trunk 
S2(config-if)#exit
Switch>enable 
Switch#configure 
Switch(config)#hostname S3
S3(config)#interface range fastEthernet 0/21-22
S3(config-if-range)#switchport mode trunk 
S3(config-if-range)#shutdown 
S3(config-if-range)#channel-group 1
S3(config-if-range)#channel-group 1 mode desirable 
S3(config-if-range)#no shutdown 
S3(config-if-range)#exit
S3(config)#interface port-channel 1
S3(config-if)#switchport mode trunk 
S3(config)#interface range fastEthernet 0/23-24
S3(config-if-range)#switchport mode trunk 
S3(config-if-range)#shutdown 
S3(config-if-range)#channel-group 3 mode active 
S3(config-if-range)#no shutdown 
S3(config-if-range)#exit
S3(config)#interface port-channel 3
S3(config-if)#switchport mode trunk 
S3(config-if)#exit

查看链路配置信息

 

 

 

  • 5
    点赞
  • 70
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值