I'm using tftp server (tftpd-hpa) for booting from PXE via LAN. I know, that default block size for TFTP protocol is 512 bytes, and for it download speed is very slow. It can accelerate changing default 512 bytes block to for example 16268B.
But I don't know how to set blksize, when I tried add it as option in TFTP_OPTIONS= in /etc/default/tftp-hpa I got tftp-hpa services error about bad config file.
So my question is How can I set tftp block size bigger than 512bytes (no max block size option)
1 Answer
I was able to get this working with xinet.d running the tftp-hpa service.
In the xinetd.d/tftp file, I added --blocksize 1468
service tftp
{ socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpfolder --verbose --blocksize 1468 disable = no per_source = 11 cps = 100 2 flags = IPv4
}After looking at the behavior, clients that do not specify a blocksize option per the RFC will continue to get the default 512 blocksize unfortunately. Clients that do provide the blocksize option can now get up to the maxblocksize option I have set. Mine is set under the fragmentation size, as we are running over WAN, but you can likely use the larger size as long as your clients can request a larger size as well.