Cisco Support Community
Community Member

show spanning-tree variations

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?



Community Member

Re: show spanning-tree variations

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...



CreatePlease to create content