With Test TCP, you can both initiate TCP connections and listen for TCP connections. You can also use the Test TCP tool for UDP traffic. With Test TCP, you can configure a computer to listen on a specific TCP or UDP port without having to install the application or service on the computer. This allows you to test network connectivity for specific traffic before the services are in place.
Test TCP (Ttcp.exe) is a tool that you can use to listen for and send TCP segment data or UDP messages between two nodes. Ttcp.exe is provided with Windows Server 2003 in the Valueadd\Msft\Net\Tools folder of the Windows Server 2003 or Windows XP Service Pack 2 (SP2) product CD-ROM.
Test TCP differs from Port Query in the following ways:
- With Test TCP, you can configure a computer to listen on a specific TCP or UDP port without having to install the application or service on the computer. This allows you to test network connectivity for specific traffic before the services are in place. For example, you could use Test TCP to test for domain replication traffic to a computer before you make the computer a domain controller.
- Test TCP also supports IPv6 traffic.
When you are using a TCP port, the following code shows the basic syntax for Ttcp.exe on the listening node (the receiver):
ttcp -r -pPort
When using a UDP port, use the following syntax.
ttcp -r -pPort -u
After starting Test TCP in receive mode, the tool will wait indefinitely for a transmission before returning you to the command prompt. The first time you use Test TCP to listen from a computer running Windows 7, you might be prompted to create a Windows Firewall exception. You must create the exception for Test TCP to work. If you choose to unblock the application, Windows Firewall will allow all traffic for that computer on the specified port in the future. Therefore, you will not need to create a new exception for that network type, even if you listen on a different port. In Windows Firewall, the exception is named Protocol Independent Perf Test Command.
When you are using a TCP port, the following code shows the basic syntax for Ttcp.exe on the sending node (the transmitter):
ttcp -t -pPort hostname
When using a UDP port, use the following syntax.
ttcp -t -pPort -u hostname
If the two computers are able to communicate, the transmitting computer will display output such as the following.
ttcp-t: Win7 -> 192.168.1.132 ttcp-t: local 192.168.1.196 -> remote 192.168.1.132 ttcp-t: buflen=8192, nbuf=2048, align=16384/+0, port=81 tcp -> Win7 ttcp-t: done sending, nbuf = -1 ttcp-t: 16777216 bytes in 1423 real milliseconds = 11513 KB/sec ttcp-t: 2048 I/O calls, msec/call = 0, calls/sec = 1439, bytes/call = 8192
Meanwhile, the receiving computer will display output similar to the following.
ttcp-r: local 192.168.1.132 <- remote 192.168.1.196 ttcp-r: buflen=8192, nbuf=2048, align=16384/+0, port=81 tcp ttcp-r: 16777216 bytes in 1416 real milliseconds = 11570 KB/sec ttcp-r: 3492 I/O calls, msec/call = 0, calls/sec = 2466, bytes/call = 4804
You can use Test TCP to connect to any computer listening for incoming TCP connections, even if that computer is not running Test TCP. However, to accurately test UDP connectivity, Test TCP must be running on both the receiver and transmitter. For example, to attempt a connection to www.microsoft.com on TCP port 80, you would run the following command.
ttcp -t -p80 www.yahoo.com
ttcp-t: local 192.168.1.196 -> remote 10.46.20.60 ttcp-t: buflen=8192, nbuf=2048, align=16384/+0, port=80 tcp -> www.yahoo.com send(to) failed: 10053 ttcp-t: done sending, nbuf = 2037 ttcp-t: 81920 bytes in 16488 real milliseconds = 4 KB/sec ttcp-t: 11 I/O calls, msec/call = 1498, calls/sec = 0, bytes/call = 7447
In this example, the TCP connection was successful, even though the output includes the line "send(to) failed." If the connection was unsuccessful, the output would have included the phrase "connection refused." Alternatively, some servers will simply not respond to invalid communications, which will cause the Test TCP transmitter to pause indefinitely while it awaits a response from the server. To cancel Test TCP, press Ctrl+C.
Each instance of Test TCP can listen on or send to only a single port. However, you can run it in multiple command prompts to listen or send on multiple ports. For additional commandline options, type Ttcp at the command prompt.
In this tutorial:
- Troubleshooting Network Issues
- Tools for Troubleshooting
- Table-1 Network Troubleshooting Tools
- How to Identify a Problem with the ARP Cacher
- How to Clear the ARP Cache
- Event Viewer
- How to View Shared Folders on the Local Computer
- How to View Shared Folders on Another Computer
- Network Monitor
- Verifying that the Default DNS Server Resolves Correctly
- Verifying that a Specific DNS Server Resolves Correctly
- Verifying Specific Types of Addresses
- Using TCP for DNS Lookups
- PathPing Output
- Routing Loops
- Performance Problems
- Possible Connectivity Issues
- No Connectivity Issues
- Performance Monitor
- Data Collector Sets
- Windows Resource Monitor
- Identifying the TCP Port for a Service
- Windows 7 Testing Service Connectivity
- Determining Available Remote Management Protocols
- Why PortQry Is Great
- Task Manager
- Telnet Client
- Testing Service Connectivity
- Test TCP
- Windows Network Diagnostics
- The Process of Troubleshooting Network Problems
- How to Troubleshoot Network Connectivity Problems
- How to Troubleshoot Application Connectivity Problems
- Default Port Assignments for Common Services and Tasks
- How to Troubleshoot Name Resolution Problems
- How to Verify Connectivity to a DNS Server
- How to Use the Hosts File
- How to Troubleshoot Performance Problems and Intermittent Connectivity Issues
- How to Troubleshoot Joining or Logging on to a Domain
- How to Verify Requirements for Joining a Domain
- How to Troubleshoot Network Discovery
- How to Troubleshoot File and Printer Sharing
- How to Troubleshoot File and Printer Sharing from the Client
- How to Troubleshoot File and Printer Sharing from the Server
- How to Troubleshoot Wireless Networks
- Network Diagnostics
- How to Troubleshoot Firewall Problems