Solaris' latency in re-connecting to a port (was: Are multiple connect()'s valid?)

Solaris' latency in re-connecting to a port (was: Are multiple connect()'s valid?)

Post by Cameron Lai » Fri, 13 Sep 1996 04:00:00





>[Marc Elewitz]

                        .
                        .
                        .
Quote:>| on the port.  Once the first has failed, no subsequent connect() ever
>| succedes - Solaris error: "broken pipe", OSF/1 error: invalid argument.
>|
>| It's as if something needs to be reset after the first failure.

>You need to close the file descriptor for the socket and call socket()
>again.

                        .
                        .
                        .
I have a question; I *think* it's related, but I'm
not sure.  What administrative control is available
over the latency to re-connect to a port?

Here's the situation I see:  start a server on a
port.  Connect clients--fine.  Try to start another
server on the same port--bind complains it's not
available on that port, which is also fine.  Connect
more clients, disconnect clients, life continues to
be good.  Shut down the server.  Start another
server--no, wait, the port is still not available.
Try again.  Continue trying, until some latency
(around 100 seconds with Solaris, five or six for
SunOS, ...) has expired--now the server binds to
the port, and life reverts to happiness.

Where can I learn more about that interval between
one process going away, and the emancipation of the
port to which it was connected?  Is this a symptom
of a server process that's not cleaning up after
itself properly?  Is there an administrative control
over the length of that time?  If so, what are the
security consequences to setting it too low?  I as-
sume Solaris has it set to a high value--at least
an order of magnitude longer than the latencies for
all the other Unixes I've administered--because
having it any lower leads to some vulnerability or
fragility in network communications.
--

Cameron Laird           http://starbase.neosoft.com/~claird/home.html

                        +1 713 996 8546 FAX

 
 
 

Solaris' latency in re-connecting to a port (was: Are multiple connect()'s valid?)

Post by Cameron Lai » Fri, 13 Sep 1996 04:00:00



                        .
                        .
                        .

Quote:>Where can I learn more about that interval between
>one process going away, and the emancipation of the
>port to which it was connected?  Is this a symptom
>of a server process that's not cleaning up after
>itself properly?  Is there an administrative control
>over the length of that time?  If so, what are the
>security consequences to setting it too low?  I as-
>sume Solaris has it set to a high value--at least
>an order of magnitude longer than the latencies for
>all the other Unixes I've administered--because
>having it any lower leads to some vulnerability or
>fragility in network communications.

                        .
                        .
                        .
TIME_WAIT.  That's the keyword.  'Sorry
about the distraction, folks; I'd been
thinking about this on and off for months,
then I finally posted, then I found the
answer in two places.  Typical.
--

Cameron Laird           http://starbase.neosoft.com/~claird/home.html

                        +1 713 996 8546 FAX

 
 
 

Solaris' latency in re-connecting to a port (was: Are multiple connect()'s valid?)

Post by D. Ro » Sat, 14 Sep 1996 04:00:00



: I have a question; I *think* it's related, but I'm
: not sure.  What administrative control is available
: over the latency to re-connect to a port?
:
You can get a list of tuneable parameters with
ndd -get /dev/tcp \?
(or /dev/udp or /dev/ip)
The value you are referring is named
tcp_close_wait_interval. Its default value is 240000 (ms)

For further details look at the manual page for ndd (1M)

Daniel

 
 
 

Solaris' latency in re-connecting to a port (was: Are multiple connect()'s valid?)

Post by Rick Jon » Sat, 14 Sep 1996 04:00:00



: : I have a question; I *think* it's related, but I'm
: : not sure.  What administrative control is available
: : over the latency to re-connect to a port?
: You can get a list of tuneable parameters with
: ndd -get /dev/tcp \?
: (or /dev/udp or /dev/ip)
: The value you are referring is named
: tcp_close_wait_interval. Its default value is 240000 (ms)

Instead of raising the bridge, how about lowering the river and using
SO_REUSEADDR, which should allow a new listen socket to be brought-up
after the old one was shut down.

The TIME_WAIT state (what is controlled by the
tcp_close_wait_interval) is an integral part of the correctness of the
Transmission Control Protocol (TCP). Without it, or with it greatly
reduced, you run an increasing risk of undetected data corruption.

Basically, the TIME_WAIT state is there to "absorb" any duplicated,
lost, delayed by routing through Pluto packets for a connection so a
new connection with the same "name" (local and remote IP address,
local and remote TCP port) will not receive those packets and possibly
accept them (since it has no way to know that it was for a prior
connection with the same name).

rick jones

 
 
 

1. how do I know 'From Where?' I am connected?

I have what might seem like a strange request, I want to log from where I
was connected.  Before you say for me to use w, who am i, or even last, they
wouldn't work here.  I will be logged in via a port.

This is what I have tried:

make an entry in  /etc/services
such as   testlog  1234/tcp

In inetd.conf I put:
testlog stream tcp nowait root testlog

I give inetd a kick.

when I telnet into my host with   telnet myhost 1234
The testlog script runs ok then logs me out as expected.  If the testlog is
a 1 liner  eg:  echo hi there
I get the 'hi there' printed before disconnecting me.
BUT since I did not log into a standard telnet port, no wtmp record was
created therefore LAST, W, WHO AM I
are all useless.  Is there an utility that if I run it, it tells me MY ip
address, not the ip address of the linux machine?

2. Shared object, dynamic class + polymorphism

3. How to identify ,through which IP address i'am connected ?

4. time problem with sol 2.4 on x86?

5. Netscape won't work after I am connected to my ISP

6. Error on memory test

7. Multiple 'connect' on ONE 'socket'?

8. ftape runs!

9. CORRECTION : Can't connect to Xserver SHOULD BE Can't connect to XVNCserver

10. can't send out email via pine and port 110 can't connected

11. Can't Connect To Port 80 Outside Of One's Domain

12. Connecting vt100's up to a linux box's tty ports?

13. How do I get 'w' to say that i am doing something else