配置端口聚合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協商成功。注意:應在鏈路的兩端都進行檢查,確認兩端都形成以太通道才行

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章