2

A TCP server has IP address 10.0.7.2 and a TCP client has IP address 10.0.7.3. The TCP server is waiting on port number 3333 for a connection request. The client connects to the server and transmits 2000 bytes to the server, which are sent as 4 write operations of 500 bytes each.

So I was wondering if were to write out this command for the receiver would this be correct?

ttcp -ts -l500 -n4 -p3333 -D 10.0.7.2

or would it be

ttcp -ts -l2000 -n4 -p3333 -D 10.0.7.2

I'm assuming that it would be the first option but am not confident.

2

You need to have the server in Receive mode (i.e. -r option). Try the below command syntax.

ttcp -r -s -p 3333 -D

Check out the ttcp man page for more details.


Further reading

In order to make this a viable setup, you need a sender and receiver. The sender effectively establishes all of the prameters the tcp session will be benchmarked on.

Transmit

ttcp -t [-u] [-s] [-p port] [-l buflen] [-b size] [-n numbufs] [-A align] [-O offset] [-f format] [-D] [-v] host [<in]

Receive

ttcp -r [-u] [-s] [-p port] [-l buflen] [-b size] [-A align] [-O offset] [-f format] [-B] [-T] [-v] [>out]

Take notice that the receiver is only modifying parameters the sender is specifying. Initially, you were trying to:

-t Transmit mode.
-s stdout.
-l length 
-n number of source buffers
-p port
-D Do not buffer data when sending

As a receiver, you aren't allowed to use, or shouldn't be using, options -t, -n, or -D.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.