Skip to content

Instantly share code, notes, and snippets.

@neontorrent
Forked from pm-hwks/netcat.sh
Last active September 8, 2024 19:46
Show Gist options
  • Save neontorrent/037f647823f2afe8206ac340da3957a1 to your computer and use it in GitHub Desktop.
Save neontorrent/037f647823f2afe8206ac340da3957a1 to your computer and use it in GitHub Desktop.
[Netcat network test] Netcat commands to test bandwidth between 2 linux servers #netcat #perf-test #linux #network
## Netcat server command
nc -l -p <unused port # > /dev/null
eg:
nc -l -p 1122 > /dev/null
## Netcat Client command
dd if=/dev/zero bs=100M count=1 | nc <netcat server> <netcat port>
eg:
dd if=/dev/zero bs=100M count=1 | nc 10.0.1.251 1122
## You should the following output as an examples
2147479552 bytes (2.1 GB) copied, 4.23416 s, 507 MB/s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment