You are on page 1of 6

Test TCP (TTCP) Benchmarking Tool and Simple Network Traffic Generator (Now with IPv6 Support)

insert content here

Background
Test TCP (TTCP) - The Original BSD Tool
Test TCP (TTCP) is a command-line sockets-based benchmarking tool for measuring TCP and UDP performance between two systems. It was originally developed for the BSD operating system starting in 1984. The original TTCP and sources are in the public domain, and copies are available from many anonymous FTP sites. You can read "The Story of the TTCP Program" in the words of Mike Muuss, one of the original TTCP program authors.

PCATTCP - PCAUSA's Port Of TTCP To Windows Sockets


The PCATTCP program is simply PCAUSA's port of TTCP to Windows Sockets. Porting TTCP to Windows Sockets is fairly straightforward. PCATTCP is a Win32 Console Application. You must run it from the Command Prompt or from a Batch File.

PCATTCP Usage
You must copy PCATTCP to two Windows platforms. One platform will be used as a receiver or data sink and the other will be used as a transmitter or data source.

Starting A PCATTCP Receiver


To start the PCATTCP receiver, go to the Command Prompt and then change to the folder containing the PCATTCP.EXE application. Enter the following command:

C:> pcattcp -r

The "-r" command-line option starts the PCATTCP program as a receiver.

Starting A PCATTCP Transmitter


To start the PCATTCP transmitter, go to the Command Prompt and then change to the folder containing the PCATTCP.EXE application. Enter the following command:
C:> pcattcp -t 172.16.1.10

The "-t" command-line option starts the PCATTCP program as a transmitter. You must enter the IP address of the platform hosting the PCATTCP receiver after the "-t" command-line parameter. As soon as you start the PCATTCP transmitter, the test data transfer begins. After the transfer is complete, both the PCATTCP transmitter and receiver will display performance information and then exit. Here is an illustration of what would be displayed: IPv4 Example On The PCATTCP Receiver Using IPv4:
C:\Development>pcattcp -r -c PCAUSA Test TCP Utility V2.01.01.13 (IPv4/IPv6) IP Version : IPv4 Started TCP Receive Test 0... TCP Receive Test Local Host : QuadEye ************** Listening...: On TCPv4 0.0.0.0:5001 Accept : TCPv4 0.0.0.0:5001 <- 192.168.15.102:16517 Buffer Size : 8192; Alignment: 16384/0 Receive Mode: Sinking (discarding) Data Statistics : TCPv4 0.0.0.0:5001 <- 192.168.15.102:16517 16777216 bytes in 0.282 real seconds = 58099.29 KB/sec +++ numCalls: 2431; msec/call: 0.119; calls/sec: 8620.567 ************** Listening...: On TCPv4 0.0.0.0:5001

On The PCATTCP Transmitter Using IPv4:


C:\Development>pcattcp -t 192.168.15.112 PCAUSA Test TCP Utility V2.01.01.13 (IPv4/IPv6) IP Version : IPv4 Started TCP Transmit Test 0... TCP Transmit Test Transmit : TCPv4 0.0.0.0 -> 192.168.15.112:5001 Buffer Size : 8192; Alignment: 16384/0 TCP_NODELAY : DISABLED (0) Connect : Connected to 192.168.15.112:5001 Send Mode : Send Pattern; Number of Buffers: 2048

Statistics : TCPv4 0.0.0.0 -> 192.168.15.112:5001 16777216 bytes in 0.289 real seconds = 56650.01 KB/sec +++ numCalls: 2048; msec/call: 0.145; calls/sec: 7081.252

IPv6 Example
On The PCATTCP Receiver Using IPv6:
C:\Development>pcattcp -6 -r -c PCAUSA Test TCP Utility V2.01.01.13 (IPv4/IPv6) IP Version : IPv4 Started TCP Receive Test 0... TCP Receive Test Local Host : QuadEye ************** Listening...: On TCPv4 0.0.0.0:5001 Accept : TCPv4 0.0.0.0:5001 <- 192.168.15.102:16517 Buffer Size : 8192; Alignment: 16384/0 Receive Mode: Sinking (discarding) Data Statistics : TCPv4 0.0.0.0:5001 <- 192.168.15.102:16517 16777216 bytes in 0.282 real seconds = 58099.29 KB/sec +++ numCalls: 2431; msec/call: 0.119; calls/sec: 8620.567 ************** Listening...: On TCPv4 0.0.0.0:5001

On The PCATTCP Transmitter Using IPv6:


C:\Development>pcattcp

-6 -t fe80::98b1:d7fc:cf40:ed1b

PCAUSA Test TCP Utility V2.01.01.13 (IPv4/IPv6) IP Version : IPv6 Started TCP Transmit Test 0... TCP Transmit Test Transmit : TCPv6 :: -> [fe80::98b1:d7fc:cf40:ed1b]:5001 Buffer Size : 8192; Alignment: 16384/0 TCP_NODELAY : DISABLED (0) Connect : Connected to [fe80::98b1:d7fc:cf40:ed1b]:5001 Send Mode : Send Pattern; Number of Buffers: 2048 Statistics : TCPv6 :: -> [fe80::98b1:d7fc:cf40:ed1b]:5001 16777216 bytes in 0.327 real seconds = 50070.66 KB/sec +++ numCalls: 2048; msec/call: 0.164; calls/sec: 6258.832

Other PCATTCP Options


The PCATTCP tool includes several options that are controlled by parameters passed on the command line when the program is started. To see the available options, run the PCATTCP application with the "-h" option. Here is what you would see:
pcattcp -h PCAUSA Test TCP Utility V2.01.01.13 (IPv4/IPv6) Usage: pcattcp -t [-4|-6] [-options] host [ < in ] pcattcp -r [-4|-6] [-options > out] Common options: -4 use IPv4 (default) -6 use IPv6 -l ## length of bufs read from or written to network (default 8192)

-u -p ##

-s

-A -O -v -d -b ## -f X giga -c

use UDP instead of TCP port number to send to or listen at (default 5001) Can specify multiple sequential ports two ways: -p #first-#last -p #first+#additional toggle sinkmode (enabled by default) sinkmode enabled: -t: source (transmit) fabricated pattern -r: sink (discard) all received data sinkmode disabled: -t: reads data to be transmitted from stdin -r: writes received data to stdout align the start of buffers to this modulus (default 16384) start buffers at this offset from the modulus (default 0) verbose: print more statistics set SO_DEBUG socket option set socket buffer size (if supported) format for rate: k,K = kilo{bit,byte}; m,M = mega; g,G =

-t: send continuously -r: accept multiple connections sequentially -a bind to local host interface IP address Options specific to -t: -n ## number of source bufs written to network (default 2048) -D don't buffer TCP writes (sets TCP_NODELAY socket option) -w ## milliseconds of delay before each write (default 0) -R ## desired transmit data rate in bytes/second Options specific to -r: -M concurrent TCP/UDP multithreaded receiver -B for -s, only output full blocks as specified by -l (for TAR) -T "touch": access each byte as it's read

Option Descriptions Here is a brief description of some of the less obvious options: -a ## Bind to a Specified Local Host Interface This is useful if you are working with a multi-homed host. The option is used to specify a particular interface for either TTCP transmitter or receiver. -M Use Multi-Threaded Receiver Without this option the TTCP receiver accepts only one connection at a time. If this option is specified the TTCP receiver can accept multiple connections concurrently -p ## TTCP Service Port Number This option specifies the TTCP service port number. In most cases only a single port number will be specified. The default TTCP port number is traditionally 5001. PCATTCP allows specification of a range of port numbers using the form -p #first-#last or -p #first+additional. If either of these forms are used the a TTCP receiver will be started for each port in the specified range.

Download PCATTCP Executables And Source


You'll need to read the Terms And Conditions and enter your Contact Information before beginning your download. Your Contact Information will only be used by PCAUSA, primarily to determine if there is sufficient interest to maintain the software on the PCAUSA website. Enjoy! Download PCATTCP Executables And Source The original Unix TTCP source can be found here: Download Original UNIX TTCP Source The Unix TTCP source with quick-and-dirty modifications that allow it to be built under Linux (Ubuntu 9.10) can be found here (Make it yourself...): Download Linux TTCP Source If you find bugs in PCATTCP of have improvements, please let us know.

Release Notes
Version V2.01.01.13 Date August 24, 2010 April 19, 2010 February 19, 2010 V2.01.01.11 February 4, 2010 Notes Added IPv6 support. Added link to Linux TTCP source (ttcp.c) Added link to original TTCP source. Small change that insures that stderr and stdout are always flushed on all exit paths. Added -a option to specify binding to specified local host IP address. Now built with Visual Studio 2008. Update released. Incorporated fix made by Clarkson University that reduces hands when closing UDP tests. Minor fix in filling pattern buffer for transmit. Minor change to exit routines and

V2.01.01.10

November 3, 2009

V2.01.01.08

March 25, 2005 November 23, 2003

April 5, 2003 May 30, 2002

V2.01.01.03 V2.01.01.02

May 29, 2002 January 11, 2000

fix of some documentation typos. Extensively revised. Includes several fixes to Winsock port of setsockopt calls. In particular, the call to set TCP_NODELAY was ported incorrectly. Sorry!

Other TTCP Implementations for Windows


In addition to PCAUSA's version of Test TCP for Windows here are a few others:

WSTTCP - A Port Of TTCP To Windows Sockets


Sungjin Chun <sjchun@janus.sst.co.kr> ported TTCP from BSD to Windows Sockets as WSTTCP in 1996. The WSTTCP executable was originally available in executable form on WinSite. Unfortunatly, WinSite ceased online operations in April, 2009.

NTttcp - Microsofts Port of TTCP To Windows Sockets


NTttcp is a multithreaded, asynchronous application that sends and receives data between two or more endpoints and reports the network performance for the duration of the transfer. It is essentially a Winsock-based port of the ttcp tool that measures networking performance in terms of bytes transferred per second and CPU cycles per byte. http://www.microsoft.com/whdc/device/network/TCP_tool.mspx

You might also like