0

I am sending a set of .bin files via TFTP from Windows server to Linux client. When I send files < 50KB, the file is being sent successfully but any larger files is not being sent.

I use Python socket.py module to send and receive files and acknowledgments respectively.

I am thinking in the following directions :

(1) MTU - buffer size - (currently changed to 9000)

(2) Firewall preventing larger files ?

(3) Duplex settings mismatch - (currently set to 100 Mbps FULL Duplex - does not work under autonegotiation)

(4) Any configurations specific to Windows (the same file is sent successfully from Linux machine tftp server)

What could be the possible problems? Please help me narrow down the scope of the issue.

  • 1
    It's difficult to guess what's going on given the information you have shared. Your reference to python socket.py suggests you're writing your own tftp implementation. Why? But if you do have some compelling reason to do so, you should understand that it is the responsibility of the receiver to acknowledge buffers received, and the sender's responsibility to resend packets that were not acknowledged. It seems likely that the receiver is running out of buffer space. Since tftp is UDP-based, any lost packets are discarded and gone forever, which is why the sender must resend. – Gil Hamilton Mar 01 '21 at 14:31
  • Buffer size: probably doesn't matter, but with 9000 MTU, if a packet *is* lost or corrupted, the entire 9000 bytes is lost. If you stick with smaller buffers, only the smaller single missed buffers need to be resent. Firewall -- unlikely but who knows? It depends on the exact software. Duplex settings mismatch -- extremely unlikely: allow autonegotiation to do its thing. – Gil Hamilton Mar 01 '21 at 14:37
  • @GilHamilton I am using Python because I am required to port an already existing program from Linux to Windows. I am only concerned about the windows-specific changes. – sanjanaraju_inde Mar 01 '21 at 14:49
  • @GilHamilton I have checked with MTU 1500 itself but no change. – sanjanaraju_inde Mar 01 '21 at 14:51
  • @sanjanaraju_inde What "Windows-specific changes" are you referring to? Sockets work the same way on Windows as they do on Linux. Please show the actual code you are having trouble with. Also, are you aware that TFTP has a hard 32MB limit on file transfers by default? To transfer larger files, there are a few different options you can do. For instance, the TFTP Blocksize Option ([RFC 2348](https://tools.ietf.org/html/rfc2348)), which pushes the limit to 91MB. For even larger files, you need to employ different strategies. See [Extending TFTP](https://www.compuphase.com/tftp.htm) for details – Remy Lebeau Mar 01 '21 at 19:31
  • @GilHamilton I do not think there is any problem with the code itself but you were right about the filesize. One of the files is greater than 32 MB. How do I enable this TFTP Blocksize option RFC 2348, if the implementation of TFTP is through Python's socket module? – sanjanaraju_inde Mar 02 '21 at 08:13

0 Answers0