We implemented a simple and very light-weight testing application for generating and receiving TCP traffic, named “Tcptest.”
With respect to other well-known applications for generating TCP flows (e.g., TTCP, iPerf among the others), Tcptest allows simpler flow generation (especially in the presence of multiple simultaneous connections), avoiding useless overhead operations (e.g., disk access, etc.).
Tcptest can be used both as client (receiver) and server (sender) of connections. Once a connection is established, Tcptest sends a desired number of segments at the maximum MTU. When the last segment is successfully received by the client, the TCP connection is immediately closed. The segments of all the generated connections contain replicas of a same pre-allocated pattern.
The amount of data sent, the number of simultaneous TCP connections, and other options are configurable through a simple command line interface. Tcptest is able to work in two modes:
- One-shot: the chosen number of TCP connections is generated only once.
- Continuous: the chosen number of TCP connections is generated in a persistent and cyclic way.
In both the modes above, Tcptest provides the average duration time of connections and other monitoring parameters made available by the Linux kernel. Continuous mode also provides the number of running and completed connections every second.
TCPTest is released under the GNU-GPL licence.
To dowload the source code click here.