Cisco Switch STP

Cisco Switch STP

 

注意:模拟器中,交换机之间的连线一定要用交叉线,不能用直通线。

 

人工指定根网桥:
Switch#configure terminal
Switch(config)#spanning-tree vlan 1 priority 4096

1.将汇聚层交换机设置成根网桥这样配置生成树才有意义。

2. 接入层交换机、汇聚层交换机、核心层交换机并非是交换机的种类或者属性,只是由其所执行的任务来划分的。

 

交换机配置(三个交换机配置均相同)

复制代码
#spanning-tree mode rapid-pvst  // 快速生成树模式

#interface FastEthernet 0/1
#switchport mode trunk  // 设置接口工作模式为trunk
#exit


#interface FastEthernet 1/1
#switchport mode trunk  // 设置接口工作模式为trunk
#exit

#interface FastEthernet 2/1
#switchport access vlan 10  // 设置接口绑定的 VLAN ID 为 10
#exit
复制代码

 

交换机0

复制代码
Switch>en
Switch#
Switch#show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol rstp
  Root ID    Priority    32778   (根网桥优先级)
             Address     000D.BD2A.4802   (根交换机MAC地址)
             Cost        19
             Port        1(FastEthernet0/1)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)  (该交换机的优先级)
             Address     00E0.B0A2.12EC  (该交换机MAC地址)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Root FWD 19        128.1    P2p
Fa1/1            Altn BLK 19        128.2    P2p
Fa2/1            Desg FWD 19        128.3    P2p

Switch#
Switch#
复制代码

 

交换机1 (根网桥)

复制代码
Switch>en
Switch#
Switch#show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol rstp
  Root ID    Priority    32778    (根网桥优先级)
             Address     000D.BD2A.4802   (根交换机MAC地址)
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)  (该交换机的优先级)
             Address     000D.BD2A.4802  (该交换机MAC地址)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa1/1            Desg FWD 19        128.2    P2p
Fa0/1            Desg FWD 19        128.1    P2p
Fa2/1            Desg FWD 19        128.3    P2p

Switch#
Switch#
复制代码

 

交换机2

复制代码
Switch>en
Switch#
Switch#show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol rstp
  Root ID    Priority    32778   (根网桥优先级)
             Address     000D.BD2A.4802   (根交换机MAC地址)
             Cost        19
             Port        1(FastEthernet0/1)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)  (该交换机的优先级)
             Address     0090.2B37.79B1   (该交换机MAC地址)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Root FWD 19        128.1    P2p
Fa1/1            Desg FWD 19        128.2    P2p
Fa2/1            Desg FWD 19        128.3    P2p

Switch#
Switch#
复制代码

 

=========== End

 

posted @   lsgxeva  阅读(315)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
历史上的今天:
2018-11-25 VDOM configuration
2018-11-25 Gartner 2018 年WAF魔力象限报告:云WAF持续增长,Bot管理与API安全拥有未来
点击右上角即可分享
微信分享提示