Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

SNMP commands on RV042

Is there a way to change the passwords of our routers via an SNMP command?

We have multiple routers and would like to push a command to all when we need to change the password.

If so, what is the oid ?

thanks

  • Small Business Routers
3 REPLIES
New Member

That for sure can be done

That for sure can be done with a list of SNMP sets:

You First need to create a TXT document with the line you want to access.

For example, create a .txt file with just these 2 lines in the TFTP boot directory of your TFTP application:


enable password newpass
end


*** Note: the end statement is totally necessary.

Step 1 (Creating the Row).
================================

Please look into MIB ccCopyEntryRowStatus

snmpset  -v  2c  -c  private  10.10.10.2  1.3.6.1.4.1.9.9.96.1.1.1.1.14.222  i  5

NOTE: var_type is "i" for Interger

Value is 5 for createAndWait

In the MIB the last .222 is the entry index in the table. If the row is occupied then please destroy it first and try to create it and wait again.


Step 2 (Setting the protocol).
================================

We are going to use TFTP to transfer the device configuration with the OID ccCopyProtocol.

Please look into MIB ccCopyProtocol

snmpset  -v  2c  -c  private  10.10.10.2 1.3.6.1.4.1.9.9.96.1.1.1.1.2.222  i  1

NOTE: Value is 1 for tftp


Step 3 (Specifying  the Source).
================================

We are going to specify that what we want to copy is the file in your PC.

Please look into MIB ccCopySourceFileType

snmpset  -v  2c  -c  private  10.10.10.2  1.3.6.1.4.1.9.9.96.1.1.1.1.3.222  i  1

NOTE: Value is 1 for networkFile


Step 4 (Specifying the Destination).
================================

Once we have specified the Source, we need to tell what would be the destination to where
we are copying the file.

Please look into MIB ccCopyDestFileType

snmpset  -v  2c  -c  private  10.10.10.2  1.3.6.1.4.1.9.9.96.1.1.1.1.4.222  i  4

NOTE: Value is 4 for runningConfig


Step 5 (TFTP Server's Address).
================================

Let's now setup the IP address of the server where the TFTP service is currently running and where the configuration is going to get copied.

Please look into MIB ccCopyServerAddress

snmpset  -v  2c  -c  private  10.10.10.2  1.3.6.1.4.1.9.9.96.1.1.1.1.5.222  a

NOTE: var_type is "a" for IP address

Value is the TFTP server's IP address


Step 6 (Specifying the File name in the TFTP Server).
================================

Now, we need to tell the name of the file where the data is going to be sent to or stored (the one you create with the 2 lines).

Please look into MIB ccCopyFileName

snmpset  -v  2c  -c  private  10.10.10.2  1.3.6.1.4.1.9.9.96.1.1.1.1.6.222  s

NOTE: var_type is "s" for Display String. Sometimes the name could need " "

Value is the file name in the TFTP boot previously created with full privileges


Step 7 (Deploy the settings and run it).
================================

Last thing is deploying the settings so the config archive takes place. Before activating the row 222,  we must double-check that the TFTP service is up and running.

Is the service running?

If yes, then activate the row with the following snmpset.

Please look into MIB ccCopyEntryRowStatus

snmpset  -v  2c  -c  private  10.10.10.2  1.3.6.1.4.1.9.9.96.1.1.1.1.14.222 i 1

NOTE: Value is 1 for active.


Step 8 (Check the results).
================================

Check if the transfer was successful.

do a snmpwalk to 1.3.6.1.4.1.9.9.96.1.1.1.1.10.222

Results:

1:waiting
2:running
3:successful
4:failed

After that is done you should be able to access the device with the new password.

New Member

Thanks for the info!! Is

Thanks for the info!! Is there a document with all MIB options?

New Member

No actually a document but on

No actually a document but on this link:

http://snmp.cloudapps.cisco.com/Support/SNMP/do/BrowseOID.do?local=en

You can enter any OID and view all values and description.

49
Views
0
Helpful
3
Replies