Article View: fa.tcp-ip
Article #42Re: 4.2BSD tftp doesn't retransmit acks
From: lwa
Date: Sun, 13 Oct 1985 16:45
Date: Sun, 13 Oct 1985 16:45
63 lines
3784 bytes
3784 bytes
THAT IS NOT A BUG!!
The ORIGINAL tftp spec required retransmisson of ack's, as well
as of data packets, upon receiving any old packet. This algorithm
was shown to be faulty by Michael Greenwald at MIT. It has the
following problem:
Suppose host A is talking to host B. Suppose further that host
A's retransmit timeout is too short (a common case, since there is
no good way to determine an initial retransmit timeout). Now
observe what happens:
Host A sends packet 1
Host A's retransmit timer goes
off, and host A retransmits packet
1.
Host B receives packet 1, sends
ack 1.
Host A receives ack 1, sends
packet 2.
Host B receives retransmitted packet
1, retransmits ack 1.
Host A receives retransmitted
ack 1, retransmits packet 2.
Host B receives packet 2, sends
ack 2.
Host A receives ack 2, sends
packet 3.
Host B receives retransmitted packet
2, retransmits ack 2.
Host A receives retransmitted
ack 2, retransmits packet 3.
. .
. .
. .
Note that what has now happened is that every tftp packet is being transmitted
twice. Furthermore, if Host A's retransmit timer goes off too early again,
every packet will be transmitted three times, and so forth. This quickly
causes tftp performance to degrade to zero, and connections eventually time
out.
The current tftp spec avoids this problem by specifying that only data packets
are to be retransmitted in response to receipt of an old ack, and then only if
the ack is for the previously transmitted data packet. Acks are retransmitted
ONLY when the retransmit timer expires. I believe that this is the way the
Berkeley tftp currently (and correctly) behaves, and hence that Ron's "bug fix"
is in fact unnecessary and incorrect.
There are several other problems with the 4.2bsd tftp as distributed, including:
1) No support for netascii mode.
2) Relies on signals breaking through read() calls; this no longer
happens in 4.2 (instead the read() call is restarted after a signal).
3) Uses the same buffer for transmit and receive, thereby clobbering the
packet to be retransmitted if an old packet arrives.
4) Several other problems in the retransmit code.
I believe that the PC/IP people at MIT are shipping a completely new tftp implementation
for 4.2bsd as part of their PC/IP package. I suggest contacting John Romkey at MIT
(romkey@mit-borax.mit.edu, I think) for further information.
-Larry Allen
Apollo Computer
Technical Details
Message-ID:
<8510140712.AA13481@uw-beaver.arpa>Path:
arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!lll-crg!ucdavis!ucbvax!uw-beaver.arpa!apollo!lwaReferences:
<8510011831.AA02522@nprdc.arpa>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!lll-crg!ucdavis!ucbvax!uw-beaver.arpa!apollo!lwa From: lwa@apollo.UUCP Newsgroups: fa.tcp-ip Subject: Re: 4.2BSD tftp doesn't retransmit acks Message-ID: <8510140712.AA13481@uw-beaver.arpa> Date: Sun, 13-Oct-85 12:45:04 EDT Article-I.D.: uw-beave.8510140712.AA13481 Posted: Sun Oct 13 12:45:04 1985 Date-Received: Tue, 15-Oct-85 06:01:01 EDT References: <8510011831.AA02522@nprdc.arpa> Sender: daemon@ucbvax.ARPA Reply-To: tcp-ip@ucb-vax.arpa Organization: The ARPA Internet Lines: 63