Generating maximum wifi activity through 1 computer
Asked Answered
S

1

7

I need to generate a very high level of wifi activity for a study to see if very close proximity to a transceiver can have a negative impact on development of bee colonies.

I have tried to write an application which spawns several web-socket server-client pairs to continuously transfer mid-sized files (this approach hit >100MB). However, we want to run this on a single computer connected to a wifi router, so the packets invariably end up getting routed via the loopback interface, not the WLAN.

Alternatively I have tried using a either simple ping floods and curling the router, but this is not producing nearly the maximum bandwidth the router is capable of.

Is there a quick fix on linux to force the traffic over the network? The computer we are using has both an ethernet and a wireless interface, and I found one thread online which suggested setting up iptables to force traffic between the two interfaces and avoid the loopback.

Splendiferous answered 6/8, 2015 at 15:57 Comment(0)
G
1

Simply sending packets as fast as possible to a random destination (that is not localhost) should work.

You'll need to use udp (otherwise you need a connection acknowledge before you can send data).

cat /dev/urandom | pv | nc -u 1.1.1.1 9123

pv is optional (but nice).

You can also use /dev/zero, but there may be a risk of link-level compression.

Of course, make sure the router is not actually connected to the internet (you don't want to flood a server somewhere!), and that your computer has the router as the default route.

Gibran answered 6/8, 2015 at 16:14 Comment(3)
thanks for the suggestion, i have never seen pv before. i will give it a shot and report back.Splendiferous
this saturates the transmission from the computer, is there a way to maximize the receiver as well? It is resulting in very high transmission rates, but is it possible to increase the RX level as well?Splendiferous
@Splendiferous not without having someone send you packets. You might want to setup a webserver and download a infinite file with wgetGibran

© 2022 - 2024 — McMap. All rights reserved.