靜態(tài)方法( 手動(dòng))實(shí)現(xiàn)交換機(jī)鏈路聚合


一、?實(shí)驗(yàn)?zāi)康?/span>
1、了解鏈路聚合技術(shù)的使用場合;
2、熟練掌握鏈路聚合技術(shù)的配置。
二、?應(yīng)用環(huán)境
兩個(gè)實(shí)驗(yàn)室分別使用一臺(tái)交換機(jī)提供20 多個(gè)信息點(diǎn),兩個(gè)實(shí)驗(yàn)室的互通通過一根級(jí)聯(lián)
網(wǎng)線。每個(gè)實(shí)驗(yàn)室的信息點(diǎn)都是百兆到桌面。兩個(gè)實(shí)驗(yàn)室之間的帶寬也是100M,如果實(shí)驗(yàn)
室之間需要大量傳輸數(shù)據(jù),就會(huì)明顯感覺帶寬資源緊張。當(dāng)樓層之間大量用戶都希望以100M
傳輸數(shù)據(jù)的時(shí)候,樓層間的鏈路就呈現(xiàn)出了獨(dú)木橋的狀態(tài),必然造成網(wǎng)絡(luò)傳輸效率下降等后
果。
解決這個(gè)問題的辦法就是提高樓層主交換機(jī)之間的連接帶寬,實(shí)現(xiàn)的辦法可以是采用千
兆端口替換原來的100M 端口進(jìn)行互聯(lián),但這樣無疑會(huì)增加組網(wǎng)的成本,需要更新端口模塊,
并且線纜也需要作進(jìn)一步的升級(jí)。另一種相對經(jīng)濟(jì)的升級(jí)辦法就是鏈路聚合技術(shù)。
顧名思義,鏈路聚合,是將幾個(gè)鏈路作聚合處理,這幾個(gè)鏈路必須是同時(shí)連接兩個(gè)相同
的設(shè)備的,這樣,當(dāng)作了鏈路聚合之后就可以實(shí)現(xiàn)幾個(gè)鏈路相加的帶寬了。比如,我們可以
將4 個(gè)100M 鏈路使用鏈路聚合作成一個(gè)邏輯鏈路,這樣在全雙工條件下就可以達(dá)到800M
的帶寬,即將近1000M 的帶寬。這種方式比較經(jīng)濟(jì),實(shí)現(xiàn)也相對容易。
三、?實(shí)驗(yàn)設(shè)備
1、DCS-3926S 交換機(jī)2 臺(tái)
2、PC 機(jī)2 臺(tái)
3、Console 線1-2 根
4、直通網(wǎng)線?4-8 根
四、?實(shí)驗(yàn)拓?fù)?/span>
?

?
?

五、?實(shí)驗(yàn)要求

如果鏈路聚合成功,則PC1 可以ping 通PC2。
六、?實(shí)驗(yàn)步驟
第一步:正確連接網(wǎng)線,交換機(jī)全部恢復(fù)出廠設(shè)置,做初始配置,避免廣播風(fēng)暴出現(xiàn)
交換機(jī)A:
Switch>enable
Switch#config t
Switch(config)#hostname SwitchA
SwitchA(config)#interface vlan 1
SwitchA(config-if)#ip address 192.168.1.11?255.255.255.0
SwitchA(config-if)#no shutdown
SwitchA(config-if)#exit
SwitchA(config)#spanning-tree vlan 1
SwitchA#write
Building configuration...
[OK]
SwitchA#
?
交換機(jī)B:
Switch>enable
Switch#config t
Switch(config)#hostname SwitchB
SwitchB(config)#interface vlan 1
SwitchB(config-if)#ip address 192.168.1.12 255.255.255.0
SwitchB(config-if)#no shutdown
SwitchB(config-if)#exit
SwitchB(config)#spanning-tree vlan 1
SwitchB(config)#exit
SwitchB#write
Building configuration...
[OK]
SwitchB#
?
第二步:創(chuàng)建port-channel
交換機(jī)A:
SwitchA(config)#interface port-channel 1????????????????//創(chuàng)建鏈路組:port-channel 1?
SwitchA(config-if)#exit
SwitchA#show etherchannel port-channel ???????????????//查看已創(chuàng)建的鏈路組
?

交換機(jī)B:
SwitchB(config)#interface port-channel 1?????????????????????//創(chuàng)建鏈路組:port-channel 1
SwitchB(config-if)#exit
SwitchB#show etherchannel port-channel??????????????????????//查看已創(chuàng)建的鏈路組
?

第三步:手工生成鏈路聚合組
交換機(jī)A:
SwitchA(config)#interface range f0/22 -f0/24???????????????//進(jìn)入F0/22-23-24號(hào)端口范圍
SwitchA(config-if-range)#channel-group 1 mode on?????????//手動(dòng)生成鏈路組
SwitchA(config-if-range)#exit
SwitchA(config)#exit
SwitchA#write
Building configuration...
[OK]
SwitchA#
?
交換機(jī)B:
SwitchB(config)#interface range f0/22 -f0/24??????????//進(jìn)入F0/22-23-24號(hào)端口范圍
SwitchB(config-if-range)#channel-group 1 mode on????????//手動(dòng)生成鏈路組
SwitchB(config-if-range)#exit
SwitchB(config)#exit
SwitchB#write
Building configuration...
[OK]
SwitchB#
驗(yàn)證配置:
交換機(jī)A:
SwitchA#show interface etherchannel
FastEthernet0/22:
Port state = 1
Channel group = 1 ????????Mode = On ??????Gcchange = -
Port-channel ?= Po1 ??????GC = - ?????????Pseudo port-channel = Po1
Port index ???= 0 ????????Load = 0x0 ?????Protocol = -
?
Age of the port in the current state: ?00d:01h:03m:51s
?
FastEthernet0/23:
Port state = 1
Channel group = 1 ????????Mode = On ??????Gcchange = -
Port-channel ?= Po1 ??????GC = - ?????????Pseudo port-channel = Po1
Port index ???= 0 ????????Load = 0x0 ?????Protocol = -
?
Age of the port in the current state: ?00d:01h:03m:51s
?
FastEthernet0/24:
Port state = 1
Channel group = 1 ????????Mode = On ??????Gcchange = -
Port-channel ?= Po1 ??????GC = - ?????????Pseudo port-channel = Po1
Port index ???= 0 ????????Load = 0x0 ?????Protocol = -
?
Age of the port in the current state: ?00d:01h:03m:51s
?
----
Port-channel1:Port-channel1
Age of the Port-channel ??= 00d:01h:03m:51s
Logical slot/port ??= 2/1 ????????????Number of ports = 3
GC ?????????????????= 0x00000000 ?????HotStandBy port = null
Port state ?????????=
Protocol ???????????= ??3
Port Security ??????= Disabled
?
Ports in the Port-channel:
?
Index ??Load ??Port ????EC state ???????No of bits
------+------+------+------------------+-----------
??0 ????00 ????Fa0/22 ??On ????????????????0
??0 ????00 ????Fa0/23 ??On ????????????????0
??0 ????00 ????Fa0/24 ??On ????????????????0
Time since last port bundled: ???00d:01h:03m:51s ???Fa0/24
SwitchA#
?
交換機(jī)B:
SwitchB#show interface etherchannel
FastEthernet0/22:
Port state = 1
Channel group = 1 ????????Mode = On ??????Gcchange = -
Port-channel ?= Po1 ??????GC = - ?????????Pseudo port-channel = Po1
Port index ???= 0 ????????Load = 0x0 ?????Protocol = -
?
Age of the port in the current state: ?00d:01h:04m:52s
?
FastEthernet0/23:
Port state = 1
Channel group = 1 ????????Mode = On ??????Gcchange = -
Port-channel ?= Po1 ??????GC = - ?????????Pseudo port-channel = Po1
Port index ???= 0 ????????Load = 0x0 ?????Protocol = -
?
Age of the port in the current state: ?00d:01h:04m:52s
?
FastEthernet0/24:
Port state = 1
Channel group = 1 ????????Mode = On ??????Gcchange = -
Port-channel ?= Po1 ??????GC = - ?????????Pseudo port-channel = Po1
Port index ???= 0 ????????Load = 0x0 ?????Protocol = -
?
Age of the port in the current state: ?00d:01h:04m:52s
?
----
Port-channel1:Port-channel1
Age of the Port-channel ??= 00d:01h:04m:52s
Logical slot/port ??= 2/1 ????????????Number of ports = 3
GC ?????????????????= 0x00000000 ?????HotStandBy port = null
Port state ?????????=
Protocol ???????????= ??3
Port Security ??????= Disabled
?
Ports in the Port-channel:
?
Index ??Load ??Port ????EC state ???????No of bits
------+------+------+------------------+-----------
??0 ????00 ????Fa0/22 ??On ????????????????0
??0 ????00 ????Fa0/23 ??On ????????????????0
??0 ????00 ????Fa0/24 ??On ????????????????0
Time since last port bundled: ???00d:01h:04m:52s ???Fa0/24
SwitchB#
第四步:使用ping命令驗(yàn)證 ?
使用PC1 ping PC2

使用PC1 ping PC2

注意事項(xiàng)和排錯(cuò)
1、為使Port Channel正常工作,Port Channel的成員端口必須具備以下相同的屬性:
a) 端口均為全雙工模式;
b) 端口速率相同;
c) 端口的類型必須一樣,比如同為以太口或同為光纖口;
d) 端口同為Access端口并且屬于同一個(gè)VLAN或同為Trunk端口;
e) 如果端口為Trunk端口,則其Allowed VLAN和Native VLAN屬性也應(yīng)該相同。

