There is a “-n” option on the telnetd command that says “disable tcp keep-alives” The default is for the keep-alives to be enabled.

 

If I look at the /etc/xinetd.d/telnet file, I see the following :

 

[EMAIL PROTECTED] /root]# cat /etc/xinetd.d/telnet

# default: on

# description: The telnet server serves telnet sessions; it uses \

#       unencrypted username/password pairs for authentication.

service telnet

{

        flags           = REUSE

        socket_type     = stream

        wait            = no

        user            = root

        server          = /usr/sbin/in.telnetd

        log_on_failure  += USERID

        disable         = no

}

 

based on the value of the “server” entry, it doesn’t appear that the “-n” option should be coming into play.

 

Donnie Jacobs

Sr Developer

GC Services LP

713-776-6503

[EMAIL PROTECTED]

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Robert Porter
Sent: Friday, January 30, 2004 3:09 PM
To: [EMAIL PROTECTED]
Subject: RE: lost tcp/ip connections

 

Are you logging in by telnet or ssh?    I'm wondering if your daemon is doing something funny with keepalive for some reason. Some telnetd's do have an option to turn it off.  Try a man in.telnetd or just man telnetd  to see if that's a possibility.

 

rfp



>>> [EMAIL PROTECTED] 01/30/04 02:37PM >>>

Hi Robert,

 

Thanks for the information…I’ve tried what you suggested. I modified the tcp_keepalive_time, tcp_keepalive_intvl, and tcp_keepalive_probe settings. Below is how they’re currently set….

 

[EMAIL PROTECTED] /root]# more /proc/sys/net/ipv4/tcp_keepalive_*

::::::::::::::

/proc/sys/net/ipv4/tcp_keepalive_intvl

::::::::::::::

30

::::::::::::::

/proc/sys/net/ipv4/tcp_keepalive_probes

::::::::::::::

5

::::::::::::::

/proc/sys/net/ipv4/tcp_keepalive_time

::::::::::::::

60

 

 

I set these up in the init script and rebooted the machine, verified that they were still in place and then did the whole connect / unplug cable / reconnect cable bit.

 

 

Based on these settings, I would have thought that after 60 seconds of inactivity, that I would get a max of 5 probes at 30 second intervals, and if no response was received, the connection would die.  That should be a total of…60 seconds + (30 seconds * 5 tries = 150) = 210 seconds or just under 4 minutes…

 

 

However, I’ve been back in for about 15 minutes now, and still see both logins when I do the who….

 

Did I miss something?

 

Thanks,

 

Donnie Jacobs

Sr Developer

GC Services LP

713-776-6503

[EMAIL PROTECTED]

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Robert Porter
Sent: Friday, January 30, 2004 1:19 PM
To: [EMAIL PROTECTED]
Subject: Re: lost tcp/ip connections

 

That's a TCP/IP keepalive timeout... 

The setting is viewable and changable - It should be found at /proc/sys/net/ipv4/tcp_keepalive_time

Changing it won't survive a reboot though. You'll either need to change it every time or do so in a script at init.

 

rfp

 



>>> [EMAIL PROTECTED] 01/30/04 01:12PM >>>
Hello all,

I'm wondering if there's a way within Linux to detect when a tcp/ip connection is lost. Here's the scenario...

I telnet to my linux machine from my PC. I then disconnect my Ethernet cable  (simulating a network failure, loss of broadband service, etc..) Then I reconnect my Ethernet cable and telnet into the linux machine again.

If I do a "who" command, I see the old connection as well as my current connection.

Running RedHat Linux 8, universe 10.0.13

I've tried several variations of netstat, who, etc...to try and identify these "stranded" connections, with no luck.


Any ideas?

Thanks,
Donnie Jacobs
Sr Developer
GC Services LP
713-776-6503
[EMAIL PROTECTED]

_______________________________________________
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

_______________________________________________
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to