2

I trying to copy a running config from a cisco switch using the snmp commands on a Cisco ASR1002.

On the Cisco ASR I enabled snmp-server manager by using this command:

conf t
   snmp-server manager
   exit

On the switch I want to pull the config from I add the ASR's IP to an access-list that has write privilege.

Then back on the ASR I want to run these commands:

snmp set v2c SWITCH_IP WRITE_STRING oid 1.3.6.1.4.1.9.9.96.1.1.1.1.2.333 integer 1
snmp set v2c SWITCH_IP WRITE_STRING oid 1.3.6.1.4.1.9.9.96.1.1.1.1.3.333 integer 4
snmp set v2c SWITCH_IP WRITE_STRING oid 1.3.6.1.4.1.9.9.96.1.1.1.1.4.333 integer 1
snmp set v2c SWITCH_IP WRITE_STRING oid 1.3.6.1.4.1.9.9.96.1.1.1.1.5.333 ip-address TFTP_SERVER
snmp set v2c SWITCH_IP WRITE_STRING oid 1.3.6.1.4.1.9.9.96.1.1.1.1.6.333 string routertest.txt
snmp set v2c SWITCH_IP WRITE_STRING oid 1.3.6.1.4.1.9.9.96.1.1.1.1.14.333 integer 1

However, I time out on the first command. I can ping from one device to the other. So I'm not sure if I'm missing another snmp-server setting that I need to set up.

1
  • Can you paste the config of snmp on the switch?
    – Mr.lock
    Commented Mar 4, 2017 at 12:08

1 Answer 1

2

I figured it out.

The ASR's IP address needs to be in an ACL on the device that you want to pull the config from. It must also have write privilege. The ASR also needs the IP address in an ACL from the device that you are trying to pull the config from. If you do a debug snmp packets on both devices you will see the communication waiting for responses from both devices.

Optional: If you are trying to push a file from another tftp server through SNMP the device that is receiving the file will also need an ACL with that server's IP address for it to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.