TFTP Timeout while updating Cisco IOS

Recently I was trying to upgrade the IOS version on a Cisco 3750 Layer 3 Switch. However, I kept getting timeout issues – see below.

Switch#copy tftp flash
Address or name of remote host?
Source filename? c3750-ipservicesk9-mz.150-2.SE11.bin
Destination filename? c3750-ipservicesk9-mz.150-2.SE11.bin
Accessing tftp://
Loading c3750-ipservicesk9-mz.150-2.SE11.bin from (via Vlan1): !

This was puzzling because the setup was rather simple. The switch was not in production so the traffic workload was simply the TFTP traffic between the switch and the admin PC. This was very much a lab setting, no other devices involved. I was using my laptop with Tftpd running serving the update IOS file.

I had tried multiple things like swapping out the Ethernet cable, re-downloading the the update file, I had even tried using a different computer, and different TFTP software – however ended with the same result.

I did see that space was a little tight on the flash memory. There was folder that contained the current version of IOS running on the 3750. I had to delete that to make some room. Deleting a folder on IOS takes a few more options than just deleting a file:

Switch#delete /recursive /force flash:c3750-ipbasek9-mz.122-58.SE2

I did notice a couple of things with the TFTP: first, that in the Tftpd window was that the error counter was ticking up throughout the transfer process. Second, was that during the initial transfer there seemed to be some negotiation of transfer rate that Tftpd was trying to do.

So, I tried two things: First I increased the Timeout and Max Retransmit settings in Tftpd. The default is 3 and 6. I increased it to 5 and 10.

Next, I set the max TFTP transfer rate on the 3750. To do this you use the command ip tftp blocksize.

Switch(config)#ip tftp blocksize ?
  <512-8192>  blocksize value

The blocksize is a range between 512-8192. When the switch was ogirinally trying to negotiate with TFTP I saw TFTP was trying 1024 first. The Cisco Swtich default TFTP blocksize is 512. I set it manually to 8192 thinking that larger blocksize would lead to a speeder transfer and result in fewer timeouts.

Switch(config)#ip tftp blocksize 8192

With the increased transfer rate set, and the timeout and max re-transmits increased I was finally able to get the IOS update file transferred!

I believe the root cause of the issue here may have been the fact that the switch was old and tired and the PC serving up the IOS update was modern and perhaps wanted to move a little faster than the switch.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s