2

I'm trying to test some QoS policies I'm implementing on a router between two networks. I have two linux servers, one on each network, and I'd like to simulate data transfer between them so I can see if the QoS is effective.

The data is mostly UDP, but being able to simulate TCP data would be useful as well.

I originally tried just piping /dev/urandom through netcat , but this just uses up as much bandwidth as it can and swamps the connection.

Is there a way of doing something similar, but allowing me to restrict the data rate to something specific?

growse
  • 8,020
  • 13
  • 74
  • 115

1 Answers1

2

If you're testing QoS, shouldn't you want it to use as much bandwidth as possible to make sure your policies don't swamp the connection? I suppose it depends what you're actually trying to accomplish..

In any case, you can use iperf which lets you set the bandwidth and do bandwidth testing.

CLIENT SPECIFIC OPTIONS
-b, --bandwidth n[KM] set target bandwidth to n bits/sec (default 1 Mbit/sec). This setting requires UDP (-u).

Rex
  • 7,895
  • 3
  • 29
  • 45
  • If this was an isolated network not being used for anything else, I'd agree. However, I managed to cause some other issues due to `netcat` chewing through all the bandwidth (means my QoS policies are not there yet!). Didn't know iperf could target bandwidth, I'll give that a go. – growse Jun 07 '13 at 08:18