2

This question arose from a dispute with a friend of mine. Over the last few weeks, I've encountered an odd phenomenon. All my connections are never torn down when I disconnect from the Internet. Even ssh sessions stay intact across reconnects. How is that possible?

The answers here state it is perfectly normal. Then the question is: why do get TCP connections always lost for some people after reconnecting to the internet even without NATs in between, which is the case with the friend of mine. Other than the internet provider, both setups are comparable: Linux over dial-up.

9
  • 1
    If we are on the phone, but for some reason stop talking, can you know if I am still there? I may have put the phone down and gon to the toilet. You can't know until you speak to me and I don't respond. Some protocols add time-outs so that servers don't have to remember huge numbers of absent clients. (I think ssh supports time-outs, but also supports without time-outs). Sep 27, 2012 at 22:24
  • So the question is: why do get TCP connections lost after reconnecting to the internet even without NATs (which is the case with a friend of mine. This question arose from a dispute among us)?
    – Holy Sheet
    Sep 27, 2012 at 22:26
  • @richard any idea?
    – Holy Sheet
    Sep 27, 2012 at 22:36
  • Connection to richard lost! Sep 27, 2012 at 22:45
  • 2
    As you see by trying to get my attention, you notice that I am no longer here. Or at least your operating system notices and then informs [you] the application. (well If I did not try to explain) Normally the connection lost does not come from me but from you noticing that I do not respond in a timely manner. Sep 27, 2012 at 22:48

1 Answer 1

3

This is normal. There is nothing in TCP that requires the link to be up permanently – if the connection is idle (no data sent or received), it can persist as long as both ends still have the socket open. (Of course, if one end tries to send data and never receives an ACK, it will eventually close the connection due to timeout.)

Unfortunately, this is often broken by stateful NATs/firewalls; for example, if you reboot your home router, it will forget everything in its NAT table, and might silently drop incoming data or even close the connection since it doesn't know anymore which local host to forward packets to.

1
  • As for your explanation, see question update
    – Holy Sheet
    Sep 27, 2012 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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