Fundamentals

Testing TCP Connectivity on Cisco Devices

Tony Mattke · 2009.08.23 · 2 min read

Ever thought you might be having some Layer 4 connectivity issues? Pings as you should know are ICMP transmissions and ICMP is a Layer 3 protocol (commonly used to send error messages). Luckily Cisco has a hidden ( as in it wont show up when using IOS help ) utility for testing TCP connectivity.

The command, ttcp is actually a very powerful tool for testing TCP connections, it requires IOS 11.2 or higher with IP Plus or Service Provider images. Here is an example of it being used to test connectivity between two locations.

text
SiteA#ttcp
transmit or receive [receive]:
buflen [8192]:
bufalign [16384]:
bufoffset [0]:
port [5001]:
sinkmode [y]:
rcvwndsize [2144]: 4096
show tcp information at end [n]:
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001, rcvwndsize=4096  tcp
SiteA#

SiteB#ttcp
transmit or receive [receive]: trans
Target IP address: 137.112.32.66
buflen [8192]:
nbuf [2048]: 50
bufalign [16384]:
bufoffset [0]:
port [5001]:
sinkmode [y]:
buffering on writes [y]:
show tcp information at end [n]:
ttcp-t: buflen=8192, nbuf=50, align=16384/0, port=5001  tcp  -> 137.112.32.66
SiteB#

SiteA#
ttcp-r: accept from 137.112.32.65 (mss 1460, sndwnd 2144, rcvwnd 4096)
ttcp-r: 409600 bytes in 61064 ms (61.064 real seconds) (~5 kB/sec) +++
ttcp-r: 301 I/O calls
ttcp-r: 0 sleeps (0 ms total) (0 ms average)
SiteA#

SiteB#
ttcp-t: connect (mss 1460, sndwnd 4096, rcvwnd 2144)
ttcp-t: 409600 bytes in 60504 ms (60.504 real seconds) (~5 kB/sec) +++
ttcp-t: 50 I/O calls
ttcp-t: 0 sleeps (0 ms total) (0 ms average)
SiteB#

The downside of ttcp is that it really makes me miss tcpspray for Linux / on ImageStream routers. As you see in this example ttcp requires that you start the receiver process on the remote end, while tcpspray just uses the echo and discard inetd services. I’ll cover some details about tcpspray in a future post.

Obviously another advantage of this utility is speed testing. Obviously, this is not a reliable means to test high bandwidth links as the router needs enough CPU to generate the packets. If your bandwidth tests are not pegging the router and you’re still not happy with the results, latency could be the issue. Check our my previous post on the relationship between latency and throughput.

More in Fundamentals
comments powered by Disqus

Related Posts

Homelab & Misc

PCAP t-shirts just in time for CLUS17

Hey guys, I just wanted to drop a quick note to let you know that I’ve relaunched my teespring shirt campaigns with enough time that you should get your orders before Cisco Live US …

2017.04.20 · 1 min
Homelab & Misc

Fixing Vista Partition Error Messages when using Bootcamp

So, I had to reinstall Vista on my mac today — hadn’t touched it since I moved onto the Late 08 model… and once again, I started getting the common partition errors while Vista …

2008.12.01 · 1 min
Industry & Events

Mandatory Cisco DNA Licensing – is this the Future??

With the release of the new 9200 series switches many enterprise organizations are starting to look towards the future.

2019.03.13 · 3 min