On Nov 7, 5:54 pm, "Arie de Muynck" <no.s...@nospam.com> wrote:
>
> > FTP is a fairly complex protocol, which hands off the data transfer to
> > separate port pair so that the
> > control connection is available for further control traffic. TFTP is a
> > very simplified functional analog, which
> > just accepts a single command packet and sends multiple data packets
> > in return. There is no
> > connection, no error checking, no acknowledgements---so it doesn't
> > need more ports.
>
> You don't do his homework very good... (if it is homework).
I was sloppy, sorry, thanks for making me look it up again. I do
believe
I have a couple of points, though. Let's review:
> - There is state, with timeouts - I see that as a connection.
Cmon, if you say it this way, everything would be a connection. What
would
qualify as a no-connection by your criteria? a single packet exchange?
> - The error checking is in the checksums on the UDP and ETH layers. No need
> to add more. If the UDP were disabled (checksum zero) and another type of
> transport were used without a good CRC, I could agree. But that is unusual.
While it's true that UDP nowadays tends to have checksum turned on, it
really
is no substitute for higher-level error detection and correction.
Consider this:
I just collected a sample of 100 UDP packets from my network, and four
had invalid
checksum. It could have been a crappy implementation of DNS in some
embedded
device, or a software flaw in a router; I don't care. Stevens
discusses it here
http://uic.rsu.ru/doc/inet/tcp_steve..._user.htm#11_3
Without the protocol-level checks, ya just can't trust the data, so
you better do app-level checks.
I'm happy that e.g. Linux kernel will do a boot-time sanity check
while uncompressing
because I wouldn't absolutely trust the boot image received over
TFTP.
> - No acknowledgements? Each packet has a block number and gets acknowledged
> with the block number. The TFTP protocol is "so slow" because the next
> packet will not be send before the previous packet's ACK is received. No
> windowing here.
Yes, you're right, there are simple acks but the algorithm is the
simplest possible and,
ironically, vulnerable to both lockups and sorcerer's apprentice
blowup in packet loss situations.