Thursday, May 28, 2015

TFTP blocksize ( be aware)

TftpServers and various network devices such as cisco routers and switches, some time has problems with tftp transfer if the blocksize is too small. Typical tftp uses a blksize of 512bytes. What this means, the max file chunk is configured at 512 bytes

NOTE: The size of the block will effect the overall transfer rate ( greater much quicker , lesser much slower )

Take this screenshot of a typical file size with the  blocksize against a tftp-server running on a macosx machine




Here's a tftp-server running on a cisco 2960 switch with various blocksizes defined by the client from 8 bytes to 9128 bytes

Okay so await a minute, we adjust the  client requested blocksize from 8 to 9128 bytes but the transfer speed for the same file-size of 7075041bytes stayed the same. A dump of  the packets during the tftp transfer will show that the blocksize was set only to 512bytes;

e.g





So no matter what the client requests, the block sent by the tftp-server was only set to 512bytes. So if I change the client to operate in binary mode, and request the file we also find out that the  tftp-server ( cisco ) ignores the requested blocksize and set all blocks served at 512bytes


e.g





So keep all of  this in mind when your complaining about why a tftp transfer takes so long.


Ken Felix
NSE ( Network Security Expert) and Route/Switching Engineer.
kfelix  -----a----t---- socpuppets ---dot---com

    ^     ^
=(  *  * )=
        o 
       /  \


Ken Felix
NSE ( Network Security Expert) and Route/Switching Engineer.
kfelix  -----a----t---- socpuppets ---dot---com

    ^     ^
=(  *  * )=
        o 
       /  \

No comments:

Post a Comment