08-22-2013 09:17 AM
hello, community.
today i was doing some nm tasks using snmp and suddenly i have a question.
I'm trying to query the 3G WAN module, for example c3gModemState which has the OID of 1.3.6.1.4.1.9.9.661.1.1.1.3
so i did
root@linux:/# snmpget -v 2c -c public 192.168.1.58 1.3.6.1.4.1.9.9.661.1.1.1.3
iso.3.6.1.4.1.9.9.661.1.1.1.3 = No Such Instance currently exists at this OID
hmmm, no value. At this point I realized that probably i need something like an index (similar to ifIndex) to distinguish several 3G modules within the same device. So i did:
root@linux:/# snmpwalk -v 2c -c public 192.168.1.58 1.3.6.1.4.1.9.9.661.1.1.1.3
iso.3.6.1.4.1.9.9.661.1.1.1.3.23 = INTEGER: 2
voila, i got the value. Here comes the question: what is this index 23 and what is the way to find it out without doing the walk?
I tried to pull all the values 23, hoping to get some interface description or name, and one of my findings revealed that 23 is probably the module index, but I'm not sure if i've found the right thing:
root@linux:~# snmpwalk -v 2c -c public 192.168.1.58 1.3.6.1.2.1.47.1.1.1.1.7
iso.3.6.1.2.1.47.1.1.1.1.7.1 = STRING: "CISCO2901/K9 chassis"
...
iso.3.6.1.2.1.47.1.1.1.1.7.20 = STRING: "Container of powerSupply Containers"
iso.3.6.1.2.1.47.1.1.1.1.7.21 = STRING: "Container of Power Supply"
iso.3.6.1.2.1.47.1.1.1.1.7.22 = STRING: "C1941/C2901 AC Power Supply"
iso.3.6.1.2.1.47.1.1.1.1.7.23 = STRING: "Modem 0 on Cellular0/3/0"
Best regards,
Arseniy S. Ivanov
Solved! Go to Solution.
08-22-2013 10:47 AM
Hello Arseniy,
if you search in the MIB-file for C3gWanCommonEntry, you'll find:
INDEX { entPhysicalIndex }
entPhysicalIndex is a not-accessible object of the ENTITY-MIB: 1.3.6.1.2.1.47.1.1.1.1.1, but you've already found .7 which is entPhysicalName - perfect for the identification.
So you've already found the answer yourself ;-)
Best regards
Rolf
08-22-2013 10:47 AM
Hello Arseniy,
if you search in the MIB-file for C3gWanCommonEntry, you'll find:
INDEX { entPhysicalIndex }
entPhysicalIndex is a not-accessible object of the ENTITY-MIB: 1.3.6.1.2.1.47.1.1.1.1.1, but you've already found .7 which is entPhysicalName - perfect for the identification.
So you've already found the answer yourself ;-)
Best regards
Rolf
08-22-2013 11:40 AM
Thanks, Rolf,
i'm glad I got it right, thanks for confirmation.
Best regards,
Arseniy S. Ivanov
08-22-2013 12:08 PM
You're welcome. Thanks for rating and marking as solved.
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