06-15-2010 12:46 AM
Hi,
I have a cisco catalyst 2690 switch.
I want monitoring IP, MAC, and Port Address.
I use this docu: http://docstore.mik.ua/orelly/perl/sysadmin/ch10_03.htm
This works great:
htvtef7-nagios:/ # snmptranslate -On BRIDGE-MIB:dot1dTpFdbTable
.1.3.6.1.2.1.17.4.3
snmpwalk -c tef7snmp@761 -v 2c 10.76.1.7 .1.3.6.1.2.1.17.4.3
htvtef7-nagios:/ # snmptranslate -On BRIDGE-MIB:dot1dBasePortTable
.1.3.6.1.2.1.17.1.4
snmpwalk -c tef7snmp@761 -v 2c 10.76.1.7 .1.3.6.1.2.1.17.1.4
htvtef7-nagios:/ # snmptranslate -On CISCO-STACK-MIB:vlanTable
.1.3.6.1.4.1.9.5.1.9.2
But I get a error:
htvtef7-nagios:/ # snmpwalk -c tef7snmp -v 2c 10.76.1.7 .1.3.6.1.4.1.9.5.1.9.2
SNMPv2-SMI::enterprises.9.5.1.9.2 = No Such Object available on this agent at this OID
Switch config:
snmp-server community testament RO
snmp-server community tef7snmp RO
snmp-server location XYZ
snmp-server contact MR.XYZ
snmp-server enable traps snmp authentication linkdown linkup coldstart warmstart
snmp-server enable traps tty
snmp-server enable traps cluster
snmp-server enable traps entity
snmp-server enable traps cpu threshold
snmp-server enable traps vtp
snmp-server enable traps vlancreate
snmp-server enable traps vlandelete
snmp-server enable traps flash insertion removal
snmp-server enable traps port-security
snmp-server enable traps envmon
snmp-server enable traps mac-notification
snmp-server enable traps copy-config
snmp-server enable traps config
snmp-server enable traps bridge newroot topologychange
snmp-server enable traps stpx inconsistency root-inconsistency loop-inconsistency
snmp-server enable traps syslog
snmp-server enable traps vlan-membership
snmp-server host XXX.XXX.XXX.XXX public
snmp-server host YYY.YYY.YYY.YYY tef7snmp
What did I do wrong?
THX!
06-15-2010 08:41 AM
Assuming you're referring to a 2960, I don't think you did something "wrong" in terms of those snmp-server configs. The IOS and/or 2960 combo simply might not have support for the CISCO-STACK-MIB. To verify, post the output of "show snmp mib" from the switch, in enable mode. Or, check the Cisco Feature Navigator: http://tools.cisco.com/ITDIT/CFN/
06-16-2010 12:56 AM
Thx for the replay!
I use on the switch c2960-lanbasek9-mz.122-25.SEE3.bin (IOS),
the Cisco Feature Navigator say, this IOS support the CISCO-STACK-MIB:
In show snmp mib I could not find the vlanTable. See the attachment.
I du not understand!
06-16-2010 08:20 AM
It does have vlanTable support. The following in the "show snmp mib" output are what you're looking for (where "cisco" is equivalent to ".1.3.6.1.4.1.9")
cisco.5.1.9.2.1.1 => 1.3.6.1.4.1.9.5.1.9.2.1.1 / vlanIndex
cisco.5.1.9.2.1.2 => 1.3.6.1.4.1.9.5.1.9.2.1.2 / vlanSpantreeEnable
cisco.5.1.9.2.1.3 => 1.3.6.1.4.1.9.5.1.9.2.1.3 / vlanIfIndex
You can look up what each means here;
So what you want to do is
snmpwalk .1.3.6.1.4.1.9.5.1.9.2.1.1
snmpwalk .1.3.6.1.4.1.9.5.1.9.2.1.2
snmpwalk .1.3.6.1.4.1.9.5.1.9.2.1.3
then correlate across thpse results, as well as the other OIDs in your original post.
06-17-2010 03:22 AM
did not work
htvtef7-nagios:/usr/share/snmp/mibs # snmpwalk -v 2c -c tef7snmp 10.76.1.7 .1.3.6.1.4.1.9.5.1.9.2.1.1
SNMPv2-SMI::enterprises.9.5.1.9.2.1.1 = No Such Instance currently exists at this OID
htvtef7-nagios:/usr/share/snmp/mibs # snmpwalk -v 2c -c tef7snmp 10.76.1.7 .1.3.6.1.4.1.9.5.1.9.2.1.2
SNMPv2-SMI::enterprises.9.5.1.9.2.1.2 = No Such Instance currently exists at this OID
htvtef7-nagios:/usr/share/snmp/mibs # snmpwalk -v 2c -c tef7snmp 10.76.1.7 .1.3.6.1.4.1.9.5.1.9.2.1.3
SNMPv2-SMI::enterprises.9.5.1.9.2.1.3 = No Such Instance currently exists at this OID
cisco snmp mibs V1 and V2 have a difference?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide