Test TCP Throughput
Sometimes we need to know the thoughput of a TCP connection between 2 devices. For this task we have avilable on Cisco gear the hidden command ttcp. With it we can do exactly this task and get a large amount of statistics if we want.
There is a software client for Windows and *ix machines. I’ll use the Windows client as my corporate laptop uses Windows 7. This windows client can be downloaded from here.
Here is the output of the test from the Windows box:
C:\Users\User\Downloads\PCATTCP-0114> PCATTCP.exe -t 10.210.142.1
PCAUSA Test TCP Utility V2.01.01.14 (IPv4/IPv6)
IP Version : IPv4
Started TCP Transmit Test 0…
TCP Transmit Test
Transmit : TCPv4 0.0.0.0 -> 10.210.142.1:5001
Buffer Size : 8192; Alignment: 16384/0
TCP_NODELAY : DISABLED (0)
Connect : Connected to 10.210.142.1:5001
Send Mode : Send Pattern; Number of Buffers: 2048
Statistics : TCPv4 0.0.0.0 -> 10.210.142.1:5001
16777216 bytes in 2.892 real seconds = 5664.96 KB/sec +++
numCalls: 2048; msec/call: 1.446; calls/sec: 708.120
And from the IOS device:
SW1# ttcp
transmit or receive [receive]:
receive packets asynchronously [n]:
perform tcp half close [n]:
receive buflen [32768]:
bufalign [16384]:
bufoffset [0]:
port [5001]:
sinkmode [y]:
rcvwndsize [32768]:
ack frequency [0]:
delayed ACK [y]:
show tcp information at end [n]: y
ttcp-r: buflen=32768, align=16384/0, port=5001
rcvwndsize=32768, delayedack=yes tcp
ttcp-r: accept from 10.210.142.53
ttcp-r: 16777216 bytes in 2896 ms (2.896 real seconds) (~5657 kB/s) +++
ttcp-r: 2026 I/O calls
ttcp-r: 0 sleeps (0 ms total) (0 ms average)
Connection state is CLOSEWAIT, I/O status: 1, unread input bytes: 1
Mininum incoming TTL 0, Outgoing TTL 255
Local host: 10.210.142.1, Local port: 5001
Foreign host: 10.210.142.53, Foreign port: 60703
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x70869EEF0):
Timer Starts Wakeups Next
Retrans 1 0 0x0
TimeWait 0 0 0x0
AckHold 2023 0 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 3597215592 snduna: 3597215593 sndnxt: 3597215593 sndwnd: 65520
irs: 299760188 rcvnxt: 316537406 rcvwnd: 32136 delrcvwnd: 632
SRTT: 37 ms, RTTO: 1837 ms, RTV: 1800 ms, KRTT: 0 ms
minRTT: 4 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, retransmission timeout, gen tcbs
Datagrams (max data segment is 1260 bytes):
Rcvd: 14339 (out of order: 0), with data: 14336, total data bytes: 16777216
Sent: 12291 (retransmit: 0), with data: 0, total data bytes: 0
As we can see there’s a lot of information to analyze. We can also use this command.