Spanning Tree Protocol (STP)
Spanning tree protocol is a network protocol that is used to ensure a loop-free topology. The basic function of the STP is to select which port will be use if there are occurs in redundant link which act as backup if the active link fails.The inventor of the STP is called Radia Perman, which is a software designer and network engineer,
The switch will sent Bridge Protocol Data Units (BPDU) to nearby switch (default sent every 2 sec). Inside the BPDU contain Bridge id (Bridge priority,mac address) and the default priority value is 32768 (the lower the priority value the higher the priority) which 32768 can decrease 4096 each time decrease the priority value.
the switch will wait for 20 second which wait 10 BPDU packet (Blocking State) from the root bridge
then only will start listen, open the Non-Designated Port and become Root Port (Listening State)
then only start learning which receive the BDPU (Learning State)
then only start forwarding. Total time to change another link to become active is around 15 Sec, but currently got new standard called Rapid Spanning Tree Protocol (RSTP), if implement RSTP when the time would minus till 2 sec. The method is using the table of the STP that got pre-elect NDP to become ALT link/port. If the latest cisco router , there are almost no request time out happen.
/****Configuration parameters and testing***/
1) Turn on RSTP on switch s1,s2,s3,s4 with the following command.
spanning-tree mode rapid-pvst
2) Verify the RSTP is running in switch s1,s2,s3,s4
show spanning-tree
3) For each site, configure s1 and s3 as root bridge for LAN
s1 -> spanning-tree vlan 1,100,101,102,103,104 root primary
s3 -> spanning-tree vlan 1,200,201,202,203,204 root primary
4) Repeat step 2 on s1 and s3 to verify root bridge placement
5) Test RSTP link redundancy function
show spanning-tree
How the STP works?
- Root Bridge(bridge and switch is same thing) --> switch with the lowest mac address become root bridge,if and only if the priority is same
- Elect Root Port (RP) --> root port is port on the non root bridge pointing back to root bridge depend on speed (higher speed == lower cost) and port id (lowest port id win)
- Elect Designated Port (DP) --> port at root bridge pointing toward non root bridge
- Elect Non-designated Port (NDP) --> port on non-root bridge pointing towards root bridge that is block automatic become standard port
The switch will sent Bridge Protocol Data Units (BPDU) to nearby switch (default sent every 2 sec). Inside the BPDU contain Bridge id (Bridge priority,mac address) and the default priority value is 32768 (the lower the priority value the higher the priority) which 32768 can decrease 4096 each time decrease the priority value.
What happen when the active link down?
If the link is lost connection,the switch will wait for 20 second which wait 10 BPDU packet (Blocking State) from the root bridge
then only will start listen, open the Non-Designated Port and become Root Port (Listening State)
then only start learning which receive the BDPU (Learning State)
then only start forwarding. Total time to change another link to become active is around 15 Sec, but currently got new standard called Rapid Spanning Tree Protocol (RSTP), if implement RSTP when the time would minus till 2 sec. The method is using the table of the STP that got pre-elect NDP to become ALT link/port. If the latest cisco router , there are almost no request time out happen.
/****Configuration parameters and testing***/
1) Turn on RSTP on switch s1,s2,s3,s4 with the following command.
spanning-tree mode rapid-pvst
2) Verify the RSTP is running in switch s1,s2,s3,s4
show spanning-tree
3) For each site, configure s1 and s3 as root bridge for LAN
s1 -> spanning-tree vlan 1,100,101,102,103,104 root primary
s3 -> spanning-tree vlan 1,200,201,202,203,204 root primary
4) Repeat step 2 on s1 and s3 to verify root bridge placement
5) Test RSTP link redundancy function
show spanning-tree
Comments
Post a Comment