【實驗拓撲】

【實驗要求】
一般是把核心交換機之間的線路捆綁成Etherchannel(以太通道),防止spanning-tree的情況,解決核心交換機之間的瓶頸。兩交換之間最多支援捆綁8條線路成以太通道。既可以配成2層的,也可以配置3層的以太通道。
以下在模拟器中隻能配置2層的以太通道
【實驗配置】
首先通過show cdp neighbor來檢視交換機之間通過哪些接口連接配接
sw1(config)#do sh cdp neighbor
Capability Codes: R - Router, T -
Trans
Bridge
, B -
Source
Route
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
Router Fas 0/15 149 R S I 3640 Fas 0/15
Router Fas 0/14 149 R S I 3640 Fas 0/14
Sw1:
sw1(config)#interface range f0/14 -15
sw1(config-if-range)#switchport trunk encapsulation dot1q
sw1(config-if-range)#switchport mode trunk
sw1(config-if-range)#
*Mar 1 00:05:35.095: %DTP-5-TRUNKPORTON: Port Fa0/14-15 has become dot1q trunk
sw1(config-if-range)#channel-group 1 mode on
Creating a port-channel interface Port-channel1
*Mar 1 00:05:46.931: %EC-5-BUNDLE: Interface Fa0/14 joined port-channel Po1
*Mar 1 00:05:47.183: %EC-5-BUNDLE: Interface Fa0/15 joined port-channel Po1
*Mar 1 00:05:49.783: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
Sw2:
sw2(config)#int range f0/14 -15
sw2(config-if-range)#switchport trunk encapsulation dot1q
sw2(config-if-range)#switchport mode trunk
sw2(config-if-range)#
*Mar 1 00:06:42.503: %DTP-5-TRUNKPORTON: Port Fa0/14-15 has become dot1q trunk
sw2(config-if-range)#channel-group 1 mode on
*Mar 1 00:06:50.931: %EC-5-BUNDLE: Interface Fa0/14 joined port-channel Po1
*Mar 1 00:06:51.199: %EC-5-BUNDLE: Interface Fa0/15 joined port-channel Po1
*Mar 1 00:06:53.675: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
我們通過show etherchannel summary來驗證
sw1(config-if-range)#do show etherchannel summary
Flags: D - down P - in port-channel
I - stand-alone s - suspended
R - Layer3 S - Layer2
U - in use
Group Port-channel Ports
-----+------------+-----------------------------------------------------------
1 Po1(SU) Fa0/14(P) Fa0/15(P)
以及通過show etherchannel 1 detail 檢視具體的資訊
sw1(config-if)#do show etherchannel 1 detail
Group state = L2
Ports: 2 Maxports = 8
Port-channels: 1 Max Port-channels = 1
Ports in the group:
-------------------
Port: Fa0/14
------------
Port state = Up Mstr In-Bndl
Channel group = 1 Mode = On/FEC Gcchange = 0
Port-channel = Po1 GC = 0x00010001 Pseudo port-channel = Po1
Port index = 0
Age of the port in the current state: 00d:00h:05m:50s
Port: Fa0/15
Port-channel = Po1 GC = 0x00010001 Pseudo port-channel = Po1
Port index = 1
Age of the port in the current state: 00d:00h:05m:49s
Port-channels in the group:
----------------------
Port-channel: Po1
Age of the Port-channel = 00d:00h:05m:52s
Logical slot/port = 8/0 Number of ports = 2
GC = 0x00010001 HotStandBy port = null
Port state = Port-channel Ag-Inuse
Ports in the Port-channel:
Index Port EC state
------+------+------------
0 Fa0/14 on
1 Fa0/15 on
Time since last port bundled: 00d:00h:05m:52s Fa0/15