【实训4.1】配置STP

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

SWA(config-if)#switchport mode trunk
其他交换机都参照 SWA 的相同配置。
检查每个 VLAN 的 STP 树
SWA#show spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface
Role Sts Cost
Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Address 0090.0C12.573A
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/8
Desg FWD 19
128.8 P2p
SWA#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieee
Root ID Priority 32770
Address 0003.E49E.DC26
This bridge is the root
//SWA3560 变成根网桥了
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)
Address 0090.0C12.573A
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0003.E49E.DC26
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface
SWC#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0003.E49E.DC26 This bridge is the root
//表示该交换机就是根网桥
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Role Sts Cost
Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/2
Root FWD 19
128.2 P2p
Fa0/3 SWC:
Desg FWD 19
128.3 P2p
记录 STP 的缺省配置:
128.4 P2p
根网桥
根端口
指定端口
阻塞端口
3.STP基本配置
将网络中 SWA 设置为根网桥:
SWA (config)# spanning-tree vlan 1 root primary //直接配置 SWA 为主根网桥,即直接把优先级降低为 24576
或 SWA (config)#spanning-tree vlan 1 priority 4096
Address 0090.0C12.573A
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)
Role Sts Cost
Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/7
Desg FWD 19
128.7 P2p
Fa0/6 SWD:
Desg FWD 19
128.6 P2pswd2950-2
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0090.0C12.573A
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//表明运行的是 IEEE 的 802.1d 的 STP 协议
//根网桥的优先级,默认为 32768,VLAN 1 的 STP 加 1
Address 0003.E49E.DC26
//根网桥的 MAC 地址
Cost
19
//从本交换机到达根桥的 Cost 值
Port
8(FastEthernet0/8) //根端口
Fa0/2
Root FWD 19
128.2 P2p
Fa0/3
Altn BLK 19
128.3 P2p //F0/3 端口变成阻塞状态了
4.PVST+配置
Cisco 交换机默认运行 PVST+,为每个 Vlan 生成一颗 STP 树。 在每个交换机上创建 Vlan2,将交换机之间的链路都配置成 Trunk
……
Base ethernet MAC Address
: 0090.0C12.573A
//该交换机的 MAC 地址
交换机名称
MAC 地址
SWA
SWB
SWC
SWD
通过分析其默认的根网桥是:
2.检查STP缺省配置
SWA: SWA#show spanning-tree VLAN0001
Spanning tree enabled protocol ieee Root ID Priority 32769
//修改 SWA 的优先级为 4096(优先级为 4096 的倍数,范围从 0~61440)
SWA#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 0090.0C12.573A
SWB:
SWB#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0003.E49E.DC26
Cost
19
Port
2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Cost
19
Port
8(FastEthernet0/8)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Cost
19
Port
2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000A.41E3.20BE
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00D0.BA3D.E2C3
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface
SWA(config)#int f0/1
SWA(config-if)#switchport trunk encapsulation dot1q
SWA(config-if)#switchport mode trunk
SWA(config-if)#int f0/8
SWA(config-if)# switchport trunk encapsulation dot1q
Fa0/1
Desg FWD 19
128.1 P2p
Fa0/8
Altn BLK 19
128.8 P2p
SWB#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 0090.0C12.573A
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface
Role Sts Cost
Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Role Sts Cost
Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/5
Altn BLK 19
128.5 P2p
//表示 F0/5 处于阻塞状态
Fa0/4
Root FWD 19
1.按逻辑图4.1-1连接交换机,在各交换机上使用show version查看其MAC 地址,并记录在表中。
Switch#show version
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX,
RELEASE SOFTWARE (fc1)
128.1 P2p
Fa0/8
Root FWD 19
128.8 P2p
//以上显示该交换机各个接口的状态,F0/1 和 F0/8 均为转发状态。“Role”列是接口的
角色,Desg 是指定口,Root 是根端口;“Sts”列是接口的状态,FWD 表示在转发,BLK 表 示在阻断,LIS 表示在监听,LRN 表示在学习 MAC 地址;“Cost”列是接口的开销值“;Prio.Nbr” 列是接口的优先级;“Type”列是接口的类型,P2p 表示是点对点类型,Shr 表示是共享类型。
【实训 4.1】配置 STP
一、实训目的
熟悉STP的基本配置,掌握网络中STP的部署,能利用PVST配置负载均衡。
二、实训逻辑图
SWA(3560)
SWB(3560)
F0/8
F0/1
F0/2
F0/3
F0/7
F/06
F0/5
F0/4
SWC(2960)
SWD(2960)
三、实训内容及步骤
图 4.1-1 实训逻辑图
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000A.41E3.20BE
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface
SWD#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0003.E49E.DC26
Cost
19
Port
4(FastEthernet0/4)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
相关文档
最新文档