I posted a couple of weeks ago about the issues I’ve been having with Internet access in our house.  Despite turning off the wireless on our BT Infinity Home Hub and using a high-end Cisco wireless access point, we were still getting a lot of issues with the Home Hub freezing that could only be cured by a power cycle.  I don’t think this is faulty equipment as I’ve been through quite a number of different combinations, I think it’s an issue with the low-end equipment issued by BT and other ISPs really not being suitable for use with many wired and wireless devices at once (we have about 20 devices connected).

Since then my good friend Jono has recommended a company called Mikrotik who make a range of routers, switches and wireless access points.  They are all ‘proper’ enterprise-level routers with fast processors and a proprietary operating system that’s based on Linux but tailored for fast routing.  I was initially dubious, but after being reassured that this kit is used in data centres and deployed by ISPs to customer premises, I ordered an RB2011UiAS-RM which is an 8 port router in a 1U rack mount with a nice LCD screen that shows stats or whatever else you want to see.  At under eighty quid you can probably understand why I was dubious.

Well… it’s great!  You definitely need to understand a bit about networking to get this configured, there are a few wizards but if you don’t know what PPPoE means or why you need NAT then you’ll probably struggle.  I can’t say I’m an expert but I did configure Linux iptables-based firewalls  back in the day so I was able to get up and running within about an hour.  It’s obviously much snappier than the BT router for web browsing (that could be a bit of confirmation bias, but I have been struggling with getting a decent Internet connection for months so hopefully I’m not quite so easily fooled…) and it’s been rock solid so far.

I also learned a bit more about how traffic flow works over a fast connection.  I had already observed, subjectively, that the ‘superfast’ BT Infinity did work very well with a single laptop plugged into the router.  It turns out that ethernet (well, specifically TCP) uses a system where the sender gradually increases the rate at which data is being sent, until packets start getting dropped (because the connection is saturated) then cuts back the rate until it’s stable.  So even on a very fast connection, you can get into a situation where all the different clients and servers start sending data faster and faster, then all drop back, then all speed up again etc..  That’s probably a vast over-simplification, but the upshot is that you can have a fast internet connection but, on average, not be getting a good speed – a bit like the motorway on a Sunday afternoon.

The answer is to ‘shape’ the traffic so that the data coming in and out of the router always stays below the level that the broadband link can support, which means that the router at my end is dropping packets (therefore slowing down) from some connections but, crucially, not all of them.  When the bottleneck is at/in the broadband link then when the limit is hit, all of the connections will start to drop packets and cause the swinging situation described above.  It’s a bit like the rolling roadblocks that the police sometimes use on motorways – by slowing things down before they come to a grinding halt, you can actually speed things up for everyone on average.  By only slowing down selected connections, you keep most traffic still moving quickly, and even the slowed-down connections will recover before it all gets out of control.

What I’ve done is set up a QoS tree that slows down things like big downloads and prioritises Internet TV (like BBC iPlayer and Netflix).  I’ve use a script that I found on the web, now heavily modified, and the results have been very good.  We can watch streaming TV on the highest quality whilst still browsing and downloading and it’s been much, much better so far.  I’ve improved on that script quite a bit, and I’m planning to contribute it back to the original authors when I’ve got it completely honed.

I’d highly recommend looking at Mikrotik for anyone considering any network that goes beyond the 10 client limit (even their access points are an astonishing 30 quid!) and looking at strategies to shape the Internet traffic so that you get the best out of your connection.