STP spanning tree configuration and principle

Goal:
Layer 2 network communication failures may occur due to line failure caused the network can be eliminated because of a line failure caused by interruption of the redundant line.
But because there is a redundant line, but also may be broadcast storms continue to replicate the same frame and MAC address table instability.

Configure Switch1 as the main root of vlan1, Switch2 for the second root vlan1 the
program:
In order to ensure redundancy in the environment is not a broadcast storm problem, the introduction of Spanning Tree (STP) protocols. By spanning tree protocol can be set to a port on the redundant line is blocked (the BLOCKING) state, to prevent a broadcast storm is generated, when a line failure, blocked automatically enters port forwarding (FORWARDING) state, to ensure that the network the smooth flow of.
There are three basic can be equipped

1, the priority of BID: priority value of the back ---- 4096 must be a multiple of 4096. 4bit former is the priority, the expansion system is 12bit ID. 12 th 4: 4096
2 interface cost value: 2000 cost
. 3, arranged to modify the interface port ID priority, link switching is completed.

BID priority ranges from 0 to 65535, the default value is 32768. When viewing a priority, even if the default value is 32768 is not seen as a priority switch uses the system priority + VLAN number of ways, so the view to the VLAN1 default priority is 32769 (system priority + VLAN ID 32768 1).
As follows, manually change the root bridge.
STP spanning tree configuration and principleSTP spanning tree configuration and principle

Because the same BID, cost values are the same, it is determined by the size of the MAC address. We now change the value of the SW2 becomes non-block by BID.
# SW2
the configure Terminal
Spanning-Tree vlan 1 priority 28672
We found SW2 of fa 0/2 mouth had better.
STP spanning tree configuration and principle

SM2 can also be set as a secondary root main root of vlan1 of vlan2, SM1 is set to the main root vlan1 vlan2 secondary root and view

SM2(config)#spanning-tree vlan 1 root primary 
SM2(config)#spanning-tree vlan 2 root secondary
SM2#show spanning-tree 

  SM1(config)#spanning-tree vlan 1 root  secondary
SM1(config)#spanning-tree vlan 2 root  primary
SM1#show spanning-tree 

Guess you like

Origin blog.51cto.com/14148388/2424593