![](https://csdnimg.cn/release/download_crawler_static/86585446/bg1.jpg)
1
实验 1.端口聚合提供冗余备份链路
一、实验目的
理解链路聚合的配置及原理。
二.技术原理
端口聚合又称链路聚合,是指两台交换机之间在物理上将多个端口连接起来,将
多条链路聚合成一条逻辑链路。从而增大链路带宽,解决交换网络中因带宽引起
的网络瓶颈问题。多条物理链路之间能够相互冗余备份,其中任意一条链路断开,
不会影响其他链路的正常转发数据。
端口聚合遵循 IEEE 802.3ad 协议的标准。
三.实现功能
增加交换机之间的传输带宽,并实现链路冗余备份。
四.实验设备
S2126G(两台),PC(两台),直连线(四条)
五.实验拓扑
六.实验步骤
1.交换机 A 的基本配置。
S2126G-1>enable 14
Password:
S2126G-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
S2126G-1(config)#vlan 10
2012-05-02 16:49:40 @5-CONFIG:Configured from outband
F0/5
1
F0/5
2
![](https://csdnimg.cn/release/download_crawler_static/86585446/bg2.jpg)
2
S2126G-1(config-vlan)#name sales
2012-05-02 16:50:06 @5-CONFIG:Configured from outband
S2126G-1(config-vlan)#exit
2012-05-02 16:50:11 @5-CONFIG:Configured from outband
S2126G-1(config)#interface fastethernet 0/5
2012-05-02 16:50:42 @5-CONFIG:Configured from outband
S2126G-1(config-if)#switchport access vlan 10
2012-05-02 16:51:03 @5-CONFIG:Configured from outband
S2126G-1(config-if)#exit
2012-05-02 16:51:09 @5-CONFIG:Configured from outband
S2126G-1(config)#exit
2012-05-02 16:51:23 @5-CONFIG:Configured from outband
S2126G-1#show vlan id 10
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
10 sales active Fa0/5
2.在交换机 SwitchA 上配置聚合端口。
S2126G-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
S2126G-1(config)#interface aggregateport 1
2012-05-02 16:52:55 @5-CONFIG:Configured from outband
S2126G-1(config-if)#switchport mode trunk
2012-05-02 16:53:05 @5-CONFIG:Configured from outband
S2126G-1(config-if)#exit
2012-05-02 16:53:07 @5-CONFIG:Configured from outband
S2126G-1(config)#interface range fastethernet 0/1-2
2012-05-02 16:53:23 @5-CONFIG:Configured from outband
S2126G-1(config-if-range)#port-group 1
2012-05-02 16:53:30 @5-CONFIG:Configured from outband
S2126G-1(config-if-range)#exit
2012-05-02 16:53:36 @5-CONFIG:Configured from outband
S2126G-1(config)#exit
2012-05-02 16:53:38 @5-CONFIG:Configured from outband
S2126G-1#show aggregateport 1 summary
AggregatePort MaxPorts SwitchPort Mode Ports
------------- -------- ---------- ------ -----------------------
Ag1 8 Enabled Trunk Fa0/1 , Fa0/2
S2126G-1#
2012-05-02 16:56:59 @5-LINKUPDOWN:Fa0/5 changed state to up
2012-05-02 16:57:55 @5-LINKUPDOWN:Fa0/5 changed state to down
2012-05-02 16:58:05 @5-LINKUPDOWN:Ag1 changed state to up
2012-05-02 16:58:07 @5-LINKUPDOWN:Ag1 changed state to down
![](https://csdnimg.cn/release/download_crawler_static/86585446/bg3.jpg)
3
2012-05-02 16:58:10 @5-LINKUPDOWN:Ag1 changed state to up
2012-05-02 17:00:30 @5-LINKUPDOWN:Fa0/5 changed state to up
2012-05-02 17:00:30 @5-LINKUPDOWN:Fa0/5 changed state to down
2012-05-02 17:00:32 @5-LINKUPDOWN:Fa0/5 changed state to up
3.交换机 B 的基本配置。
S2126G-2>enable 14
Password:
S2126G-2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
S2126G-2(config)#
S2126G-2(config)#vlan 10
2012-05-02 16:48:45 @5-CONFIG:Configured from outband
S2126G-2(config-vlan)#name sales
2012-05-02 16:48:55 @5-CONFIG:Configured from outband
S2126G-2(config-vlan)#exit
2012-05-02 16:49:00 @5-CONFIG:Configured from outband
S2126G-2(config)#interface fastethernet0/5
2012-05-02 16:49:48 @5-CONFIG:Configured from outband
S2126G-2(config-if)#switchport access vlan 10
2012-05-02 16:50:17 @5-CONFIG:Configured from outband
S2126G-2(config-if)#exit
2012-05-02 16:50:55 @5-CONFIG:Configured from outband
S2126G-2(config)#exit
2012-05-02 16:50:59 @5-CONFIG:Configured from outband
S2126G-2#show vlan id 10
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
10 sales active Fa0/5
4. 在交换机 SwitchB 上配置聚合端口。
S2126G-2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
S2126G-2(config)#interface aggregateport 1
2012-05-02 16:52:45 @5-CONFIG:Configured from outband
S2126G-2(config-if)#switchport mode trunk
2012-05-02 16:52:57 @5-CONFIG:Configured from outband
S2126G-2(config-if)#exit
2012-05-02 16:53:02 @5-CONFIG:Configured from outband
S2126G-2(config)#interface range fastethernet 0/1-2
2012-05-02 16:53:35 @5-CONFIG:Configured from outband
S2126G-2(config-if-range)#port-group 1
2012-05-02 16:53:48 @5-CONFIG:Configured from outband
S2126G-2(config-if-range)#exit
2012-05-02 16:53:58 @5-CONFIG:Configured from outband
S2126G-2(config)#exit
![](https://csdnimg.cn/release/download_crawler_static/86585446/bg4.jpg)
4
2012-05-02 16:54:00 @5-CONFIG:Configured from outband
S2126G-2#show aggregateport 1 summary
AggregatePort MaxPorts SwitchPort Mode Ports
------------- -------- ---------- ------ -----------------------
Ag1 8 Enabled Trunk Fa0/1 , Fa0/2
S2126G-2#
2012-05-02 16:57:13 @5-LINKUPDOWN:Ag1 changed state to up
2012-05-02 16:57:14 @5-LINKUPDOWN:Ag1 changed state to down
2012-05-02 16:57:17 @5-LINKUPDOWN:Ag1 changed state to up
2012-05-02 17:00:08 @5-LINKUPDOWN:Fa0/5 changed state to up
2012-05-02 17:00:10 @5-LINKUPDOWN:Fa0/5 changed state to down
2012-05-02 17:00:12 @5-LINKUPDOWN:Fa0/5 changed state to up
2012-05-02 17:00:15 @5-LINKUPDOWN:Fa0/5 changed state to down
2012-05-02 17:00:33 @5-LINKUPDOWN:Fa0/5 changed state to up
2012-05-02 17:02:23 @5-LINKUPDOWN:Fa0/5 changed state to down
2012-05-02 17:02:25 @5-LINKUPDOWN:Fa0/5 changed state to up
Press RETURN to get started!
5.验证当交换机之间的一条链路断开时,PC1 与 PC2 仍能互相通信。
C:\Documents and Settings\admin>ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time<1ms TTL=128
Reply from 192.168.1.2: bytes=32 time<1ms TTL=128
Reply from 192.168.1.2: bytes=32 time<1ms TTL=128
Reply from 192.168.1.2: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.1.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
实验 2.快速生成树配置
一、实验目的
理解快速生成树协议 RSTP 的配置及原理。
二.技术原理
生成树协议,作用是在交换网络中提供冗余备份链路,并且解决交换网络中的环
路问题。
生成树协议是利用 SPA 算法,并存在交换环路的网络中生成一个没有环路的树形
网络。运用该算法将交换网络冗余的备份链路逻辑上断开,当主要链路出现故障
时,能够自动切换到备份链路,保证数据的正常转发。
生成树协议目前常见的版本有 STPSS,RSTP,MSTP。
生成树协议的特点是收敛时间长。当主要链路出现故障以后,到切换到备份链路
评论0