Building my own router, have some questions

Hello folks, I'm interested in learning more about networking, and taking on a new project so I figured the best way to do this is to build a router of my own. I don't currently know what all I'll be doing with it, but its an educational product so probably absolutely everything my bank account and wife will allow. I don't need a new router, I want to learn networking, and this is something I'd be interested in learning as well.

I'd like to do this with all new hardware in as small a form factor as possible. I'm thinking of using 4 intel PCI-E NICs, well, 2 x 2 port or a single quad port. However, for my network, I'm thinking about going 10gbps so I can transfer files between my computers (3 of them) faster.

My questions:

  1. What hardware is actually important for a router? What speed of RAM is important, how much is enough, what speed should my processor be, out side of the wired NICs and Wireless NIC is there any other special hardware I should consider?
  2. Can I use the 10gbps fibre NICs (both in the router and computers) to access the internet coming from the CAT 5 on the motherboard (or do I need a 1gbps NIC) to the modem or do I have to stick with all 1gbps NICs?
  3. Can I set this router up as a VPN or will I still need an external service?

Again, the purpose of this is to use it as a foothold to learn all I can about networking. I'm not concerned with necessity, I don't know what I'll end up doing with it so I need it to be expansive and able to handle almost anything I can throw at it limited only by budgetary concerns. Any advice is definitely appreciated!

1. It all comes down to what you'll be doing with it. Basic routing, few machines : a Pentium 2 with 256 Mb of ram could be more than enough. (No kidding, I have Juniper routers in production still running on pentium 2) Seriously, just get whatever is cheap and power efficient if it's for home use. If you plan on using it as a firewall and VPN access as well, put a little more horsepower, but don't get crazy. A Core i3 w/ 4GB of RAM should largely do the trick.

2. I think you're confusing Switches and Routers. A router will route traffic between different networks and eventually execute firewalling and access-list. A switch will interconnect equipments within the same network. In order to transfer files between computers on the same network, you're gonna need a switch, not a router. Sure you could bridge all interfaces of your router (in pfSense) and and it would kind of act like a switch, but it'll be terribly slow and putting a lot CPU power towards something a switch would do in a jiffy.

3. Yes, using pfSense as your distro, you'll be able to do both routing and firewalling. Take a look here, there's a quest for the best open source firewall/router distro.

 

Honestly, i's highly unlikely your computers would have the disk speeds required to fully enjoy 10 GigE. Lay down cat6a cables so you'll be able to upgrade to 10GigE in the furute and stick to GigE equipment for now. The price difference is huge for the NICs, let alone for the active equipments (switches and whatnots).

Thank you very much for your reply! Of course it leads to another question or two.

1. Wow, I'm surprised they take up that little processing. I was thinking about trying to pick up a quad core of some description and reduce it to around 2ghz to reduce the energy usage. Sounds like that won't be necessary though. I'm definitely doing a firewall and VPN, maybe even encrypted storage for my raw video files so I don't have them tied up on any one particular PC. I'd also like to be able to record the footage directly to those drives and locate my downloads there so I can leave just my SSDs in my computers. But my initial plan was a quad core CPU and ~8gb of RAM, so that's interesting that I could go smaller and not have to worry about much. On RAM, should I worry more about timing or bandwidth? I'm assuming 1333 with really tight timings would be better than 2400 with a CAS of 10.

2. I was definitely confusing switches and routers, and this clarification leads to the question, can I make another computer as a switch or am I forced to buy one? And either way, can I get 10Gbps on the switch? The reason I'm looking for 10Gbps is because I deal mainly with large, uncompressed, unrendered video files. And my computers are all equipped with Samsung 840 Pro/Series SSDs in Raid 0 so they can get close to 900 MBps in sequential Read/Write which is way above the 125 MBps of 1 Gbps. I'd also REALLY like to be able record the videos to my network storage.

Thank you very much for the reply again, learned something already! lol

1. To get an idea of what computer specs you should have, please refer to pfSense documentation as it has a pretty thorough list of requirements according to global throughput of the router. Careful though, this is only for your router, so basically, scale according to your internet link speed (+ roughly 20 to 50% for VPN and firewalling). Routing can get heavy on memory and CPU when the routing tables are really big, but this would never happen on a home router - more likely on an edge and core router. Also, you should use dedicated appliances for each task you want to perform. For instance, a router should be dedicated to routing traffic, a switch to switching traffic and a NAS for network storage. So, in order to have network storage and have the best performance possible, I strongly recommend using a separate NAS for storing all your data. It will be dedicated for this sole purpose (and maybe newsgroup client / torrent client / etc.) and will be directly connected to your local network.

2. Switching is a very specific task that is very easily -well sort of- taken care of by specially designed CPUs but is very hard to properly emulate on a PC. The main problem is the high throughput required by the bus connecting all the ports together. For example, a 24 ports 10GigE switch will need approximately 480 Gigabits/sec of backplane capacity in order to switch full-duplex 100% load traffic on all ports. Yeah, that's a lot ! So, basically, you're stuck with buying pretty expensive hardware that can do switching at high speed. I searched around and found a few not "too expensive" (I use $10,000+ gear on regular basis, so under $1,000 is "cheap") here and here. I never used any of these but they come from a reliable manufacturer and should do the job just fine. Bear in mind that 10 GigE is still pretty new and still rare -even in enterprise networks, so the price premium is pretty significant.

 The other possibility is to put 10GigE network cards on your NAS with one port per machine (removing the need for a switch) and run point-to-point connections from each computer. This would be significantly cheaper, but would limit the upgradeability (you will be limited by the amount of PCI-E slots on your NAS). So, simply put -using 2 separate networks for GigE and 10 GigE: