LinuxQuestions.org
Visit Jeremy's Blog.
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, 10: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, 03:31 PM   #2
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 400

Rep: Reputation: 87
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, 03:54 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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 09:15 PM
Time out in Connection established state asurya Linux - Newbie 1 04-10-2005 03:48 PM
How to reset established connection? G-Fox Linux - Networking 4 10-02-2003 02:53 PM
Will select fail if connection couldn't be established? ruchika Linux - Software 0 09-10-2003 11:39 AM
problems with established connection nbc Linux - Newbie 1 08-16-2001 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration