Router – DCHP and Router load testing

dhcprouterstress-testing

I manage a campground wifi network with an average of 10 – 60 active users. I have encountered issues where the router starts acting flaky (failing to assign DHCP or failing to pass traffic) without any clear warning (low cpu utilization, etc). I upgraded the router a couple times and ended up with a Netgear ProSafe VPN router that seems to be handling the traffic. The interesting thing is that the Netgear has lower specs than the Buffalo router it replaced, indicating the issue is with the DD-WRT firmware. While I'll be pursuing this issue on the dd-wrt forums, I need a way to test routers.

My vision is having 1-2 computers connected on the LAN side and 1-2 computers connected on the WAN side. I want the LAN computers to be generating various type of traffic and connections, as well as requesting DCHP addresses.

A few notes:

  • The wireless aspect should be a non-issue. Most clients would connect to a wireless bridge and come into the router through a network cable.
  • I had a monitoring server with Nagios running check_dhcp against the router. This server was connected directly by a network cable, eliminating wifi bridges and other devices from the equation.
  • This question is somewhat related, but not exactly: Load testing wireless LANs I am going to look at IxChariot.
  • While I'd ideally like to use a 1 computer on each side running Linux and preferably free software, I can entertain running Windows, multiple computers, or non-free software.
  • Total bandwidth doesn't seem to be the issue. I can transfer large files all day. Even on the busiest days, the users seemed to only pull ~5Mbps. There is very little "LAN to LAN traffic" and most of it might never have reached the main router.
  • The issue I need to test for seems to be tied to active users, or more appropriately, active sessions.
  • I know active users or active clients is a meaningless term from a router standpoint and wouldn't mind having more appropriate terms to use.

Summary: I need a way to test a routers ability in handling traffic from a large number of clients. My current strategy is to purchase a router, deploy it, and see how it fails in the live environment.

Best Answer

My suggestion would be to forget about using the cheap consumer or even the more expensive "small business" router/NAT devices. Every one of them I've gotten my hands on has been very disappointing as far as performance, reliability, functionality, and ease-of-use. These devices frequently have very small amounts of RAM and when loaded with more than a very modest amount of traffic will frequently run out of RAM (causing DHCP issues like you explained) or exhaust the space available in their state tracking tables (causing the router to refuse any new network flows until old state entries time out).

You ought to consider building a PFSense-based router. PFSense is a FreeBSD-based routing distribution. It can run either on a spare PC with two network cards or more preferrably, a small low-power embedded computer.

My preferred PFSense board is the ALIX 2d3. This board can be purchased as a kit along with a case, power supply, and CF card for a bit over $190. The installation process is very simple, and is well-documented on the PFSense website.

Once installed, you'll use a Web GUI for the rest of your configuration and maintenance. You'll find that not only does PFSense perform better, but it will be more reliable and incredibly more feature-rich than the commercially-available offerrings.


To directly answer your question about load testing: it's probably not worth your time. Load testing this sort of thing in a meaningful way is very non-trivial. Before being able to load test properly, you'd need to analyze traffic patterns during times when you're experiencing the issues and then use something to generate those type of traffic patterns. It won't be enough just to schlep a bunch of data through the router or even to, say, run an http load tester over the device. You'll need to test it with traffic that mimics your real load. Is is for this reason that I mentioned earlier that it's probably not worth your time.

Either upgrade to a high-quality (read: expensive) router or do something like I outlined above using PFSense.