Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Assume computer A and B have established a TCP connection, now the according applications on both computers don't send any data for maybe 10 seconds (*). During this 10 seconds, is there anything flowing physically that is holding up the connection or is "a and b have an opened network connection" just a software based state on both computers? Thanks for any hint!

(*) Further assume the timeout is defined as e.g. 20 seconds, so the connection doesn't get broken.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

TCP/IP states are logical/abstract, and don't necessarily correspond to something happening in the physical world.

Here's the wikipedia link on TCP: http://en.wikipedia.org/wiki/Transmission_Control_Protocol

So, what you're talking about is an ESTABLISHED connection between two machines, where both machines have entries in their networking stacks saying that this port on that IP is connected to the other machine's IP/port, plus serial numbers and other accounting.

If you take an axe and sever the cable between them, then patch it up later, the connection may well still exist if they've been idle (and therefore haven't sent packets, waited to receive the acknowledgement of those packets, and given up on waiting).

share|improve this answer
    
+1 for the axe. Although a chainsaw or a katana would be even better. –  Massimo Feb 28 '12 at 11:06
    
What are you referring to with "plus serial numbers and other accounting"? –  joeqwerty Feb 28 '12 at 12:43
    
I meant the sequence and ack numbers. –  cjc Feb 28 '12 at 13:38

An idle TCP/IP connection is just that, idle.

No packets will be generated by the IP stack, which is why some applications implement keepalive messages to make sure firewalls and NAT routers don't time out the connection (eg. drop the connection state) after some amount of inactivity.

share|improve this answer
    
Optional TCP keepalive packets may be generated by TCP/IP stack. See here: en.wikipedia.org/wiki/Keepalive#TCP_keepalive –  Sandman4 Feb 28 '12 at 11:30
    
To be honest I wasn't even aware of the optional inclusion of TCP keep-alives as described in RFC1122. Sounds a little sketchy, though: "Implementors MAY include "keep-alives" in their TCP implementations, although this practice is not universally accepted". –  Roy Feb 28 '12 at 22:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.