Ò»¡¢µ¥Éú³ÉÊ÷ʵÀý

×¢ÒâÅäÖÃ֮ǰ£¬ËùÓÐÁ´Â·²»ÒªÈ«²¿Á¬½ÓºÃ£¬ÕâÑùÔÚûÓÐÅäÖÃSTP֮ǰ£¬»áÐγÉÎïÀí»·Â·£¬¿ÉÄÜÓ°ÏìÉ豸¹ÜÀí£¬½¨ÒéÏȶϿªÈßÓàÁ´Â·¡£

Ìáʾ£º½»»»»úµÄ»ù±¾ÅäÖ㬰üº¬¶Ë¿ÚÃèÊö¡¢ÈÕÖ¾¡¢SNMP¡¢¹ÜÀíVLAN¡¢¹ÜÀí·½Ê½µÈ»ù±¾¹¦ÄÜ£¬²»ÔÚ±¾ÓÃÀýÖнøÐÐÃèÊö¡£

 

¶þ¡¢ÍØÆË˵Ã÷£º

SW1ΪÖ÷ÍøÇÅ£¬ÕûÍøÖ»ÔËÐÐÒ»¸övlan 1£¬SW2ºÍSW3Ö®¼äÁ´Â·¿ªÏú´ó´¦ÓÚBLOCK״̬¡£

 

 

Èý¡¢ÅäÖò½Öè

SW1ÅäÖÃ

Ruijie#config terminal

Ruijie(config)#spanning-tree priority 0   ------>ͨ¹ýÉ趨ÓÅÏȼ¶Îª0£¬Ð­Ò齫ѡ¾ÙÆäΪ¸ùÇÅ

Ruijie(config)#spanning-tree global state enable         ------>¿ªÆôSTPЭÒ飬ĬÈÏΪRSTPЭÒé

Ruijie(config)#exit

 

SW2ÅäÖÃ

Õë¶ÔSW2ºÍSW3µÄ¿Ú×ÖÐÍÁ¬½Ó£¬½¨Òéµ÷ÕûSW2ºÍSW3Ö®¼äµÄ¶Ë¿Ú¿ªÏú£¬ÈËΪ¿ØÖÆÆ÷Æä½øÈë×èÈû״̬¡£

Ruijie#config terminal

Ruijie(config)#spanning-tree global state enable         ------>¿ªÆôSTPЭÒ飬ĬÈÏΪRSTPЭÒé

Ruijie(config)#exit

 

Ruijie(config)#interface gi0/1

Ruijie(config-if-GiagaEthernet 0/1)#spanning-tree cost 200000    ------>ǧÕ׿ÚĬÈÏcostΪ20000

Ruijie(config-if-GiagaEthernet 0/1)#exit

 

 SW3ÅäÖÃ

Õë¶ÔSW2ºÍSW3µÄ¿Ú×ÖÐÍÁ¬½Ó£¬½¨Òéµ÷ÕûSW2ºÍSW3Ö®¼äµÄ¶Ë¿Ú¿ªÏú£¬ÈËΪ¿ØÖÆÆ÷Æä½øÈë×èÈû״̬¡£

Ruijie#config terminal

Ruijie(config)#spanning-tree global state enable         ------>¿ªÆôSTPЭÒ飬ĬÈÏΪRSTPЭÒé

Ruijie(config)#exit

 

Ruijie(config)#interface gi0/1

Ruijie(config-if-GiagaEthernet 0/1)#spanning-tree cost 200000    ------>ǧÕ׿ÚĬÈÏcostΪ20000

Ruijie(config-if-GiagaEthernet 0/1)#exit

 

SW4ÅäÖÃ

Ruijie#config terminal

Ruijie(config)#spanning-tree global state enable         ------>¿ªÆôSTPЭÒ飬ĬÈÏΪRSTPЭÒé

Ruijie(config)#exit

 

ËÄ¡¢¹¦ÄÜÑéÖ¤

1. ²é¿´ºËÐÄSW1ÊÇ·ñΪ¸ùÇÅ£¨¸ùÇÅMACÊÇ×Ô¼º£© 

Ruijie(config)#sh spanning-tree

 

 StpVersion : RSTP

 StpStatus : Enabled

 BridgeMaxAge : 20

 BridgeHelloTime : 2

 BridgeForwardDelay : 15

 MaxHops : 20

 TxHoldCount : 6

 TC-Protection: Disabled

 BPDU guard default: Disabled

 BPDU filter default: Disabled

 

 ######   MST  0  VLANs mapped : 1-4094

 BridgeAddr : 5869.6C01.DC96------>±¾»úMACµØÖ·

 Priority : 0

 TimeSinceTopologyChange : 0d:22h:28m:34s

 TopologyChanges : 0

 DesignatedRoot : 0/5869.6C01.DC96------>¸ùÇÅMACµØÖ·

 ExtRootCost : 0

 RootPort : none

 CistRegionRoot : 0/5869.6C01.DC96

 CistPathCost : 0

 

2. ²é¿´ºËÐÄSW2ÊÇ·ñͨ¹ýЭÒ鼯ËãÅж¨SW1Ϊ¸ùÇÅ£¨¸ù¾ÝMACÅж¨£©

Ruijie(config)#sh spanning-tree

 

 StpVersion : RSTP

 StpStatus : Enabled

 BridgeMaxAge : 20

 BridgeHelloTime : 2

 BridgeForwardDelay : 15

 MaxHops : 20

 TxHoldCount : 6

 TC-Protection: Disabled

 BPDU guard default: Disabled

 BPDU filter default: Disabled

 

 ######   MST  0  VLANs mapped : 1-4094

 BridgeAddr : 0/1414.4b19.ecc0 ------>±¾»úMACµØÖ·

 Priority : 0

 TimeSinceTopologyChange : 0d:22h:28m:34s

 TopologyChanges : 0

 DesignatedRoot : 0/5869.6C01.DC96------>¸ùÇÅMACµØÖ·

 ExtRootCost : 0

 RootPort : none

 CistRegionRoot : 0/5869.6C01.DC96

 CistPathCost : 0

 

3. SW1²é¿´½ÓÈë½»»»»ú¸ùÇÅÊÇ·ñΪSW1£¬ÊÇ·ñÓÐÒ»¸ö¶Ë¿ÚΪ×èÈû״̬

Ruijie#show spanning-tree summary

Spanning tree enabled protocol mstp

MST 0 vlans map : ALL

  Root ID    Priority    0

             Address     1414.4b19.ecc0------>¸ùÇÅMACµØÖ·

             this bridge is root

             Hello Time   2 sec  Forward Delay 15 sec  Max Age 20 sec

 

  Bridge ID  Priority    32768

             Address     00d0.f8b5.0a0b  ------>±¾»úMACµØÖ·

             Hello Time   2 sec  Forward Delay 15 sec  Max Age 20 sec

 

Interface        Role Sts Cost       Prio     Type  OperEdge

---------------- ---- --- ---------- -------- ----- ---------------

  Gi0/1          designated    forwarding 20000      128     network      p2p   

  Gi0/2          designated    forwarding 20000      128     network      p2p   

 

SW3:

Ruijie#sh spanning-tree summary

 

 Spanning tree: Enabled,protocol: RSTP

 Number of MST instances: 1

 

 MST00  vlans mapped : 1-4094

  Root ID     Priority     0

              Address      5869.6C01.DC96 ------>¸ùÇÅMACµØÖ·

              this bridge is root

              Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec

 

  Bridge  ID  Priority 0     

              Address      00d0.f8b5.0a0b  ------>±¾µØMACµØÖ·

              Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec

 

  Interface      Role       Sts        Cost       Prio    OperEdge  Type

  ---------      ---------- ---------- ---------- ------- --------- ----

  Gi0/1          Altn    BLK           200000      128     network      p2p  ------>ÓÐÒ»¸ö¶Ë¿ÚΪBLOCK

  Gi0/2          root    forwarding 20000      128     network      p2p   ------>ÓÐÒ»¸ö¶Ë¿ÚΪ¸ù¶Ë¿Ú