LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-10-2005, 11:38 AM   #1
asurya
LQ Newbie
 
Registered: Apr 2005
Posts: 10

Rep: Reputation: 0
Time out in Connection established state if no Data flows on that connection


Hi All,

I have a doubt regarding the TCP state machine handling.
When the connection is in ESTABLISHED state ( After Three way Hand-Shake) and no data is flowing on that connection, for how much time, will that connection be in that state.
Will it remain in that state forever ? If no, to which state it will be moved?

Is this time out documented somewhere in Linux source code.(Is there any way to know the timeout)
Is the time out different for each application like FTP,Telnet etc or same for all TCP Connections?

Regards
Surya Santosh
 
Old 04-10-2005, 04:31 PM   #2
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 257

Rep: Reputation: 45
By no data, do you mean, no data being pushed into an end of the TCP data pipe, or do you mean, someone cut a wire somewhere.

I suspect it also depends on the SO_KEEPALIVE socket option.
ie. If the SO_KEEPALIVE option is not set, it should stay up indefinitely even if the wire is cut. If the keep alive option is set, and if the wire is not cut, then it should stay up indefinitely so long as the keep alive packets keep coming. (And that is at a TCP level, not application level.)

http://www.unixguide.net/network/socketfaq/4.7.shtml
 
Old 04-10-2005, 04:54 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
There's no timeout in TCP specification, if I remember correctly. Most implementations have a timer, however. It's about 2 hours. It's set somewhere in the kernel (network stack), because apps can change behaviour (SO_KEEPALIVE option), but don't have to.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disconnect An Established Connection metallica1973 Linux - Security 11 08-31-2005 10:15 PM
Time out in Connection established state asurya Linux - Newbie 1 04-10-2005 04:48 PM
How to reset established connection? G-Fox Linux - Networking 4 10-02-2003 03:53 PM
Will select fail if connection couldn't be established? ruchika Linux - Software 0 09-10-2003 12:39 PM
problems with established connection nbc Linux - Newbie 1 08-16-2001 02:11 AM


All times are GMT -5. The time now is 08:34 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration