cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5801
Views
15
Helpful
2
Replies

snmpset cmds failing

jeff.bankston
Level 1
Level 1

Greetings.

I'm trying to use snmpset commands to perform a tftp action whereby I download a copy of the router's config to my tftp server. I've created a linux shell script to do this, and it all works except for the last line where I kick off the tftp action. The target is a Cisco 3640 running 12.2.28a IP Plus code, and I've verified that this code supports the desired actions.

Below is the script:

-----

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.2.666 i 1

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.3.666 i 1

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.4.666 i 3

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.6.666 s warehouse.txt

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.5.666 a 10.30.104.95

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.14.666 i 4

----------------------------------------

when the last line runs, I get the following error message:

Error in packet.

Reason: inconsistentValue (The set value is illegal or unsupported in some way)

Failed object: SNMPv2-SMI::enterprises.9.9.96.1.1.1.1.14.666

Can anyone please guide me to an answer? This is my first shot at doing this, our CiscoWorks won't be online for several months and I really need to get this working.

Thanks, Jeff

1 Accepted Solution

Accepted Solutions

nhabib
Level 9
Level 9

If you are issuing the commands on separate lines, you need to create (and wait) the row first and then activate it.

In other words, try these:

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.14.666 i 5

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.2.666 i 1

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.3.666 i 1

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.4.666 i 3

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.6.666 s warehouse.txt

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.5.666 a 10.30.104.95

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.14.666 i 1

View solution in original post

2 Replies 2

nhabib
Level 9
Level 9

If you are issuing the commands on separate lines, you need to create (and wait) the row first and then activate it.

In other words, try these:

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.14.666 i 5

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.2.666 i 1

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.3.666 i 1

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.4.666 i 3

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.6.666 s warehouse.txt

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.5.666 a 10.30.104.95

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.37 1.3.6.1.4.1.9.9.96.1.1.1.1.14.666 i 1

jeff.bankston
Level 1
Level 1

your changes got me _very_ close, close enough in fact that I saw what else I was doing wrong. The code below works perfectly to pull the running config. I had to change the 1.1.3 option to 4 so it'd pull the running config.

--------------------------

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.1 1.3.6.1.4.1.9.9.96.1.1.1.1.14.666 i 5

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.1 1.3.6.1.4.1.9.9.96.1.1.1.1.2.666 i 1

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.1 1.3.6.1.4.1.9.9.96.1.1.1.1.3.666 i 4

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.1 1.3.6.1.4.1.9.9.96.1.1.1.1.4.666 i 1

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.1 1.3.6.1.4.1.9.9.96.1.1.1.1.5.666 a 10.30.104.95

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.1 1.3.6.1.4.1.9.9.96.1.1.1.1.6.666 s warehouse.txt

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.1 1.3.6.1.4.1.9.9.96.1.1.1.1.14.666 i 1

/usr/bin/snmpget -c mycommunity -v 2c 10.255.3.1 1.3.6.1.4.1.9.9.96.1.1.1.1.10.666

/usr/bin/snmpset -c mycommunity -v 2c 10.255.3.1 1.3.6.1.4.1.9.9.96.1.1.1.1.14.666 i 6

-------------------------------

Thanks for the help, I thought I'd share my completed shell script with you so that others may benefit from our work and your great help.

-Jeff

Review Cisco Networking for a $25 gift card