Quantcast
Channel: mrn-cciew
Viewing all articles
Browse latest Browse all 323

Did you notice slow TFTP in 3850 ?

$
0
0

If you have done IOS upgrade of this latest Cisco 3850 switch you may noticed a TFTP file transfer is taking longer time.

I have come across this issue multiple times & it almost took more than 20 min to copy ~250MB image to switch flash when using TFTP.  As shown in the below it took 1548s (~26min) to copy the image via TFTP & my transfer speed was ~1.3Mbps (166150 Bytes/Sec)

3850-Slow TFTP-01

3850-2#copy tftp://10.128.13.2/cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin flash:
Destination filename [cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin]? 
Accessing tftp://10.128.13.2/cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin...
Loading cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin from 10.128.13.2 (via Vlan1600): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 257243236 bytes]

257243236 bytes copied in 1548.260 secs (166150 bytes/sec)

Tried with different TFTP servers, different Operating Systems (Windows, MAC OX,etc) & every time it took more than 25 mins.

Then I did the same file transfer via FTP . This time it took only around 261s (4.3 min) & copied 7.5 Mbps (984249 Bytes/Sec) which is much better than the TFTP transfer speed  which was ~ 1.3 Mbps.

3850-2#copy ftp://10.128.8.214/firmware/cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin flash:
Destination filename [cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin]? 
Accessing ftp://10.128.8.214/firmware/cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 257243236/4096 bytes]

257243236 bytes copied in 261.360 secs (984249 bytes/sec)

Here is the file transfer rate If I do it via USB stick directly attached to the switch. As you can see file transferred within 60s & I got around 32.8Mbps (4295262 Bytes/Sec)  transfer rate. If it is new installation, you can use this method, but in a existing network IOS upgrade , it is practically difficult to use this method as you have to physically attach USB on to the switches.

3850-2#copy usbflash0:cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin flash:
Destination filename [cat3k_caa-universalk9.SPA.03.03.02.SE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ec)

Based on the above, I did not have clear understanding why TFTP is that slow in this latest & greatest 3850 switch. But I stopped using TFTP for IOS image upgrade, instead get used to FTP method. I posted this thread on 30th September 2013 in CSC forum to find an answer. There was not direct answer to this for past 6 months. It all changed yesterday as I noticed Luke Primm from Cisco gave me the clear reason for this slow TFTP speeds & how to overcome that . Here is Luke’s word in response to my query.

Hello Rasika,
By default, the Catalyst 3850 uses a tftp block size value of 512, which is the lowest possible value.  The reasoning behind this default value is to ensure interoperability with legacy tftp servers.

For IOS-XE version 3.3.2 and below, you will have to manually change the block size in the global configuration to speed up the transfer process.  The example below is a transfer comparison when using the default block size of 512K versus a transfer using the maximum block size value of 8192K.

Hope that helpls
Luke

So here is how I can fix my slow TFTP transfer rate of this 3850 switch. You have to increase the TFTP blocksize from 512 bytes (min) to 8192 bytes (max)

3850-2(config)#ip tftp ?         
  blocksize         Specify TFTP client blocksize
  boot-interface    Force interface to use for TFTP booting
  min-timeout       Set minimum timeout period for retransmission
  source-interface  Specify interface for source address in TFTP connections

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

3850-2(config)#ip tftp blocksize 8192

Before go ahead & do the file transfer test & compare the result, let’s look at how this increased TFTP blocksize works.   RFC2348-TFTP Blocksize Option describe what options you can have. When you configure increased blocksize, TFTP client will initiate (if you copy a file to TFTP client)  the request with  blocksize option to set that increased value. Here in my example you can see 3850-2 switch send TFTP Read Request with blocksize 8192 as an option.

3850-Slow TFTP-03

If the server is willing to accept the blocksize option, it sends an Option Acknowledgment (OACK) to the client.  The specified value must be less than or equal to the value specified by the client.  The client must then either use the size specified in the OACK, or send an ERROR packet, with error code 8, to terminate the transfer. In my case TFTP server accept this block size and send OACK.

3850-Slow TFTP-04So client is confirming usage of the increased block size & informing server that it is ready to accept data block 1.

3850-Slow TFTP-05Then data transfer starts with 8192 octet block sizes & here is the block 1.

3850-Slow TFTP-06So here is the final result with blocksize of 8192. As you can see below same file copied less than 2 mins

3850-2#copy tftp://10.128.13.2/cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin flash:
Destination filename [cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin]? 
Accessing tftp://10.128.13.2/cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin...
Loading cat3k_caa-universalk9.SPA.03.03.02.SE.150-1.EZ2.bin from 10.128.13.2 (via Vlan1600): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 257243236 bytes]

257243236 bytes copied in 118.770 secs (2165894 bytes/sec)

As you can see, ~250MB file transfers less than 120s (or 2 min) & speed I was getting it ~16.5Mbps (2165894 bytes/Sec). This is a really great & TFTP file transfer rates won’t be slow it down.

3850-Slow TFTP-02So bottom line is configure “ip tftp blocksize 8192” command on your 3850 switch configuration as template command as long as that is supported by your TFTP server.

This is important as IOS-XE images are 250-300MB in size.  In legacy switches, even with 512 block size slow file transfer rates may not affect as image sizes are less than 32MB in size most of the cases. But I doubted you would waste 20min to copy a image across for a switch upgrade.

Thanks Luke :smile:



Viewing all articles
Browse latest Browse all 323

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>