Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!bellcore!ka9q.bellcore.com!karn From: karn@ka9q.bellcore.com (Phil Karn) Newsgroups: comp.protocols.tcp-ip Subject: Re: Number of TCP retries Message-ID: <17889@bellcore.bellcore.com> Date: 15 Oct 89 21:52:41 GMT References: <8910131633.AA12633@ucbvax.Berkeley.EDU> Sender: news@bellcore.bellcore.com Reply-To: karn@ka9q.bellcore.com (Phil Karn) Organization: Secular Humanists for No-Code Lines: 31 In article <8910131633.AA12633@ucbvax.Berkeley.EDU> craig@NNSC.NSF.NET (Craig Partridge) writes: >Uh... first a pushy question. Is your friend implementing TCP, or something >to run over an Ethernet? If he's running something over an Ethernet, fine, >but don't call it TCP. Otherwise some poor soul will try sometime later >to run it through a gateway, and will get badly flamed.... AMEN!! >> 1) If a packet is not acknowledged, how many times should TCP retry >> sending the packet before giving up? > > 10 is a nice number, *iff* you do exponential backoff. Personally, I like (and use) "infinity", but I seem to be a minority... >> 2) What is a reasonable time for a SYN packet to time out? > > start with 1/2 second or so, and exponentially back off. I think this is too small. 5-10 seconds is more realistic; remember it doesn't hurt to use longer timeouts except when the network is losing lots of packets, and then you don't want to add to the confusion. In my own implementation, I keep a cache of IP address vs smoothed round trip times and mean deviations. These are kept on a global basis, i.e., they're computed in addition to the per-connection calculations. When opening a new connection, I first check to see if there's an entry in the cache. If so, I initialize my SRTT and MDEV values from the cache. If not, I use a default (typically SRTT = 5 sec and MDEV = 0). Phil