show spanning-tree variations

Unanswered Question
Apr 2nd, 2007
User Badges:

I am trying to write a tool that gathers STP information from the Cisco devices in my network. I started by gathering data via SNMP but have run into performance problems with devices that have many VLANs configured on them. So I've resorted to CLI scraping.

My current problem is the number of variations to get STP information via CLI on my IOS devices.

On some devices, I need to issue the command "show spanning-tree". On others, I need to issue "show spanning-tree detail" in order to get the same output. On still others, I need to issue "show spanning-tree vlan [x]" for each vlan in order to get all the data.

Right now, I've got the command needed hardcoded for each of the devices but I'd like to get the correct command to issue from a matrix (based on sysoid and IOS version perhaps?).

Can anyone point me in the direction of documentation that explains when it is correct to add "detail" to the command and when it is correct to iterate per vlan?



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
dabrousseau Mon, 04/02/2007 - 13:28
User Badges:

I did find out that the "detail" keyword was generally introduced in IOS version 12.1(11)E. There were two earlier versions that contained the keyword, but they are on devices that I don't have in my network. One mystery solved.

Any help on which hardware/OS versions that issuing "show spanning-tree" only shows the data for the default VLAN? I know that my 3500XLs fall under that category. If it's hardware related, I'm okay. If it's OS related, I don't want to get caught off guard when I upgrade my devices...




This Discussion