How to test Spanning tree protocol ( STP )
Spanning tree protocol is one of the most interesting protocols. It is invented by Radia Perlman, she holds more than 50 patents and presently working in Intel ( year 2011 ).
We can use some testing tools to test spanning tree protocol. The main aim of Spanning tree protocol is to stop the loop formation and disable the redundant link so that packet follows only one path.
One of the imp question asked is why we need Spanning tree protocol in bridge to stop loop formation but why not in routers? Or if someone asks you we have STP in layer 2 to stop loops what is corresponding protocol in layer 3 to stop loop formation , don't get confused as in layer 3 it is not required ! Why ? because you have TTL field in routing mode which help in discarding the packet once TTL becomes zero.
Ok back to main topic "How to test Spanning tree Protocol" . To test Spanning tree you have following ways:
1) Use some hardware test tool
2) Use some Software based packet generator
3) Use actual devices and test it.
How to use Hardware test tools to test Spanning Tree Protocol
We have some costly hardware test tools, but if you company is implementing spanning tree protocol , the chances are you will have any of these tools in ypur lab.
1) Agilent N2X has in built Spanning tree protocol test suite which can give you convergence time and packet loss. You can build the BPDU packet using the tool and test.
2) IXIA IxNetwork is another testing tool, which can be used for testing Spanning tree protocol. Using their Spanning tree protocol emulation software all the spanning tree parameters can be verified .
3) Smartbits : We can generate different type of packets using SmartWindows and test the Spanning tree protocol.
How to use Software test tools to test Spanning Tree Protocol
We have some software test tool which can generate STP packets
Yersinia test tool can generate Spanning tree packets but it is more like attacking the device or flooding the device with STP packets and see how device is responding .
How to test Spanning tree protocol using more than one device
If you don't have any tool to test it don't worry connect two similar devices back to back and test it. It should have two paths. One path will be blocked by STP and one will be in forward mode. For detailed test cases please refer STP test cases page.