Saturday, June 15, 2019

Unicast ARP flooding WiFi - ultimately kernel module with Realtek

I've got a friend who's a landlord. She recently upgraded the WiFi in one of her units to fiber optic. As part of her deal from the vendor, she received a SmartRG DSL wifi modem/gateway, model SR515ac. It's a nice rig, but has a couple of hitches, one of them being the WiFi would only seem to operate in bursts: fast traffic, then nothing, 3 MB traffic, then nothing. Additionally, some client boxes would freeze up entirely when connected to WiFi.

Solution

The problem was ultimately found to be only in clients that were at the edge of the operating range of the WiFi signal and were Linux boxes with Realtek 8723's, with its notorious rtl kernel driver problems. Once these cards were replaced with Intel Ultimate N WiFi Link 5300 cards, using the iwlagn module, all the freezing problems disappeared. They were so far away from the router there were occasional connection problems, but no more kernel freezes.

troubleshooting

Attempting to capture the problem, tcpdump (tcpdump >>file.txt 2>&1) revealed repetitive Address Resolution Protocol (ARP) queries to all available 256 addresses, eg...
09:01:40.129620 ARP, Request who-has 192.168.28.6 tell 192.168.28.1, length 28
09:01:40.130517 ARP, Request who-has 192.168.28.7 tell 192.168.28.1, length 28
09:01:40.131435 ARP, Request who-has 192.168.28.8 tell 192.168.28.1, length 28
09:01:40.132354 ARP, Request who-has 192.168.28.255 tell 192.168.28.1, length 28
...instead of limiting itself to those addresses to which it had authorized an IP. The queries would begin again as soon as they reached the 255th address. Apparently there was no ARP cache, but maybe the problem was even worse.

Obviously, wifi requires the kernel (module) for kernel space, and wpa_supplicant driver for user-space. The former were discussed in the solution, and the latter are typically Wext (generic wireless extension) or nl80211.


No comments: