实验:端口聚合EtherChannel配置

1.实验目的

通过本实验,读者可以掌握如下技能:
①EtherChannel的工作原理;
②EtherChannel的配置。

2.实验拓扑

实验拓扑图如图下所示。

实验 拓扑图

3.实验步骤

构成EnterChannel的端口必须具有相同的特性,如双工模式、速度和Trunking 的状态等。配置EtherChannel有手支配置和自动配置(PAGP或者LAGP)两种方法,自动配置就是让EtherChannel协商协议自动协商EtherChannel的建立。

(1) 手动配置EtherChannel

S1(config)#interface port-channel 1
//以上是创建以太通道,要指定一个唯一的通道组号,组号的范围是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)#int port-channel 1
S1(config-if)#switchport mode trunk
S1(config-if)#speed 100
S1(config-if)#duplex full
//以上配置通道中的物理接口的速率及双工等属性
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)#int port-channel 1
S2(config-if)#switchport mode trunk
S2(config-if)#speed 100
S2(config-if)#duplex full
S1(config)#port-channel load-balance dst-msc
S2(config)#port-channel load-balance dst-msc
//以上是配置EtherChannel的负载平衡方式,命令格式为”port-channel load-balance method”,负载平衡的方式有:dst-ip、dst-mac、src-dst-ip、src-dst-mac等

(2)查看EtherChannel信息

S1#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)          -        Fa0/13(Pd)  Fa0/14(P)
//可以看到EtherChannel已经形成,”SU”表示EtherChannel正常,如果显示为”SD”,表示把EthernetChannel接口关掉重新开启。4)配置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/1314
S1(config-if)#channel-group 1 mode desirable
S2(config)#interface range f0/1314
S2(config-if)#channel-group 1 mode desirable


S1#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)          -        Fa0/13(Pd)  Fa0/14(P)
//可以看到EtherChannel协商成功。注意:应在链路的两端都进行检查,确认两端都形成以太通道才行

在这里插入图片描述

发布了35 篇原创文章 · 获赞 2 · 访问量 726

猜你喜欢

转载自blog.csdn.net/qq_42452926/article/details/104656528