I need to consume as much upload bandwidth as my connection will provide, but I would like to avoid needing a server on the other side to receive this traffic.

What's an easy way to generate a bunch of packets (enough to saturate 40Mbps at least) and fire them off to "nowhere"?

I have Mac, Linux, and Windows available, and I think options for each would be useful.

  • 4
    Why? What are you trying to achieve here?... Have you tried sites like speedtest.net, or using iperf3 against a public server?
    – Attie
    Jun 18, 2020 at 22:20
  • 1
    This feels like an XY Problem Perhaps tell us what you are trying to achieve rather than ask us about what you think you may need to do to achieve it.
    – Tetsujin
    Jun 19, 2020 at 7:56
  • I'm looking to learn how to consume bandwidth across an arbitrary link for the purpose of simulating bandwidth across that link for diagnosing intermittent latency and packet loss which only occur under loaded situations (when I am not able to use a second server (e.g., for security reasons) to receive this traffic). I'm not specifying the tool to use in order to achieve this goal. Jun 20, 2020 at 14:20

2 Answers 2


I found an easy way to do this using pv and nc:

cat /dev/random | pv --rate-limit 20M | nc -u example.com 9999


  • 20M is your rate of transmission (in mebibytes per second) (see the man page for more details)
  • -u indicates the UDP protocol
  • 9999 is the target port

Most *nix systems have nc available out of the box. On the Mac, pv can be installed via brew install pv.

This was tested with pv version 1.6.6.


I think this will be difficult due to how TCP slow-start works: the sending window is not increased if there is no response from the receiver. You might be able to get around this using UDP but I doubt that it's a good approach.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .