Measuring network speeds with tcpbench

tcpbench(1) is a helpful utility to help benchmark networking speeds. To use tcpbench, you will need two machines with the tcpbench utility installed (tcpbench is provided by default on OpenBSD). One machine will act as the client, and the other as the server. The server will need a publicly routable IP address.

On the server, we run:

server$ tcpbench -s -p 12345

-p 12345 specifies the port of 12345. Make sure the firewall? accepts incoming connections from the client to port 12345.

On the client

client$ tcpbench -p 12345 server.example.com

Replace server.example.com with the server's hostname or its IP address.