科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网网络频道路由交换快速生成树配置(RSTP)

快速生成树配置(RSTP)

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

实现:配置快速生成树(RSTP),做冗余备份,并将物理上的环路从逻辑上断开。

来源:chinaitlab 2011年5月14日

关键字: 路由配置 路由器

  • 评论
  • 分享微博
  • 分享邮件

  //实现:配置快速生成树(RSTP),做冗余备份,并将物理上的环路从逻辑上断开。

  //环境:

  Cisco 2960-01

  Cisco 2960-02

  PC01

  PC02

  //拓扑:如图(快速生成树配置-RSTP)

  

  //查看交换机的生成树协议

  Cisco 2960-01#show spanning-tree

  //配置Cisco 2960-01

  Cisco 2960-01>enenable

  Cisco 2960-01#configure terminal

  Cisco 2960-01(config)#vlan 2

  Cisco 2960-01(config-vlan)#exit

  Cisco 2960-01(config)#interface fastEthernet 0/1

  Cisco 2960-01(config-if)#switchport access vlan 2

  Cisco 2960-01(config-if)#exit

  Cisco 2960-01(config)#interface fastEthernet 0/24

  Cisco 2960-01(config-if)#switchport mode trunk //设置TRUNK

  Cisco 2960-01(config-if)#exit

  Cisco 2960-01(config)#interface fastEthernet 0/23

  Cisco 2960-01(config-if)#switchport mode trunk //设置TRUNK

  Cisco 2960-01(config-if)#exit

  Cisco 2960-01(config)#spanning-tree mode rapid-pvst //修改生成树模式为RSTP

  //保存配置

  Cisco 2960-01#write

  //配置Cisco 2960-02

  Cisco 2960-02>enenable

  Cisco 2960-02#configure terminal

  Cisco 2960-02(config)#vlan 2

  Cisco 2960-02(config-vlan)#exit

  Cisco 2960-02(config)#interface fastEthernet 0/1

  Cisco 2960-02(config-if)#switchport access vlan 2

  Cisco 2960-02(config-if)#exit

  Cisco 2960-02(config)#interface fastEthernet 0/24

  Cisco 2960-02(config-if)#switchport mode trunk

  Cisco 2960-02(config-if)#exit

  Cisco 2960-02(config)#interface fastEthernet 0/23

  Cisco 2960-02(config-if)#switchport mode trunk

  Cisco 2960-02(config-if)#exit

  Cisco 2960-02(config)#spanning-tree mode rapid-pvst //修改生成树模式为RSTP

  //保存配置

  Cisco 2960-02#write

  //测试:(终端计算机)

  VLAN2-PC01>ping 192.168.1.102

  Pinging 192.168.1.102 with 32 bytes of data:

  Reply from 192.168.1.102: bytes=32 time=26ms TTL=128

  Reply from 192.168.1.102: bytes=32 time=14ms TTL=128

  Ping statistics for 192.168.1.102:

  Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),

  Approximate round trip times in milli-seconds:

  Minimum = 14ms, Maximum = 26ms, Average = 20ms

  Control-C

  //禁用正在通信的23号端口,模拟故障

  Cisco 2960-01#configure terminal

  Cisco 2960-01(config)#interface fastEthernet 0/23

  Cisco 2960-01(config-if)#shutdown

  VLAN2-PC01>ping 192.168.1.102

  Pinging 192.168.1.102 with 32 bytes of data:

  Reply from 192.168.1.102: bytes=32 time=11ms TTL=128

  Ping statistics for 192.168.1.102:

  Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),

  Approximate round trip times in milli-seconds:

  Minimum = 11ms, Maximum = 11ms, Average = 11ms

  Control-C

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章