The Necessity

The Draytek router has been an excellent device. It provides multiple separate LANs and WANs, and by use of static routes allows rules-based separation of Internet access for different devices in the network. For example, the guest WLAN clients use a different WAN than the higher priority devices. However, all connections go through the device, even if they use an alternate gateway (WAN).

However, over the past couple of weeks, it may have been misbehaving. At times it felt like something strange was happening with Internet access, even though client sessions were not being dropped. So, I started looking for a potential replacement.

The Contenders

A Bigger Draytek.

I have been using Draytek Routers for some time, and generally they do the job reliably. The 3000 series look good, but they have quite the price tag, especially for “the good stuff ®”.

A Ubiquiti ERX or ERL

There are quite a few people raving over these devices. The ERL can handle an amazing 240K packets per second (https://www.ubnt.com/edgemax/comparison/). Price-wise, the ERX-SFP (80K pps) offers both a low price, and a SFP port (mmm fibre…) so it could be a great learning device for EdgeOS.

Others

  • SonicWall TZ300 — looks good, but pricey
  • Powerful Hardware with LEDE, OpenWRT, or even DD-WRT — Done this before and with generally good results; however it would require a lot of research and finding the right hardware. It was this research that actually put me on to the path to the ER-X-SFP.
  • pfSense — Most powerful of all solutions, but would rely on the continuous availability of my server; so if the server has a hiccup, the whole network is toast. The risk seems to outweigh the benefit.

The Solution

The ER-X-SFP offered everything I was after: low cost, VLANs, multiple WANs, multiple separate LANs, exciting new OS to learn about.

The learning curve was steep, and things don’t feel as smooth as I would like them to. There’s very little to add to the million how-to’s available in blogs and from the Ubiquity site, except for this:

  • the dhcp server allows setting up routes for statically allocated clients (from the CLI). (see config example at the end)

This effectively allows the router to tell (some of it’s) dhcp clients to use a different gateway in the network for Internet access. It is a crude load-balancing technique, but allows rules-based Internet access across multiple routes based on device importance.

 

========sample configuration file=============

static-mapping LGwebOSTV {
ip-address 10.10.10.111
mac-address c8:08:b0:0b:1e:55
static-mapping-parameters “option routers 10.10.10.2;”
}

==============sample cli commands===========

set service dhcp-server shared-network-name LAN subnet 10.10.10.0/24 static-mapping LGwebOSTV mac-address c8:08:b0:0b:1e:55
set service dhcp-server shared-network-name LAN subnet 10.10.10.0/24 static-mapping LGwebOSTV ip-address 10.10.10.111
set service dhcp-server shared-network-name LAN subnet 10.10.10.0/24 static-mapping LGwebOSTV static-mapping-parameters “option routers 10.10.10.2;”
commit; save