实验时间正序目录
第六章 快速生成树
实验背景
学校为了开展计算机教学和网络办公,建立的一个计算机教室和一个校办公区,这
两处的计算机网络通过两台交换机互联组成内部校园网,为了提高网络的可靠性,
作为网络管理员,你要用 2 条链路将交换机互连,现要求在交换机上做适当配置,
是网络避免环路。
Packet Tracer拓扑图
IP配置
计算机0
IP: 192.168.1.2
子网掩码: AUTO
网关: 192.168.1.1
计算机1
IP: 192.168.1.3
子网掩码: AUTO
网关: 192.168.1.1
交换机配置
交换机0
Switch>en
Switch#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.C94D.2E2B
Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0006.2A71.6595
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/1 Root FWD 19 128.1 P2p
Fa0/2 Altn BLK 19 128.2 P2p
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S1
S1(config)#int fa 0/3
S1(config-if)#exit
S1(config)#int rang fa 0/1-2
S1(config-if-range)#switch mode trunk
S1(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
exit
S1(config)#spanning-tree mode rapid-pvst
S1(config)#end
交换机1
Switch>en
Switch#conf t
Switch(config)#hostname S2
S2(config)#int range fa 0/1-2
S2(config-if-range)#switch mode trunk
S2(config-if-range)#exit
S2(config)#spanning-tree mode rapid-pvst
S2(config)#end
S2#
%SYS-5-CONFIG_I: Configured from console by console
show spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0001.C94D.2E2B
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0001.C94D.2E2B
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/2 Desg FWD 19 128.2 P2p
网络检测
计算机0 ping 计算机1
检测两主机之间可以正常通信
交换机配置更改
交换机1
S2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S2(config)#int fa 0/1
S2(config-if)#shut
拓扑变更
网络检测
计算机0 ping 计算机1
检测两主机之间依然可以正常通信