What is the maximum life span of a segment

We have a homegrown XMPP server, and they asked me what our MSL server is (Maximum Segment Lifetime). What does this mean and how can I get it? Is this on linux / proc TCP settings?

+7
source share
3 answers

MSL (Maximum Segment Lifetime) is the longest time (in seconds) that is expected in a TCP segment on a network. This is especially important when closing a TCP connection - between CLOSE_WAIT and the CLOSED state, the machine waits for 2 MSL (conceptually round trip to the end of the Internet and back) for any later packets. During this time, the machine holds the resources to connect in a basically closed state. If the server is busy, resources stored this way can be a problem. One “fix” is to omit the MSL so that they are released earlier. This usually works fine, but sometimes it can cause confusing failure scenarios.

On Linux (RHEL anyway, what I know), the variable /proc/sys/net/ipv4/tcp_fin_timeout is a 2 * MSL value. Usually it is 60 seconds. To see this, do:

 cat /proc/sys/net/ipv4/tcp_fin_timeout 

To change it, do something like:

 echo 5 > /proc/sys/net/ipv4/tcp_fin_timeout 

The following is the STANDARD TCP SCHEME. You can find this expectation below.


TCP State Diagram
+7
source

It looks like he can answer your question:

http://seer.support.veritas.com/docs/264886.htm

I suggest you ask why someone asked you about this and find out how this relates to XMPP.

TCP / IP Illustrated Volume 1 is online and describes 2MSL in more detail: Here

MSL is also described in TCP RFC 793 , as indicated on wikipedia

+1
source

You can also see the countdown timer for sockets using -o in netstat or ss, which helps to show specific numbers about how long events will wait. For example, TIME_WAIT does NOT use tcp_fin_timeout (it is based on TCP_TIMEWAIT_LEN, which is usually hardcoded for up to 60 seconds).

 cat /proc/sys/net/ipv4/tcp_fin_timeout 3 # See countdown timer for all TIME_WAIT sockets in 192.168.0.0-255 ss --numeric -o state time-wait dst 192.168.0.0/24 NetidRecv-Q Send-Q Local Address:Port Peer Address:Port tcp 0 0 192.168.100.1:57516 192.168.0.10:80 timer:(timewait,55sec,0) tcp 0 0 192.168.100.1:57356 192.168.0.10:80 timer:(timewait,25sec,0) tcp 0 0 192.168.100.1:57334 192.168.0.10:80 timer:(timewait,22sec,0) tcp 0 0 192.168.100.1:57282 192.168.0.10:80 timer:(timewait,12sec,0) tcp 0 0 192.168.100.1:57418 192.168.0.10:80 timer:(timewait,38sec,0) tcp 0 0 192.168.100.1:57458 192.168.0.10:80 timer:(timewait,46sec,0) tcp 0 0 192.168.100.1:57252 192.168.0.10:80 timer:(timewait,7.436ms,0) tcp 0 0 192.168.100.1:57244 192.168.0.10:80 timer:(timewait,6.536ms,0) 
0
source

All Articles