配置端口聚合EtherChannel(以太网通道)实验

实验目的
通过本实验,读者可以掌握如下技能:

  • EtherChannel的工作原理
  • EtherChannel的配置

实验拓扑
在这里插入图片描述
实验步骤
构成EnterChannel的端口必须具有相同的特性,如双工模式、速度和Trunking 的状态等。配置EtherChannel有手支配置和自动配置(PAGP或者LAGP)两种方法,自动配置就是让EtherChannel协商协议自动协商EtherChannel的建立。

Switch0

Switch(config)#hostname S1
S1(config)#interface port-channel 1
Switch(config-if)#exit
//以上是创建以太通道,要指定一个唯一的通道组号,组号的范围是1~6的正整数。要取消EtherChannel时用”no interface port-channel 1”命令

S1(config)#interface f0/13
S1(config-if)#channel-group 1 mode on 

S1(config)#interface f0/14
S1(config-if)#channel-group 1 mode on 
S1(config-if)#exit
//以上将物理接口指定到已创建的通道中

S1(config)#int port-channel 1
S1(config-if)#switchport mode trunk
S1(config-if)#speed 100
S1(config-if)#duplex full
//以上配置通道中的物理接口的速率及双工等属性

S1(config)#port-channel load-balance dst-msc
//以上是配置EtherChannel的负载平衡方式,命令格式为”port-channel load-balance method”,负载平衡的方式有:dst-ip、dst-mac、src-dst-ip、src-dst-mac等

Switch1

Switch(config)#hostname S2
S2(config)#interface port-channel 1

S2(config)#interface f0/13
S2(config-if)#channel-group 1 mode on 

S2(config)#interface f0/14
S2(config-if)#channel-group 1 mode on 
S2(config-if)#exit

S2(config)#int port-channel 1
S2(config-if)#switchport mode trunk
S2(config-if)#speed 100
S2(config-if)#duplex full

S2(config)#port-channel load-balance dst-msc

实验验证
S1#show etherchannel summary
在这里插入图片描述

//可以看到EtherChannel已经形成,”SU”表示EtherChannel正常,如果显示为”SD”,表示把EthernetChannel接口关掉重新开启。

配置PAGP或者LAGP

技术要点

  • 要想把接口配置为PAGP的desirable模式使用命令:”channel-group 1 mode desirable”;
  • 要想把接口配置为PAGP的auto模式使用命令:”channel-group 1 mode auto”;
  • 要想把接口配置为LACP的active模式使用命令:”channel-group 1 mode active”;
  • 要想把接口配置为LACP的passive模式使用命令:”channel-group 1 mode passive”。

在这里进行如下配置:

S1(config)#interface range f0/13 – 14
S1(config-if)#channel-group 1 mode desirable
S2(config)#interface range f0/13 – 14
S2(config-if)#channel-group 1 mode desirable

S1#show etherchannel summary
在这里插入图片描述
//可以看到EtherChannel协商成功。注意:应在链路的两端都进行检查,确认两端都形成以太通道才行

原创文章 53 获赞 323 访问量 1万+

猜你喜欢

转载自blog.csdn.net/Long_UP/article/details/105880475