Showing results for 
Search instead for 
Did you mean: 

SNMP, netToFlash problems.



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 s filename

x=switch name

y=TFTP server name

filename = ios

Is there any restriction to SNMP that would block larger files?

5 Replies 5

Vinod Arya
Cisco Employee
Cisco Employee

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 private . s IOS_Filename .
= "IOS_Filename"

For Example, if :

IOS Image File Name : c2600-i-mz.122-2.XA.bin

IP is :

snmpset private . s c2600-i-mz.122-2.XA.bin enterprises. = "c2600-i-mz.122-2.XA.bin"

Please try this once and let me know if it works.

**Rating Encourages contributors, and its really free. **

-Thanks Vinod **Rating Encourages contributors, and its really free. **


Thanks for your reply.

When i try ur solution i get the following error:


No log handling enabled - turning on stderr logging

enterprises. Bad variable type ("=")




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 :

  • Not applicable for Catalyst switches based on Cisco IOS® software, such as the Catalyst 2900/3500XL series.

Please check the document here :

Is it working for other devices?


-Thanks Vinod **Rating Encourages contributors, and its really free. **

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 i 5

snmpset -v 2c -c COMMUNITY x.x.x.x i 1

snmpset -v 2c -c COMMUNITY x.x.x.x i 1

snmpset -v 2c -c COMMUNITY x.x.x.x i 1

snmpset -v 2c -c COMMUNITY x.x.x.x a y.y.y.y

snmpset -v 2c -c COMMUNITY x.x.x.x s image/IOS_FILE

snmpset -v 2c -c COMMUNITY x.x.x.x i 1

snmpset -v 2c -c COMMUNITY x.x.x.x i 6

Im able to send configuration files but not ios files. Maybe there isnt a good way to send ios through SNMP..

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
                                CopyDestinationName (opt)
                                CopyRemoteUserName (opt)
                                CopyNotifyOnCompletion (opt)

**Encourage Contributors. RATE them.**

-Thanks Vinod **Rating Encourages contributors, and its really free. **
Getting Started

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:

Recognize Your Peers