Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating maximum wifi activity through 1 computer

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.

like image 426
Evan Avatar asked Aug 06 '15 15:08

Evan


Video Answer


1 Answers

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.

like image 75
loopbackbee Avatar answered Oct 16 '22 07:10

loopbackbee