networking-forum.com
Community BlogCommunity Wiki * Register  * Search  * Login
View unanswered postsView active topics

All times are UTC - 6 hours [ DST ]



Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Wed Jun 13, 2012 9:10 am 
Offline
New Member
New Member

Joined: Sat Jul 16, 2011 2:42 pm
Posts: 43
Location: UK
Certs: Ccna
Hi,

We're currently in the process of mapping our networks out. We're using a combination of SNMP to collect various bits of data, then throwing it all at graphviz to produce a webpage we can show people to prove its not the network when a server stops responding due to some idiot turning it off (again).

This is all fine, but we've now been asked to highlight which are the root ports on the various switches. I have no idea why, I've just been told to sort it out.

I've trawled through the Cisco MIB page and found a couple of things that looked promising, but always got an empty return when queried, so does anyone know what I need to query to get the root port of a specific instance.

Thanks in advance

J


Top
 Profile  
 
PostPosted: Wed Jun 13, 2012 9:26 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Tue Aug 21, 2007 2:15 pm
Posts: 8298
Location: Frederick MD
Certs: Instanity
you could have different root ports for different vlans on the same switch in the specific instance.

_________________
"If you're good at anticipating the human mind. It leaves nothing to chance."
-Jigsaw


Top
 Profile  
 
PostPosted: Wed Jun 13, 2012 9:54 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jan 17, 2005 11:01 pm
Posts: 5148
Location: Canada eh
Certs: 350-001, CCNP, CXFF, ITILv3F
1.3.6.1.2.1.17.2.7 dot1dStpRootPort looks promising.

_________________
blog.brokennetwork.ca


Top
 Profile  
 
PostPosted: Wed Jun 13, 2012 2:53 pm 
Offline
Member
Member

Joined: Sun Apr 17, 2011 7:06 pm
Posts: 232
What Infinite said. For other instances, you'll need to specify the context in the community string.

E.g. If your community string is 'private' and you want to find the root port in vlan 100, then poll with the community 'private@100'.

Also, you should look into the Cisco STP extensions MIB, which gives you a lot more information than bridge MIB.


Top
 Profile  
 
PostPosted: Thu Jun 14, 2012 7:37 am 
Offline
New Member
New Member

Joined: Sat Jul 16, 2011 2:42 pm
Posts: 43
Location: UK
Certs: Ccna
ristau5741 wrote:
you could have different root ports for different vlans on the same switch in the specific instance.

That's one of the ones I tried and got no response, however...

bertschs wrote:
If your community string is 'private' and you want to find the root port in vlan 100, then poll with the community 'private@100'.

Doing the above gets it to respond with a port identifier

Thanks gents, now got to work out how to make the diagram look like it came out of visio...

Cheers

J

Edit: First I've got to work out how the result from the above (26) is indexed to anything that resembles an ifIndex or ifDesc.


Top
 Profile  
 
PostPosted: Fri Jun 15, 2012 1:58 pm 
Offline
Member
Member

Joined: Sun Apr 17, 2011 7:06 pm
Posts: 232
I thought it returned an ifIndex from IF-MIB. Isn't that what you're looking for?


Top
 Profile  
 
PostPosted: Mon Jun 18, 2012 5:27 am 
Offline
New Member
New Member

Joined: Sat Jul 16, 2011 2:42 pm
Posts: 43
Location: UK
Certs: Ccna
bertschs wrote:
I thought it returned an ifIndex from IF-MIB. Isn't that what you're looking for?

If I query the dot1dStpRootPort I get this:
Code:
jj@scrutton test]$ snmpwalk -v 2c -c testcomm@10 testswitch 1.3.6.1.2.1.17.2.7
SNMPv2-SMI::mib-2.17.2.7.0 = INTEGER: 26

The root port on vlan 10 is g0/2, which I can believe is the 26th port, if I query the IF-MOB stuff, I get
Code:
IF-MIB::ifDescr.10102 = STRING: GigabitEthernet0/2

What I'm looking for now is a link between the two.

Sorry if this is obvious & I'm being stupid, SNMP is kind of new to me.

Cheers

J


Top
 Profile  
 
PostPosted: Mon Jun 18, 2012 6:30 am 
Offline
Senior Member
Senior Member

Joined: Wed Dec 29, 2010 1:01 pm
Posts: 485
Location: New York
Certs: CCNA
I believe 26 refers to the STP interface index, which is mapped to the ifTable.ifIndex in another table in one of the STP mibs. Not sure which but can look it up after my commute.

Sent from my DROID2 using Tapatalk 2

_________________
I don't have a signature.


Top
 Profile  
 
PostPosted: Mon Jun 18, 2012 8:01 am 
Offline
Member
Member

Joined: Sun Apr 17, 2011 7:06 pm
Posts: 232
Ahh, interesting. It happened to be the same on old IOS, but is now different on newer IOS where ifIndex == entityMIB index.


Top
 Profile  
 
PostPosted: Tue Jun 19, 2012 7:36 am 
Offline
New Member
New Member

Joined: Sat Jul 16, 2011 2:42 pm
Posts: 43
Location: UK
Certs: Ccna
bertschs wrote:
Ahh, interesting. It happened to be the same on old IOS, but is now different on newer IOS where ifIndex == entityMIB index.


Ok, better add in checking the IOS to decide what to query as well then, this looked so easy on paper...

Cheers

J


Top
 Profile  
 
PostPosted: Tue Jun 19, 2012 11:35 am 
Offline
Member
Member

Joined: Sun Apr 17, 2011 7:06 pm
Posts: 232
Well I'm sure there is a table somewhere that correlates the index in bridge MIB with the ifindex in ifmib. You just have to find it. :). Start digging through the MIB. Cisco has a nice MIB browser tool. Just google for Cisco MIB browser and then search for BRIDGE-MIB, or your specific OID. The MIB should specify what will be returned as a result.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group