Introduction

synack is a network performance measurement tool to determine the round-trip latency/time (RTT) of TCP connections. This differs from the traditional PING tool as it utilies TCP packets instead of ICMP.
It can also be used to determine if particular TCP ports are open to determine if particular services are enabled on a remote host.

  • Establishes a Client-Server connection by calling connect which performs the 3-way Handshake of the TCP Protocol
  • Measures the time taken for the connection to be established b/w the client & server
    Closes the connection once the RTT is measured by calling close which performs a 4-packet exchange
  • Repeats the above process at regular intervals (defined by the user) after the connection is closed
  • Performs statistical analysis on the RTT data obtained

Download

Click here for the latest version of the code

Installation

Ensure that GNU Make and gcc is installed. Simply run:

make

to create the binary format for the architecture on which you run the install on. This will create the binary synack which is the synack program.

To move the binary file to a system default location (in this case /usr/local/bin/) run:

make install

It should now be in your system search path and ready for use.

Code Compilation on various platforms

Linux and Mac OSX: gcc -o synack synack.c -lpthread 
SunOS: gcc -o synack synack.c -lpthread -lsocket -lnsl 

Usage

Usage: synack [-options] host 
Common options: 
-p ##   port number to send to (default 22) 
-k ##   no. of connections to be made 
-i ##   Time interval between connections in secs (default 1 sec) 
-u ##  Time interval between connections in microsecs (minimum 20000 microsecs) 
-z ##   Percentile 1 (default 25) 
-Z ##   Percentile 2 (default 75) 
-S ##   Timout in secs (default 1 Sec) 
-s ##   Timeout in millisecs 

Sample output of synack (from nereus.slac.stanford.edu to nocdev1-qos.es.net)

***** Round Trip Statistics of SYNACK to nocdev1-qos.es.net (Port = 22) ****** 
100 packets transmitted, 100 packets received, 0.00 percent packet loss 
round-trip (ms) min/avg/max = 4.780/7.843/10.034 (std = 1.176) 
 (median = 7.830)        (interquartile range = 1.685) 
 (25 percentile = 7.060)         (75 percentile = 8.745) 
  • No labels