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 02-16-2005, 04:02 AM   #1
emonette
LQ Newbie
 
Registered: Feb 2005
Location: Philippines
Posts: 2

Rep: Reputation: 0
KEEPALIVE does not detect disconnection at the expected time


Hello,

I hope you could help me out with my problem with keepalive.

I have programs in C that use sockets. In the code, I enabled the KEEPALIVE by setsockopt. Actually, I think the enabling worked because whenever the client connects and I issue the "netstat -top" command, I could see that the port used in the connection is in "keepalive" state. It is supposed to detect disconnection after 2.5 to 3 mins because I changed the following variables in /proc/sys/net/ipv4 :
tcp_keepalive_time = 30 seconds
tcp_keepalive_probes = 2
tcp_keepalive_intvl = 75 (default setting)

The problem is that it does not detect disconnection at the expected time. The moment I disconnected the LAN cable, the state of the port connection is changed to "on" and it is still ESTABLISHED, I checked it using the "netstat -top" command. Its not supposed to be like this right?. the connection is should be disconnected by this time but it only detects disconnection after 19-22 minutes.
That seems to be a pretty long delay right?

I would really appreciate any help.

Thank you very much
Monette
 
  


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
newbie, can only detect 1 network card at the time sirpelidor Linux - Networking 2 06-01-2005 12:04 PM
How to detect peer disconnection? rasanth Programming 3 09-08-2004 09:38 AM
Problem with 'KeepAlive' in AMSN timberwolf Linux - Networking 0 12-05-2003 03:08 AM
DSL keepalive nowonmai Linux - Networking 1 08-25-2003 09:16 AM
Apache KeepAlive question 360 Linux - Networking 4 06-22-2002 01:09 PM

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

All times are GMT -5. The time now is 01:49 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