02-07-2014 04:49 AM
Hi,
We have a problem sending larger files (ios in this case) to a c2960 switch via snmp over TFTP. We can however, send configuration files to the switch via snmp over TFTP. We have also tried different hardware, which also means different software in this case, but we are get the same result. while debuging the output for tftp on the switches we can see that the TFTP session breaks at block 128, see image bellow. However if we issue the copy tftp: flash: command the switch successfully downloads the IOS.
The SNMP command: snmpset -r 100 -t 100 -v 2c -c COMMUNITY x.x.x.x 1.3.6.1.4.1.9.2.10.12.y.y.y.y s filename
x=switch name
y=TFTP server name
filename = ios
Is there any restriction to SNMP that would block larger files?
02-08-2014 12:36 PM
Not sure of any such restriction, but you may have a incorrect/incomplete command, if it the same as above, you also have to include the file name confirmation for Flash.
From the management station command line, use the MIB object netToFlash to enter this information in order to transfer the IOS image file to the router:
snmpset 172.16.99.22 private .1.3.6.1.4.1.9.2.10.12.x.x.x.x s IOS_Filename .1.3.6.1.4.1.9.2.10.12.x.x.x.x
= "IOS_Filename"
For Example, if :
IOS Image File Name : c2600-i-mz.122-2.XA.bin
IP is : 10.10.10.1
snmpset 172.16.99.22 private .1.3.6.1.4.1.9.2.10.12.171.68.191.135 s c2600-i-mz.122-2.XA.bin enterprises.9.2.10.12.171.68.191.135 = "c2600-i-mz.122-2.XA.bin"
Please try this once and let me know if it works.
-Thanks
Vinod
**Rating Encourages contributors, and its really free. **
02-10-2014 12:50 AM
Hi,
Thanks for your reply.
When i try ur solution i get the following error:
"
No log handling enabled - turning on stderr logging
enterprises.9.2.10.12.x.x.x.x: Bad variable type ("=")
"
Command:
02-11-2014 10:30 AM
I was trying this in lab, but unfortunately, without success.
While reading the document for this process, the following line caught my attention, which says :
Please check the document here :
http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a008009463e.shtml#copying4
Is it working for other devices?
-Thanks
Vinod
02-12-2014 01:12 AM
We have tried on 2960,3560 and ME3400. Same result on all of em.
Tried a different approach to send the ios, failed aswell:
snmpset -v 2c -c COMMUNITY x.x.x.x 1.3.6.1.4.1.9.9.96.1.1.1.1.14.229 i 5
snmpset -v 2c -c COMMUNITY x.x.x.x 1.3.6.1.4.1.9.9.96.1.1.1.1.2.229 i 1
snmpset -v 2c -c COMMUNITY x.x.x.x 1.3.6.1.4.1.9.9.96.1.1.1.1.3.229 i 1
snmpset -v 2c -c COMMUNITY x.x.x.x 1.3.6.1.4.1.9.9.96.1.1.1.1.4.229 i 1
snmpset -v 2c -c COMMUNITY x.x.x.x 1.3.6.1.4.1.9.9.96.1.1.1.1.5.229 a y.y.y.y
snmpset -v 2c -c COMMUNITY x.x.x.x 1.3.6.1.4.1.9.9.96.1.1.1.1.6.229 s image/IOS_FILE
snmpset -v 2c -c COMMUNITY x.x.x.x 1.3.6.1.4.1.9.9.96.1.1.1.1.14.229 i 1
snmpset -v 2c -c COMMUNITY x.x.x.x 1.3.6.1.4.1.9.9.96.1.1.1.1.14.229 i 6
Im able to send configuration files but not ios files. Maybe there isnt a good way to send ios through SNMP..
02-12-2014 06:29 AM
It will not be possible this way. Copying configuration to and fro use CISCO-CONFIG-COPY-MIB, whereas copying IOS files usesOLD-CISCO-FLASH-MIB .
It is for devices which support or have Flash. This MIB is deprecated and old, the new MIB used now is CISCO-FLASH-MIB.
There are new variables and OIDs which can be used. Though I am sure it should support other File systesm as well, as devices now have multiple FS, but, I will have to test it further, there are no documents available, unfortunately.
OIDs are :
copyToFlashWithoutErase CopyProtocol CopyServerAddress CopySourceName CopyDestinationName (opt) CopyRemoteUserName (opt) CopyNotifyOnCompletion (opt)
-Thanks
Vinod
**Encourage Contributors. RATE them.**
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: