_Spanning Tree Protocol
_
it tutorial
Switching - Spanning Tree Algorithm
On this page I'll discuss a networking mechanism utilized to supply a loop-free network, the Spanning Tree Protocol (STP). I am going to show you the key elements that make up this protocol, their role and functionality. STP is utilized to maintain constantly one or more path active between two end points. Because there is the chance that loops can happen, STP automatically deactivates one path in case there are multiple paths for a similar destination point. Having a redundant design, often there is an alternate path when the main link becomes inactive. Remember from the previous post that the hierarchical network model uses multiple switches and links between one point to a different. Even when a core switch fails, there is another able to forward packets away from network.
it tutorial
STP sends frames between devices called BPDU (bridge protocol data unit) frames that contain information regarding the condition of the network. By intentionally blocking paths between devices, STP ensures all the time that we now have no network loops. The physical path will still exist and will also be used alternatively path in the event the main one fails. STP uses the Spanning Tree Algorithm to find out which paths ought to be deactivated. STA chooses the so called root bridge after BPDU frames are exchanged between devices. When BPDU frames are exchanged, STA selects the basis bridge by studying the lowest bridge ID (BID). Each BPDU frames provides the BID which is a combination between the MAC address, a high priority value and extended system ID. Initially, all switches act like root bridges and they exchange BPDU frames in between each other. By comparing the BIDs from BPDU frames received, switches determine who's the most effective root bridge switch. As an Administrator, it is possible to influence the root bridge selection by changing the switch priority. Automagically the switch priority is 32768 but you can assign important between 1 and 65536 (it must be a value which is an increment of 4096). To alter the switch priority, go into the global configuration mode and sort spanning-tree vlan [id] priority [number]. For example, you are able to set the priority by typing spanning-tree vlan 1 priority 8192. If you try to assign a different value that isn't an increment of 4096, you'll get a warning proclaiming that "% Bridge Priority must be in increments of 4096.
% Allowed values are:
0 4096 8192 12288 16384 20480 24576 28672
32768 36864 40960 45056 49152 53248 57344 61440"
Following your root bridge was chosen, STA determines the most effective path to attain the root bridge for those switches within the network. The total cost from one place to another is the cost of a path. After calculating the expense, STA will set all switch ports that have fun playing the STP algorithm towards the appropriate mode, the subsequent:
designated ports - ports that will forward network traffic
non designated ports - ports that will be set in the blocking state. These ports is not going to forward traffic and they'll be utilized if the main path fails. These ports are positioned within this state to prevent routing loops.
root ports - the ports that are the closest towards the root bridge
One other way it is possible to influence how ports are configured through the STP algorithm is simply by changing the port's priority. This is a value that is automagically set to 128 but tend to be changed with a value between 0 and 240. To change a port's priority, utilize the spanning-tree port-priority [number] command from your interface configuration mode.
I've said previously that STP will choose best paths by comparing the all inclusive costs from point to another. Which means STP will sum all of the costs from all paths a packet must travel through, to succeed in it's destination. The default cost is based on the path's bandwidth. For instance, a path with the speed of 1 Gb/s have a price of 4, one with 100 Mb/s could have the price of 19 and so on. The trail using the cheapest is desired. It is possible to let STP chose paths by checking the link's cost or you can configure manually a price to get a certain path. To configure the price of a path, simply enter the interface configuration mode and kind spanning-tree cost [number], as an example, spanning-tree cost 10. To confirm your spanning tree configuration type show spanning-tree.
Switch ports that participate in the spanning-tree algorithm must transition a number of states before they are able to fully integrate in the STP process. By changing the ports state, STA makes sure that there are no loops occurring inside the network. You can find five states that a port can transition to:
Disable - the main harbour won't participate in the spanning-tree process and it'll not forward data.
Blocking - the main harbour won't forward frames received nevertheless it will process BPDU frames to ascertain other switches states.
Listening - the main harbour will have fun playing the STP algorithm, it will receive and forward BPDU frames.
Learning - the port get and forward BPDU frames and it will include entries towards the MAC address table
Forwarding - the main harbour is fully playing the STP process, it will forward/receive frames and BPDU frames.
There are a few timers created to manage just how long a port will always be inside a certain state. The hello time may be the interval between BPDU frames (enough time it has to pass before another BPDU frame is sent), by default it really is 2 seconds however this can be changed to some value between 1 and Around 10 secs. The forward delay time it's time a port will need attain the learning state. Automagically, the forward delay time is placed to fifteen seconds , but it may be changed to a value between 4 and 30. Usually, you'll not need to change these timers since they happen to be configured to a network diameter of seven which is usually enough for the majority of network implementations. If you genuinely wish to alter the spanning tree network diameter, make use of the command spanning-tree vlan [number] root primary/secondary diameter [number], for example spanning-tree vlan 10 root primary diameter 9.
Portfast ports will transition from your blocking state for the forwarding state soon after a switch is powered on. Portfast ports could be configured on access ports because they ports are employed to connect end devices such as computers/printers and do no have fun with the STP convergence process. Also, is always that you place these ports inside the BPDU guard mode. A port within the BPDU guard mode won't forward BPDU packets to end devices as there is you don't need to. Make it possible for the Portfast and also the BPDU guard features, use the following commands:
To look at the configured ports, use the show running-config command:
Ultimately, I would like to talk just a little in regards to the different STP versions. As you have probably seen, Cisco created some tailor made versions with the Spanning Tree Protocol. Because this protocol became a standard, IEEE created their own version of STP that can be used by all networking devices.
A mature form of STP created by Cisco is the Per-VLAN spanning tree protocol (PVST). This protocol stated that STP can run a different instance for each and every VLAN. This implies that the switch may be elected since the root bridge for starters VLAN and another switch can be elected since the root bridge for another VLAN. By implementing this kind of design, the redundancy is increased as well as load balancing may be implemented because visitors are spread between different VLANs. in PVST, BPDU frames support the VLAN ID to distinguish between different STP instances. You are able to set the main bridge for any VLAN utilizing the spanning-tree vlan [id] root primary/secondary command. For instance, you can set the primary root bridge for VLAN 10 by typing spanning-tree vlan 10 root primary over a switch and spanning-tree vlan 10 root secondary on another switch. Exactly the same thing may be configured if you affect the priority value while using spanning-tree vlan [id] priority [number] (a worth incremented by 4096) command.
On this simple topology, I've selected the S2 switch to function as root bridge for vlan 10 and S3 the secondary root bridge for vlan 10. Also, I've selected S1 to become the root bridge for vlan 20 by changing the priority value beneath the default value.
Another sort of Cisco STP may be the Rapid-PVST which can be an implementation from the IEEE RSTP protocol. When Rapid spanning tree protocol was invented, it had newer and more effective features that didn't existed before. RSTP had a heightened speed in network convergence, it added more port state and roles and seemed to be suitable for every one of the previous versions of STP. RSTP introduced edge ports which can be somehow like Portfast ports since they connect end devices. Edge ports do not participate in the STP algorithm but unlike Portfast ports, if they receive a BPDU frame, their state is automatically changed to a active STP port (inside the forwarding state). I will not talk too much concerning this protocol, you will need to realize that it's got only three port states: discarding, learning and forwarding. Through the use of only three states, the STP speed is increased. The Rapid-PVST may be focused on a Cisco switch by using the spanning-tree mode rapid-pvst command from the global configuration mode.
There's much more to say of the STP protocol, I hope I've described all the crucial sides that comprise this protocol. I think you will will find this post interesting, leave a comment/share. Thanks to read by this and have a wonderful day.
it tutorial
Switching - Spanning Tree Algorithm
On this page I'll discuss a networking mechanism utilized to supply a loop-free network, the Spanning Tree Protocol (STP). I am going to show you the key elements that make up this protocol, their role and functionality. STP is utilized to maintain constantly one or more path active between two end points. Because there is the chance that loops can happen, STP automatically deactivates one path in case there are multiple paths for a similar destination point. Having a redundant design, often there is an alternate path when the main link becomes inactive. Remember from the previous post that the hierarchical network model uses multiple switches and links between one point to a different. Even when a core switch fails, there is another able to forward packets away from network.
it tutorial
STP sends frames between devices called BPDU (bridge protocol data unit) frames that contain information regarding the condition of the network. By intentionally blocking paths between devices, STP ensures all the time that we now have no network loops. The physical path will still exist and will also be used alternatively path in the event the main one fails. STP uses the Spanning Tree Algorithm to find out which paths ought to be deactivated. STA chooses the so called root bridge after BPDU frames are exchanged between devices. When BPDU frames are exchanged, STA selects the basis bridge by studying the lowest bridge ID (BID). Each BPDU frames provides the BID which is a combination between the MAC address, a high priority value and extended system ID. Initially, all switches act like root bridges and they exchange BPDU frames in between each other. By comparing the BIDs from BPDU frames received, switches determine who's the most effective root bridge switch. As an Administrator, it is possible to influence the root bridge selection by changing the switch priority. Automagically the switch priority is 32768 but you can assign important between 1 and 65536 (it must be a value which is an increment of 4096). To alter the switch priority, go into the global configuration mode and sort spanning-tree vlan [id] priority [number]. For example, you are able to set the priority by typing spanning-tree vlan 1 priority 8192. If you try to assign a different value that isn't an increment of 4096, you'll get a warning proclaiming that "% Bridge Priority must be in increments of 4096.
% Allowed values are:
0 4096 8192 12288 16384 20480 24576 28672
32768 36864 40960 45056 49152 53248 57344 61440"
Following your root bridge was chosen, STA determines the most effective path to attain the root bridge for those switches within the network. The total cost from one place to another is the cost of a path. After calculating the expense, STA will set all switch ports that have fun playing the STP algorithm towards the appropriate mode, the subsequent:
designated ports - ports that will forward network traffic
non designated ports - ports that will be set in the blocking state. These ports is not going to forward traffic and they'll be utilized if the main path fails. These ports are positioned within this state to prevent routing loops.
root ports - the ports that are the closest towards the root bridge
One other way it is possible to influence how ports are configured through the STP algorithm is simply by changing the port's priority. This is a value that is automagically set to 128 but tend to be changed with a value between 0 and 240. To change a port's priority, utilize the spanning-tree port-priority [number] command from your interface configuration mode.
I've said previously that STP will choose best paths by comparing the all inclusive costs from point to another. Which means STP will sum all of the costs from all paths a packet must travel through, to succeed in it's destination. The default cost is based on the path's bandwidth. For instance, a path with the speed of 1 Gb/s have a price of 4, one with 100 Mb/s could have the price of 19 and so on. The trail using the cheapest is desired. It is possible to let STP chose paths by checking the link's cost or you can configure manually a price to get a certain path. To configure the price of a path, simply enter the interface configuration mode and kind spanning-tree cost [number], as an example, spanning-tree cost 10. To confirm your spanning tree configuration type show spanning-tree.
Switch ports that participate in the spanning-tree algorithm must transition a number of states before they are able to fully integrate in the STP process. By changing the ports state, STA makes sure that there are no loops occurring inside the network. You can find five states that a port can transition to:
Disable - the main harbour won't participate in the spanning-tree process and it'll not forward data.
Blocking - the main harbour won't forward frames received nevertheless it will process BPDU frames to ascertain other switches states.
Listening - the main harbour will have fun playing the STP algorithm, it will receive and forward BPDU frames.
Learning - the port get and forward BPDU frames and it will include entries towards the MAC address table
Forwarding - the main harbour is fully playing the STP process, it will forward/receive frames and BPDU frames.
There are a few timers created to manage just how long a port will always be inside a certain state. The hello time may be the interval between BPDU frames (enough time it has to pass before another BPDU frame is sent), by default it really is 2 seconds however this can be changed to some value between 1 and Around 10 secs. The forward delay time it's time a port will need attain the learning state. Automagically, the forward delay time is placed to fifteen seconds , but it may be changed to a value between 4 and 30. Usually, you'll not need to change these timers since they happen to be configured to a network diameter of seven which is usually enough for the majority of network implementations. If you genuinely wish to alter the spanning tree network diameter, make use of the command spanning-tree vlan [number] root primary/secondary diameter [number], for example spanning-tree vlan 10 root primary diameter 9.
Portfast ports will transition from your blocking state for the forwarding state soon after a switch is powered on. Portfast ports could be configured on access ports because they ports are employed to connect end devices such as computers/printers and do no have fun with the STP convergence process. Also, is always that you place these ports inside the BPDU guard mode. A port within the BPDU guard mode won't forward BPDU packets to end devices as there is you don't need to. Make it possible for the Portfast and also the BPDU guard features, use the following commands:
To look at the configured ports, use the show running-config command:
Ultimately, I would like to talk just a little in regards to the different STP versions. As you have probably seen, Cisco created some tailor made versions with the Spanning Tree Protocol. Because this protocol became a standard, IEEE created their own version of STP that can be used by all networking devices.
A mature form of STP created by Cisco is the Per-VLAN spanning tree protocol (PVST). This protocol stated that STP can run a different instance for each and every VLAN. This implies that the switch may be elected since the root bridge for starters VLAN and another switch can be elected since the root bridge for another VLAN. By implementing this kind of design, the redundancy is increased as well as load balancing may be implemented because visitors are spread between different VLANs. in PVST, BPDU frames support the VLAN ID to distinguish between different STP instances. You are able to set the main bridge for any VLAN utilizing the spanning-tree vlan [id] root primary/secondary command. For instance, you can set the primary root bridge for VLAN 10 by typing spanning-tree vlan 10 root primary over a switch and spanning-tree vlan 10 root secondary on another switch. Exactly the same thing may be configured if you affect the priority value while using spanning-tree vlan [id] priority [number] (a worth incremented by 4096) command.
On this simple topology, I've selected the S2 switch to function as root bridge for vlan 10 and S3 the secondary root bridge for vlan 10. Also, I've selected S1 to become the root bridge for vlan 20 by changing the priority value beneath the default value.
Another sort of Cisco STP may be the Rapid-PVST which can be an implementation from the IEEE RSTP protocol. When Rapid spanning tree protocol was invented, it had newer and more effective features that didn't existed before. RSTP had a heightened speed in network convergence, it added more port state and roles and seemed to be suitable for every one of the previous versions of STP. RSTP introduced edge ports which can be somehow like Portfast ports since they connect end devices. Edge ports do not participate in the STP algorithm but unlike Portfast ports, if they receive a BPDU frame, their state is automatically changed to a active STP port (inside the forwarding state). I will not talk too much concerning this protocol, you will need to realize that it's got only three port states: discarding, learning and forwarding. Through the use of only three states, the STP speed is increased. The Rapid-PVST may be focused on a Cisco switch by using the spanning-tree mode rapid-pvst command from the global configuration mode.
There's much more to say of the STP protocol, I hope I've described all the crucial sides that comprise this protocol. I think you will will find this post interesting, leave a comment/share. Thanks to read by this and have a wonderful day.