From owner-freebsd-questions@FreeBSD.ORG Wed Nov 7 16:35:44 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 883B316A468 for ; Wed, 7 Nov 2007 16:35:44 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.freebsd.org (Postfix) with ESMTP id 1B11A13C4BD for ; Wed, 7 Nov 2007 16:35:43 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so213126uge for ; Wed, 07 Nov 2007 08:35:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; bh=aL/rROhJxf6d+D93O5GXOYKs2XW/WsASh3OUBYd1Fno=; b=HD02vJPr4QCicN5AVZof8+Q4dgh6jG9CqmA+RXenldQ38Kex2QDIvpXHS/rwT1TXlLoP3hOAaEd/+uj/n8cfw7HXWqOhBpJcn2zvPto6ig/6KGhkscuYmGEBeXStysDzoW4G+l26gI/gmwhYjyO0h5JG9GdvppBuXGtQklV4mHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=cz62Pa6/yrz3cPqs4j8gb35rPwZ6RpQLAcousgjQPo5Qaq+dI7lTgFCCPOxMzF3MhejgufiaYQ5YGEiBAqw6nsoNmILJAFBwUrXgT7fsdbOht8atF0RHb90lU1QUzbnwIEjAcqKXXaz/cfp0WiKO4YucSNOrQpdgh5eyxAtMCsk= Received: by 10.67.22.14 with SMTP id z14mr1103559ugi.1194453335828; Wed, 07 Nov 2007 08:35:35 -0800 (PST) Received: from ?192.168.2.2? ( [67.85.89.184]) by mx.google.com with ESMTPS id j4sm703538ugf.2007.11.07.08.35.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Nov 2007 08:35:34 -0800 (PST) Message-ID: <4731E94E.1000600@gmail.com> Date: Wed, 07 Nov 2007 11:35:26 -0500 From: "Aryeh M. Friedman" User-Agent: Thunderbird 2.0.0.6 (X11/20071107) MIME-Version: 1.0 To: Bram References: <4731E1A4.6020809@diomedia.be> In-Reply-To: <4731E1A4.6020809@diomedia.be> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: TCP/IP questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 16:35:44 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bram wrote: > Hi all, > > Can you change the timeout for a tcp connection ? Yes and no... Yes in that you can do it but no in that it will not have the effect your seeking... all you have to do is raise the default TTL value on IP. > I need to do the following: start a tcp connection , unplug the > network cable (it's actually wifi but the effect is the same),send > some data over the connection,wait 20 seconds , reinsert the > network cable and just keep working. Since the TTL for almost all FreeBSD packets is >20 (I am perhaps wrong since this is based largely on some low level protocol hacking I did way back in 2.X) but since it is set to something like 256 (it's max value) it means if a packet is lost/whatever it will *WAIT* 256 seconds before attempting to retransmit... in the mean time except for the delay as far as TCP is concerned the connection was never lost.... see www.ecip.org for a techinical overview of some possible (but not implemented) ways around this. > When you normally do this the connection will be dead. See above... it is not dead just inactive > Is there a way in freebsd to change this ? are there parameters > wich you can set so that the above would work (20 seconds without > network can happen) ? > > If not is there a common way to tunnel these tcp connections over > udp so that the problem doesn't happen. That request is oxymornic in the sense that the only diff between udp and tcp is the fact that tcp is "reliable" and udp is not so a clone of tcp running on udp *IS* tcp... that being said there are other possible error handling schemes and those are often implemented over udp. - -- Aryeh M. Friedman Developer, not business, friendly http://www.flosoft-systems.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHMelOsK9eX2QgtDIRAgz7AJ9Zr/3tngWjPxs2nz7l5yX9uZzsXgCcDsEb 8LcjUVsOwkp2xRnABAQoI+E= =AMG6 -----END PGP SIGNATURE-----