Wednesday, February 27, 2013

Enabling TCP TimeStamp Linux and Windows

I've had a couple of comments from my previous TCP TimeStamp - Demystified post about how to enable TCP TimeStamp option on different operation systems. Therefore, this is a follow up post on how to enable TCP TimeStamp option on Linux and Windows.

Since I am pro-Linux, we will start with Linux. 

Linux:

In Linux, TCP TimeStamp is enabled by default. You can check this by running this command. 


[root@ares ~]# cat /proc/sys/net/ipv4/tcp_timestamps
1
[root@ares ~]#

If the returned result is equal to one then you are good to go, however if it is zero then you can enable TCP TimeStamp option instantly by running this command. 

[root@ares ~]# echo 1 > /proc/sys/net/ipv4/tcp_timestamps

Run this command to make the setting persistent and survive a reboot. 

[root@ares ~]# echo 'net.ipv4.tcp_timestamps = 1' >> /etc/sysctl.conf

Windows:

Open "command prompt" by typing cmd in run. Make sure you are running it as administrator. 
netsh int tcp set global timestamps=enabled

That's it... 

If you guys know how to do this for MAC/Solaris/Whatever else, please comment. 

2 comments:

  1. FBSD/OSX - sysctl net.inet.tcp.rfc1323=1

    ReplyDelete
  2. Thanks for you both rare blogs on Timestamps. I was also looking on PAWS and how time stamp is used to test the paws failure.We are facing a excessive packet drop problem by ASA5585-X for Linux to Linux communication leading to poor transfer rate or stalled communication for all TCP communication. File transfers sftp/scp is stalled, while windows to Linux there is no issue. I just want to understand the root cause of packet drops due to paws check failed for timestamped packets. Counter for tcp-paws-fail keep on increasing. I know that clearing timestamp check on Firewall or disabling it on linux machines will ease out this issue. But we need to disable it.

    ReplyDelete