1

How can I change maximum segment lifetime in Ubuntu 14.04? there is no net.inet.tcp.msl there The problem is that I need my TCPsockets to live more than 240 seconds..

4
  • "there is no net.inet.tcp.msl there"? Are,you sure?! My manual shows "msl": manpages.ubuntu.com/manpages/trusty/en/man4/tcp.4freebsd.html
    – Rinzwind
    Sep 28, 2015 at 12:12
  • i'm sure that there is no msl there Sep 28, 2015 at 13:30
  • The default TCP timeout is 600 seconds, not 240. If you are getting connection timeouts, then there is likely a problem with the software you're using that shows you this problem, or your network connection.
    – dobey
    Sep 28, 2015 at 13:35
  • I'm not getting connection timeouts. I've opened socket and started to make http sessions. After 240 seconds it is not working any more.. Sep 28, 2015 at 13:42

1 Answer 1

1

The Maximum Segment Lifetime value is used to determine the TIME_WAIT interval (2*MSL)

Try to check this value with commands below:

sysctl net.ipv4.tcp_fin_timeout
cat /proc/sys/net/ipv4/tcp_fin_timeout

edit /proc/sys/net/ipv4/tcp_fin_timeout

and change default value. Once you have modified your sysctl.conf file with the above required settings, you can reload the configuration and make it permanent, by the below command.

sysctl -p /etc/sysctl.conf
3
  • No, that haven't helped... I've checked that before. Maybe the problem is with OMNeT++ where this time is hard-coded for tcp sockets. Sep 28, 2015 at 13:32
  • 3
    fin timeout and time wait timeout are not the same thing.
    – c4f4t0r
    Feb 2, 2017 at 13:58
  • @c4f4t0r true, but the Linux tcp implementation is far from RFC standard. If you look at the code, the tcp_fin_timeout is the dominant variable here, provided it is less than a hardcoded value of 60s. shrug See net/ipv4/tcp.c
    – Otheus
    Feb 8, 2023 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .