Use Cisco SNMP ping mib

Answered Question
Aug 20th, 2009

Hello, I am trying to use the mib on this page:

http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094e8e.shtml

This is the line I am having issues with:

snmpset -c public Router_Source .1.3.6.1.4.1.9.9.16.1.1.1.3.333 octetstringhex “AB 44 76 67”

I can, using a linux server, get to the last part of the command, where I enter my remote ip in hex that I want to ping, but it will not go any further.

Here is what I get:

snmpset -c communitystring routerip .1.3.6.1.4.1.9.9.16.1.1.1.3.333 octetstringhex "AC 18 00 02"

.1.3.6.1.4.1.9.9.16.1.1.1.3.333: Unknown Object Identifier (Sub-id not found: (top) -> AC 18 00 02)

I tried without the quotes and get this error:

snmpset -c communitystring routerip .1.3.6.1.4.1.9.9.16.1.1.1.3.333 octetstringhex AC 18 00 02

18: Bad object type: 0

I have tried with quotes, without quotes, spaces and no spaces. Can someone point out what I'm missing? Thanks.

I removed the community and router ip obviously. Those are present in the command when I try running it.

I have this problem too.
0 votes
Correct Answer by Joe Clarke about 7 years 3 months ago

No. net-snmp defaults to SNMPv3. Try:

snmpset -v 1 -c communitystring routerip .1.3.6.1.4.1.9.9.16.1.1.1.3.333 x "AC 18 00 02"

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Joe Clarke Thu, 08/20/2009 - 09:04

I assume you're using net-snmp. If so, the command is:

snmpset -c communitystring routerip .1.3.6.1.4.1.9.9.16.1.1.1.3.333 x "AC 18 00 02"

dj_oberry Thu, 08/20/2009 - 10:03

I now get this message using that:

snmpset -c communitystring routerip .1.3.6.1.4.1.9.9.16.1.1.1.3.333 x "AC 18 00 02"

snmpset: No securityName specified

I'm guessing that there is an additional setting in the router I need at this point?

Correct Answer
Joe Clarke Thu, 08/20/2009 - 10:05

No. net-snmp defaults to SNMPv3. Try:

snmpset -v 1 -c communitystring routerip .1.3.6.1.4.1.9.9.16.1.1.1.3.333 x "AC 18 00 02"

dj_oberry Thu, 08/20/2009 - 10:14

v 1 failed, but v 2c gets me this, which looks to be right? (Sorry not sure if this is the response I'm needing or if I should get another.)

snmpset -v2c -c communitystring routerip .1.3.6.1.4.1.9.9.16.1.1.1.3.333 x "AC 18 00 02"

SNMPv2-SMI::enterprises.9.9.16.1.1.1.3.333 = Hex-STRING: AC 18 00 02

Actions

This Discussion