今日要聞!快速生成樹(RSTP)配置實驗

2023-01-02 22:25:47 來源:51CTO博客

1、實驗介紹

實驗名稱:快速生成樹配置實驗目的:理解快速生成樹及多生成樹的配置實驗設備:Cisco2950T-24交換機3臺;PC機1臺;直連線1根;交叉線3根。

2、實驗拓撲

說明:實驗中交換機之間是Trunk鏈路,自動協商為全雙工,RSTP會自動把它們的鏈路類型標識為點到點類型。


【資料圖】

3、實驗步驟

SW1

sw1(config)#spanning-tree mode rapid-pvst    //啟用RSTP模式生成樹sw1(config)#int range f0/14 - 15sw1(config-if-range)#switchport mode trunksw1(config-if-range)#duplex full   //配置鏈路為全雙工模式sw1(config-if-range)#spanning-tree link-type point-to-point  //配置生成樹鏈路類型為點到點

SW2

sw2(config)#spanning-tree mode rapid-pvst //把交換機的生成樹模式由默認的STP改成RSTP(快速生成樹)sw2(config)#int range f0/14 - 15sw2(config-if-range)#switchport mode trunksw2(config-if-range)#duplex fullsw2(config-if-range)#spanning-tree link-type point-to-point

SW3

sw3(config)#spanning-tree mode rapid-pvstsw3(config)#int range f0/13 - 14sw3(config-if-range)#switchport mode trunksw3(config-if-range)#duplex fullsw3(config-if-range)#spanning-tree link-type point-to-pointsw3(config)#int range f0/1 - 2sw3(config-if-range)#switchport mode access //把交換機的接口模式改為接入(access)模式。交換機接口有三在模式1.access 2.trunk  3.QinQ其中access是接入模式主要接主機的接口sw3(config-if-range)#switchport access vlan 1sw3(config-if-range)#spanning-tree portfast   //啟用快速端口(把一個port設置了portfast,就是讓那個port不再使用STP的算法)

查看

sw1#show spanning-tree vlan 1        //查看生成樹的配置sw1#show spanning-tree summary

4、RSTP的接口類型

邊界接口(Edge Port):如果接口上啟用Portfast,該接口就是邊界接口

命令:sw1 (config-if)#spanning-tree portfast

點到點接口(Point-to-PointPort):如果接口是全雙工,該接口就是點到點接口

命令:sw1(config-if)#duplex full

sw1(config-if)#spanning-tree link-type point-to- point

共享接口(Share Port):如果接口是半雙工,該接口就是共享接口

命令:sw1 (config-if)#duplex half

sw1 (config-if)#spanning-tree link-type shared

說明:雖然RSTP會自動識別鏈路類型,但是在接口上手動指明鏈路類型和接口類型有利于RSTP的運行。

標簽: 實驗目的 實驗步驟 模式生成

上一篇:C語言--指針1
下一篇:全球熱門:簡單指針實現兩個數比較大小