Visit Our UNIX and Linux User Community


tcp timout


 
Thread Tools Search this Thread
Special Forums IP Networking tcp timout
# 1  
Old 12-02-2001
tcp timout

I am led to understand that there when a port is bound for a tcp connection...once that connection is closed there is a timeout period before that port can be reused ... and the software I am using shows that. How long is this timeout - what affects it and is there anyway to reuce the timeout?
# 2  
Old 12-03-2001
The timeout depends on your kernel. There is an RFC standard which specifies the maximum TIME_WAIT as (I believe) 4 minutes. Note that is a maximum, most times it will be much less than that. The most I have seen under Linux is 2 minutes. YMMV depending on the vendor.
# 3  
Old 12-03-2001
Okay cool - so no hard and fast rule....especially as I'm working across a number of platforms. I have since noticed that closing the connection has a much shorter time out thank a kill. So I'm happy enough with the delay now. ThanksSmilie
# 4  
Old 12-10-2001
Yes, if you close the connection cleanly you should have no (noticeable) TIME_WAIT delay. If you 'kill' the process without a clean shutdown, or if it crashes you will generally get the delay.
# 5  
Old 12-14-2001
The TIME_WAIT state follows the termination of a TCP connection and it lasts for double the time MSL (Maximum Segment Lifetime).
The MSL is the time required for a segment to travel from the source to the destnation. The TIME_WAIT state varies from two to four minutes, usually. If you want to reduce this time period you have to set the SO_LINGER socket option and set the l_linger member of the struct linger to zero. This will cause TCP to send a RST message instead of the normal termination messages, when the close system call is executed.
Allthough that will abort the TIME_WAIT state it is not a good idea to do so, because there is the possibility to receive a segment from the previous connection.

Last edited by developer; 12-14-2001 at 09:27 PM..
# 6  
Old 12-29-2001
Wonderful! developer.

Just as the descripition achieved by Mr. W.Richard Stevens in his famous "UNIX Network programming Volume 1", the TIME_WAIT state is friendly to all of us. So obviously avoiding this port state is not a wise choice!

Previous Thread | Next Thread
Test Your Knowledge in Computers #958
Difficulty: Hard
Metamorphism protects a virus against heuristic analysis.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help implementing a timout in my Shell Script for RHEL6

Hey Guys, My problem: I have a script that will be querying the database every minute to see if it gets a response, the response its querying for is "UP" in a table i made called dbup in the database. Now, I am trying to add the component to implement a timeout if the script does not get a... (2 Replies)
Discussion started by: mo_VERTICASQL
2 Replies

2. Solaris

Too much TCP retransmitted and TCP duplicate on server Oracle Solaris 10

I have problem with oracle solaris 10 running on oracle sparc T4-2 server. Os information: 5.10 Generic_150400-03 sun4v sparc sun4v Output from tcpstat.d script TCP bytes: out outRetrans in inDup inUnorder 6833763 7300 98884 0... (2 Replies)
Discussion started by: insatiable1610
2 Replies

3. IP Networking

TCP/IP troubleshooting

Hello all, Can somebody please tell what is the best book out there that can help me learn TCP troubleshooting and understaning the TCP options like window scaling, large receive offload? I would like to understand how all the TCP tuning parameters function. Is there a book out there that can... (4 Replies)
Discussion started by: Pouchie1
4 Replies

4. SCO

SCO TCP/IP ?

Hello! I tried to install an old version of SCO for test purposes, (3.2v4.0y), all fine, but my TCP/IP disks are "unreadable" and I cant find them on the internetz. Also, SCO doesnt respond to my request....is there any source for those images available? I have license/activation key which... (5 Replies)
Discussion started by: doc_holiday
5 Replies

5. Solaris

[help] very need help for solaris TCP

hi expert, hi all very need help please advice, i have v890 production server (gateway server) which running on telecommunication application (e.g USSD application) on this few month i have a problem with the connection to application server, for 2 - 3 hours the connection always down and cannot... (0 Replies)
Discussion started by: bucci
0 Replies

6. IP Networking

Tcp\ip

I have written a TCP/IP client and server program. The client sends a message to the server and then the server sends a file back to the client. The client reads the buffer and stores it another file in the client side. I need to know what are the various exceptions that I need to handle in... (0 Replies)
Discussion started by: Rajeshsu
0 Replies

7. UNIX for Dummies Questions & Answers

Telnet timout question

ok here is a little bit on what I am trying to do. I am logged into a saolaris 9 server and telnet to another server to run an application that sits on the second unix / linux server. This application can sit idle for an hour to two and any given time. During this time the telnet session timesout... (4 Replies)
Discussion started by: Acleoma
4 Replies

8. IP Networking

TCP over serial

Here's my config: One quadra 840av working under netBSD and successfully connected to my network. One PM 6100 connected but not booting fully into netBSD (i realize this is faulty but I figured it was worth a shot to try and install netBSD/mac68k on it due to the fact it is unsupported under the... (1 Reply)
Discussion started by: Yummator
1 Replies

9. UNIX for Advanced & Expert Users

Tcp wrapper

I installed tcp wrappers version 7.6 and modify my inetd.conf file from ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd to ftp stream tcp6 nowait root /usr/local/bin/tcpd /usr/sbin/in.ftpd -l created /etc/hosts.allow file and modify it... (19 Replies)
Discussion started by: hassan2
19 Replies

10. Cybersecurity

Tcp/ip

!HELLO , What is the maximum number of hosts on a TCP/IP internet? plz can u help me. :rolleyes: (2 Replies)
Discussion started by: smdakram
2 Replies

Featured Tech Videos