Friday, July 11, 2014

Building My Own Router - Hardware

For a long time, my apartment's main router has been a WNDR3800. It's a great run-of-the-mill dual band Gigabit SOHO router that supports OpenWRT, and I've been playing with CeroWRT, but my network has been outgrowing it's capabilities for a while now. With some assistance from my buddy Sean, I've put together an Atom-based router that I've quite happy with.

This post will mainly be a hardware run-down for the build. Documenting my network topology and why it needs a router of this caliber is a post for another day. Until then, know that you can run pfsense as a great router OS on this box, but I personally am using Ubuntu as the basis for an entirely hand-configured software stack.

Parts list:



The heart of the router is the D2500CCE motherboard. This is a fantastic router board with it's dual Intel Gigabit Ethernet adapters. It comes with a PCI and mini-PCIe expansion slot, which I loaded with a WiFi card that I'm going to use as one of the nodes in my ad-hoc mesh projects. The AR5B95 can't be an access point, so I still need my WNDR3800 to act as an access point which is trunked off of this router. If and when I upgrade to higher-end or more access points, they'll be a drop-in replacement.

The dual core Atoms come with a decent stock heat sink, which lets you almost get away with passive cooling, but I opted to install a single 4cm fan for piece of mind.
This thing is just loaded with IO too. 7 USB ports in total, 2 RS-232 ports on the back, another two serial ports on headers, a parallel port, and even an LVDS port for an LCD.

The graphics support in 64 bit Ubuntu for this motherboard is garbage. Not a huge deal since I only plugged a monitor into it to run the OS installer, but you won't have a good time trying to install any kind of GUI on this. To get anything to display on an external monitors at all after you run the installer, you need to disable LVDS by appending the "video=LVDS-1:d" kernel argument. Good luck doing that if you didn't install an SSH server...
The M350 case makes for a nice stand-alone router case. I thought long and hard about building this all around a 19" rack mount enclosure, but opted for the flexibility of a normal case. It comes with both a standard 1/4" mounting hole for the power barrel connector and a punchout for a WiFi antenna which I used.

The M350 does only come with one hard drive bracket, so I had to order a second one separately for the fan. The stock mounting screws for the brackets were garbage; I've already stripped one by hand and had to drill it out, which was annoying. You'll want to replace them if you have the spare hardware available.
The front of the M350 has a removable cover (Which only comes off after removing the top! You'll break the plastic tabs otherwise...) which exposes another 4cm fan mount and a daughter board with the power switch and two USB ports. These USB ports are meant for hidden USB dongles, since there's no way to get at them without disassembling the entire case. Since I've already got WiFi on the Mini-PCIe slot, I might eventually install a Bluetooth dongle on these.

Of course, the stock power LEDs were bright blue, so the first thing I did was desolder them and replace them with low intensity red 3mm LEDs.
The PicoPSU is an interesting little board that plugs straight into 20 pin ATX power connectors (which still works on the 24 pin socket on the D2500 motherboard). It comes with a 2.5x5.5mm barrel connector for 12V input, and then converts that to the multitude of voltages you need on an ATX power connector, as well as a single Molex and single SATA power connectors. You're going to need a pretty beefy 12V power supply to pull 80W from this thing, so the 2.5mm barrel connector isn't wrong, but my system only draws ~12W and I've standardized on 2.1mm barrel connectors for my apartment 12V system, so I replaced the input connector. I've already got a 12V 12A power supply I use to run my main networking stack, so you'll need to make sure you have something capable of powering your system.

The network design and software stack I run on this deserves one if not several more of their own posts, but the basics of it is that one NIC is used as a WAN uplink, and the other is my primary LAN adapter, with each other subnet encapsulated in VLAN tags that get broken out by my 802.1Q aware managed switches and access point. I've been real happy with the performance so far; when performing a 100Mbps transfer between subnets routed through this single trunk line, the Atoms loaf along at about 88% idle.

5 comments:

  1. I would be interested on how fast the sqm system from cerowrt runs on this hardware. (it ports over to debian with a few minor tweaks)

    ReplyDelete
    Replies
    1. I've been meaning to as well! QoS has been on my list of things to test as I run my shake-down, but I haven't gotten to it. Inter-VLAN routing at 930Mbps eats 26% CPU as hardware ints with essentially nothing in iptables.

      You're the master; point me at a laundry-list of measurements you'd like. I might need some pointers as to what constitutes the cero sqm system these days. I understood it about two years ago, but haven't had time to follow the newer developments.

      Delete
  2. I actually got this motherboard,case and psu for Christmas and added a 64gb ssd and 4gb of ram and love running pfsense on it. It's been up for a little over a day now and I checked the cpu Temps in offense and they were 57*c. I immediately setup two fans to blow air in the case but am looking at something more permanent since they're temporarily taped on. My question is with the single 4cm fan,does it do a good job at cooling? I'm going to buy the second hdd bracket and was thinking two 4cm fans on it and one in the front to keep things cool. The posts I've seen about the stock fans say they don't do much but those boxes were running i3 and up cpu.

    ReplyDelete
    Replies
    1. It took some tuning with fancontrol, but I've got mine sitting at 42C with just the one 4cm fan in the second HDD bracket.

      There are no stock fans in this setup, so I don't follow.

      Delete
    2. Sorry. By "stock" fan I mean the 4cm fans mini box has listed with the case. I have two case fans blowing air in from one side and my Temps are between 40 and 45,depends if I close the closet doors. I was curious about the Temps with a 4cm fan but since they keep it cool,I going to order them with the second hdd bracket. Thank you for your help. Great blog btw

      Delete