Friday, 2 September 2011

TTCP and later

NetCat is a great and simple tool with many uses, but it has a number of limitations in being such a simple and generalised tool.

A tool that allows for some more specialised uses of sockets and connection testing is TTCP or “Test TCP”.

Later versions and ports of this program, such as the Windows one, NTttcp that I shall be posting on today allow for TCP, UDP as well as IPv6 socket connections.

Like NetCat, TTCP allows you to send network traffic to and from a host. It does not have all of the functionality of NetCat, but equally, NetCat does not have the reporting and benchmarking of TTCP.
The first stage of using NTttcp is to install it on both of the systems you are testing. It is available from Microsoft.

Fig 1: Installing NTttcp

We see the install process in Figures 1, 2 and 3.
Fig 2: Accept the terms.


Fig 3: Select where the program will be installed


Fig 4: Confirm the install

Finally, confirm the install if the options are all OK and it will complete the installation.


Fig 5: Awaiting installation


Fig 6: And we are done…

Once installed…
Microsoft’s documentation states the following:
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. Because it can be difficult to diagnose a system’s overall performance without dividing the system into smaller subsystems, NTttcp allows users to narrow the focus of their testing and investigation to just the networking subsystem.
NTttcp measures a system’s networking performance for both Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) traffic. The application can be configured in many ways, including:
  • Setting software affinity for threads to a specified processor index.
  • Specifying asynchronous or synchronous data transfers.
  • Specifying data verification at the application level for a predetermined pattern in the application buffers.
  • Sending and receiving traffic from multiple Internet Protocol (IP) addresses with single command.
  • Supporting IPv6 performance testing.
  • Supporting UDP performance testing.
  • Supporting time-driven testing.
The complete details are listed on the Microsoft document but we can see an example of starting the listener process on one host in Fig 7.

Fig 7: Starting the Receiver in wait mode

And the transmit process in Fig 8.


Fig 8: Starting the sender process (and the options above

The default install directory (or for that matter any place you installed NTtcp) will have a detailed document on its use called TCP_Tool.docx.

C:\Program Files (x86)\Microsoft Corporation\NT Testing TCP Tool

After the process has run for some time, you will be able to see data on the connection (Fig 9).

Fig 9: And the results

This is useful for mapping ports, collecting bandwidth statistics, doing tests of performance under load and DDoS conditions as well as validating firewall changes.

2 comments:

Little Mac said...

That's good to know, Craig. Do you know if it has to be installed, or if there is a stand-alone executable for it?

I tend to think one of the key benefits of netcat is that it doesn't have to be installed.

Dr Craig S Wright GSE said...

There are both versions needing to be installed as well as standalone binaries that have been statically linked.