杭州校区切换校区
图标

学习文章

当前位置:首页 > >学习文章 > >

EtherChannel

发布时间: 2017-06-16 14:44:51

                                    

教学楼和宿舍楼之间经常要进行数据的互访,那么三层交换机之间的负载就比较高。如果中间线路的带宽跟不上,就会造成通信的瓶颈。EtherChannel可以将中间的多条链路进行捆绑,那么带宽=线路*每一条的带宽。本来有多个接口,但是进行捆绑之后,多个接口就被当做一个接口进行对待。后续对f0/0和f0/1的配置就是对port-channel  ID这个接口进行配置。

                                                   

可以实现负载均衡(基于源、基于目的、基于源目),冗余(所有的线路都down了,接口才不能用)。有两种协议帮助我们去部署EtherChannel,一个是思科的私有协议(PAgP),一个是IEEE 802.3ad的标准(LACP)。

PAgP

 on

 Channel member without negotiation(no protocol)

 不协商,强制性的去配置为PagP

 Desirable

 Actively ask if the other side can/will

 积极的去协商,主动去发送报文

 Auto

 Passively wait for other side to ask

 被动,如果收到协商报文那么就启动

Off

 EtherChannel not configured on interface

 

 on

 Desirable

 Auto

 Off

 on

 Channel

 Channel

 Channel

 

 Desirable

 Channel

 Channel

 Channel

 

 Auto

 Channel

 Channel

  

 Off

    

LACP

 on

 Channel member without negotiation(no protocol)

 不协商,强制性的去配置为PagP

 Active

 Actively ask if the other side can/will

 积极的去协商,主动去发送报文

 Passive

 Passively wait for other side to ask

 被动,如果收到协商报文那么就启动

 off
 EtherChannel not configured on interface



 on
 Active
 Passive
 Off
 On
 Channel
 Channel


 Active
 Channel
 Channel
 Channel

 Passive

 Channel


 Off




二层配置

---------------------选择用于channel的端口

R1(config)#int    range    fastEthernet 0/1 -2

R1(config-if-range)#switchport

---------------------选择PAgP或LACP

R1(config-if-range)#channel-protocol     pagp/lacp

---------------------在接口上配置channel-group

         ---------------------设置channel-group  ID,两端的ID必须一致

         ---------------------根据特定的协议,选择接口模式

R1(config-if-range)#channel-group    1    mode   on


---------------------配置etherchannel逻辑接口

R2#show     etherchannel   summary

Group Port-channel  Ports

-----+------------+-----------------------------------------------------------

1     Po1(SU)     Fa0/1(P)   Fa0/2(P) 

R2(config)#int   port-channel 1

R2(config-if)#switchport   mode   trunk

R2(config-if)#switchport   trunk   encapsulation   dot1q

给vlan1配置IP地址,在查看trunk信息,发现了port-channel的接口

             


注意:

1、  port-channel接口一旦建立完成之后,就形成了一个逻辑的接口,后续针对该接口的配置在port-channel逻辑接口中完成

2、  较大支持8个端口做捆绑

3、  Port-channel接口不能成为SPAN的目的接口

4、  隶属于同一个port-channel的物理接口需要有相同的如下配置

a)         相同的speed和duplex

b)        相同的接口模式(trunk、access)

c)         如果是trunk模式,那么native  vlan及allowed  vlan需相同

d)        如果是access模式,所属的vlan需要相同

三层配置

恢复交换机

R2(config)#no   int   port-channel   1

R2(config)#default   interface   f0/1

R2(config)#default   interface   f0/2
将接口设置为三层接口

R2(config)#int       range     f0/1   -2

R2(config-if-range)#no   switchport

R2(config-if-range)#channel-group     1   mode     on


R2#show     etherchannel   summary

--------二层配置

Int  range     f0/23  -24

  Switchport

  Channel-group   1  mode  on

Int  port-channel  1

  Switchport     trunk   encapsulation   dot1q

  Switchport     mode   trunk

--------三层配置

Int  range     f0/23  -24

  No   Switchport

  Channel-group   1  mode  on

Int  port-channel  1

  Ip   address   1.1.1.1   255.255.255.0

上一篇: NAC技术

下一篇: 十项超级用户技巧有效提升Windows 10生产力

在线咨询 ×

您好,请问有什么可以帮您?我们将竭诚提供最优质服务!