x86 Commodity-Hardware Router?
neomage86 asks: "I recently had to set up a router for a small company, only five users at any given time, and the needed VPN capabilities are built in. So, instead of using a Cisco or other embedded router, I decided to just install Linux and IPTables on an old 200 MHz PII I had lying around. It's been working fine, and I'm thinking about doing something like this for a much larger network (3000+ users). Does anyone have suggestions on how much I will have to beef up the hardware to provide IP Masquerading for about 1000 users on a T3; provide network-layer filtering of the transmission; and route between 4-5 internal subnets?"
VPN can be a real resource hog... word is though, that the Via C3 has some sort of processor level instructions to help accelerate this. Has anbody else heard of this?
No seriously, you're going to swamp your PCI bus if you're doing routing between internal subnets. Goodbye, LAN throughput. Not to mention what merry hell you'll play with the CPU with VPN and firewall rules.
Your solution is great for a small place, or even a large place in a dedicated niche (like only VPN and/or firewall, or monitoring/IDS.) I wouldn't do something that ambitious with PC hardware though.
I would personally go with a BSD flavor rather then Linux. Don't get me wrong Linux is great but BSD was designed with routing in mind. You will be able to get away with less hardware and out of box things like OpenBSD are going to be more secure then a commodity Linux.
Do the math. If your homebrew system goes down, you will be burning the time of 1000+ people ($60,000) per hour. With those kind of numbers it doesn't pay to do it on the cheap. Get a redundant Cisco system with plenty of power backup.
And for said couple-hundred, you're looking to pick a secondary network card, along with a 2Ghz or so Athlon or P4 of your choice with a motherboard with a built-in network card. The built-in network card is important for a router.
An Athlon-64 or above would be ideal, simply because you'd be able to mount ludicrous amounts of memory on the box, which is pretty much all that could ever matter for a router/firewall app, as Linux can easilly support logging anything you want to a remote boxen.
Realistically though, I've routed 8 T1's at 80+% capacity in both directions among 650 laptops before, including 3 seperated subnets, all routed through one box.
The box was a Celeron (P2) 800Mhz we'd downclocked to 633Mhz (standard practice at my company, downclock everything for live events for stability) and it used around 10% of the CPU at peak once configured correctly.
By 'correctly' I mean having the T1's all coming in on a seperate PCI bus from the actual network cards for the subnets. Specifically, the built-in ethernet turned out to be on a seperate PCI bus from the actual PCI slots in the case. Configuring the box to take advantage of this dropped CPU load from 80+% to ~10%.
So... for a T3 fully loaded? I'd say get a 2.0Ghz machine just for breathing room, and give it at least 2GB of memory, as neither is that expensive and will leave plenty of breathing room for things like IPSec or other fancier options down the road without any problems.
It doesn't matter what sort of PC you are using...you simply cannot pump that much through a standard PC. 3000+ users? forget it. You are going to need a cisco my man. Unless anyone knows if those quad cards can route between connectors at faster (much much muuuuuch faster) than the PCI bus will allow.
/* oops I accidentally made a comment, sorry */
So you're saying that his customer should avoid vendor lock-in by locking in with a proprietary vendor?
Hmm... Linux routers and firewall rules are well described on the web. Any "competent network engineer" as you describe him/her is likely able to read...
It's do-able but segment out the functions at that point. Do you really want to try to route between subnets as iptables is traversing the masq table? Get three boxes; one box for routing, one for vpn traffic and one for actual firewall/masqing. IBM has crypto boards for accelerating SSL/IPSec stuff with linux drivers IIRC for your vpn box. Also, with three boxes you can take down the vpn without taking down the internet connection.
I would suggest getting PIII's instead of PII's though, but check where bottle neck's may be PCI bus, CPU processing packets, NIC not doing so well... etc. Plus if one box is connected to multiple subnets, it can be dhcp and/or dns and/or wins for them (if you do DNS please use the forwarder's option to forward dns requests to an upstream DNS server if possible).
www.rdex.net
Especially with a PC-based router the customer needs to understand that he is now buying a *service* instead of a machine. It's not too smart to leave *any* box live on the Internet, or even in a customer's office without some sort of maintenance, but for a Linux (or Windows, any flavor) box it's potentially dangerous.
The number of exposures for Linux doesn't particularly bother me, for a box that's being actively maintained. For a generally non-service box you don't even need to be paranoically prompt about getting fixes applied. But I'd get worried about an *appliance* PC.
The living have better things to do than to continue hating the dead.
If you're just powering a T3 and 6 10/100 subnets, you could get by on
v c/ps2 030/products_data_sheet09186a0080189f0a.html
P4 2.xxGhz (assuming moderate VPN usage)
512MB-1GB RAM depending on how many simultaious connections you're working with. The more connections the more memory eaten up
Hard drives: minimal config.
Motherboard & NIC's: Depending on how much you're 10/100's saturate, you may want to get some 66Mhz 64bit PCI cards instead of regular 33/32's. Eg:
http://www.cisco.com/en/US/products/hw/vpnde
It all depends on how much simultanious traffic you're looking at. You can use the analogy that the PCI bus is a network switch's backplain. 66/64's can transmit a theoretical maximum of 4gbits/sec. so it should be enough for anything you throw at it. 33/32's maximum theoretical is 1gbits/sec. but in reality expect for much less.
Bye!
- More online documentation than every other router and firewall vendor combined. Docs ranging from step by step howtos to in-depth discussion of complicated setups.
- An open system that is upgradable on your timeline not your vendors
- An easy upgrade path. If you want IPv6 support (or some other feature) and have an old firewall you might have to purchase a whole new unit if a new firmware with those features isn't available for your unit.
- An army of people who know how to use iptables
Since it'll be running on an open system, they can seek out anyone's consulting services they want including those that might be in their own organization.T3 = ~50mbps
Wrong - you got the division wrong
PCI Bus 127 MBytes = ~1Gbit/sec
T3 = ~45 Mbits/sec
Are you telling me the fastest a PC bus can go is 15 MBits a second ??? I know of Intel class hardware that can keep 100 MByte going over a Gbit NIC. Lets not even go into shipping PCI-X busses and soon to be shipping PCI-Express busses that are significantly higher throughput than this.
Now that we have that problem solved, what you will run across with multiple 100Mbit network cards running into your system is a higher latency than your low end cisco router, and lower reliability potentially (all though in both cases, I suspect software reliability is orders of magnitude lower than hardware reliability). If you can live with the higher latency going through a PC based router - go for it, you might save a few bucks...
I have mod points and I am not afraid to use them
Uh, PCI bus is 128 Mega-BYTES per second maximum thruput. That is 1 Giga-BIT per second. And that is just for the standard 32bit at 33MHz speeds. There are plenty of Intel based servers with 64bit and 66Mhz PCI variations.
-- I am not a fanatic, I am a true believer.
If you get something with PCI-X, instead of standard PCI, you'll have a lot more bandwidth.
PCI-X is 64-bit, and with multiple cards, they'll probably be running at 100MHz. Vs. standard PCI at 32-bit, 33MHz, that's 6X the bandwidth, or about 90mbs, more than enough.
Just make sure you get one with enough 100MHz PCI-X slots for all your NICs. Many boards come with, say, 2 100MHz PCI-X, 2 66MHz PCI-X, then some standard slots. (Note that it's 2 slots per bus, and for more slots, the mobo will have multiple buses.)
Of course you'll need PCI-X network cards to handle that. Does anyone make those?
This is starting to sound expensive. Not sure it would actually save you any money. It would be cool, though.
-Uberhund
If you're inexperienced, try to get everything from one vendor so that getting it all working together is their problem, not yours.
You could do worse than a http://www.nortelnetworks.com/products/01/passport /lan/.
The Airport Base Station (original) is a very good "take apart" to learn how to build your own router.They couldn't be more simplistic in design and implementation.
Yell & scream & rant & rave... it's no use... you need a shaaaave ~ Bugs Bunny
Admittedly, the pci bus will probably be the first absolute roadblock with a good machine, but I think you are all underestimating it's ability.
I did a quick test on my home network to make sure. I easily got 97 Mbps using NFS to transfer (multiple simultaneous) files between 2 machines on 100 Mb ethernet. I think that is pretty conclusive evidence that the PCI bus will not be a limit even on a DS3(T3), which only goes 51 Mbps. One of these machines even has the video card on the pci bus.
Anecdotally, why would we even bother building Gigabit ethernet if unable to read the data (given, the bandwidth is shared, but anyway).
For stabilities sake, you should probably not try to do the routing among internal subnets with this box. However, if most of the internal traffic is accessing external hosts, this would also be possible, since most of the traffic will be crossing this box anyway.
Linux wins the speed race, hands down.
You will get 0wned much, much faster with Linux than with OpenBSD.
The packet filtering software on Linux is horrible. The syntax is just nasty. And there are no guarantees it won't change again with the next kernel release.
Use a BSD system, with a real packet filter. FreeBSD gives you the choice of IPFW, IPF, or PF. OpenBSD gives you PF. NetBSD gives you IPF or PF. All of those have much larger / better features sets than IPChains / IPTables, and work a *lot* better in NAT/PAT/MASQ situations. These packet filters are also truly stateful (last time I checked IPTables, it wasn't truly stateful without a bunch of extra patches).
Linux makes an OK home firewall. But I wouldn't use it anywhere near a business.
We use FreeBSD 4.9 on Pentium 166 MHz systems with 128 MB RAM using IPFW to server secondary schools with just under 300 student computers. Haven't had any problems yet with network slowdowns or dropoffs or anything. These are on T1s in the remote schools, and 8 Mbit cable in town.
(I had problems keeping a similar box running Linux and IPTables working on my home wireless T1-equiv link.)
my network is basically served by a Tandy Sensation 2, a 486sx/33 with a 487slc/33 coprocessor installed. 40MB RAM, 2GB hard disk. It runs router services for .. uh.. 4 computers currently, and has run services for 10-12 computers. It also sports the network's email server, for three domains that I receive mail at. And a MySQL server, that I haven't had much use for lately, but it used to gain a few thousand SQL requests a day.
"Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
If your company can afford to pay 1000 people and run a T3, they have the money to buy a PROPER Cisco-based setup.
Oh. And hire an experienced professional to install it (i don't dobut that you could manage it, though). I wouldn't trust a job of this size to someone who 'did it once at home and it worked'. The enterprise works much differently than your basement.
If you set it up and something goes wrong, you, my friend, are screwed.
-- If you try to fail and succeed, which have you done? - Uli's moose
There's a whole niche market for "stripped-down versions of Linux" that handle things like this.
Currently, I'm using Mikrotik RouterOS as a core router. It's at a small ISP -- 400 or so high-speed customers, 3000 dialup customers (400-500 of which are connected during peak times). Standard routing stuff (30 or so internal static routes, big deal). Couple hundred firewall rules (some for stopping Windows worms from spreading, some for general network security, some to help keep the nastier spammers in check). And BGP, taking a full BGP feed from our upstream, plus a couple multihops from places like Cymru's bogons project. And it doubles as a PPTP server so I can securely work from home (in a gesture of supreme irony, I can't get Internet connectivity from the company I work at).
And some other stuff I can't think of right now.
All this is running in a 1U system I got from eRacks (they make good cheap stuff), except for the hard drive, which I yanked and replaced with a 64MB IDE-flash drive from these guys. Celeron 1.3GHz, 512MB RAM. The system never ever, even during peak times, goes over 10% CPU load.
This isn't quite up to the specs the original author was looking for, mainly because this hardware isn't also doing the T1 stuff. (It's got plain old boring Ethernet to an older Cisco router, to which our four T1s are connected, but the Cisco is basically just a really big media converter.) But given how low the hardware utilization is on this unit, and how underpowered this system is as compared to current hardware, I think it shows that the notion is quite feasible.
Cisco is a standard. Period.
1. Cisco has plenty of documentation, online and otherwise.
2. No matter whether you run Linux, OpenBSD, or IOS on a Cisco box, if a vulnerability comes up, unless you're a fluent coder, you're not patching it until someone else fixes it. Cisco is generally very good about fixing critical problems.
3. Considering 10 year old Cisco equipment is still in use in many places, I don't think that you have to worry about purchasing "a whole new unit."
4. An army of people who know IOS. Need I remind you of the evolution of Linux routing? 2.0.x: ipfwadm. 2.2.x: ipchains. 2.(4|6).x: iptables. Things change a lot in Linux it seems.
Now that I've defended Cisco, let me throw some points towards Linux. Linux is great for networking, I use it a lot. I wouldn't buy a Cisco router for my house, it's just not practical. If up front cost is that much of an issue, use Linux. I've been in the situation, and I still have [Linux] boxes routing at places I haven't worked at in a long time without rebooting since I've left. That said, the networks I work with now could never be run on PC hardware. It's just not possible. The beautiful thing about dedicated networking hardware (i.e. Cisco) is that it has the ability of doing operations via custom ASICs. Therefore, the CPU load stays super low, latency goes way down. That doesn't make a difference on a T1, but it sure makes a difference on a Gigabit connection. Whenever the money is there these days, I recommend Cisco.
"Nature doesn't care how smart you are. You can still be wrong." - Richard Feynman
and they seem to be doing pretty well. I went looking for weird NIC hardware and came across Imagestream. They make big routers with Linux at the core, on x86 hardware in industrial form factors. Definitely worth a look.
Also on the thread of interface cards, try Mikrotik. If you're doing wireless, the MiniPCI carrier boards will make your day.
Full disclosure: I'm not related to or affiliated with either of those companies in any way. I've never even bought anything from either of them. I just came across them while searching and thought they were bookmark-worthy.
Our main firewall for our hosting company is a 2Ghz P4. We are not doing vpn, which would be the most resource intensive, but our T-3 line comes directly into it and we have a ton of firewall rules. There is never a load on the box, except when nimda hit :).
And with bridging you can have two transparent firewalls (no ips) that are redundant, using Spanning Tree Protocol. Pretty cool.
As long as he;s not trying to do VPN encryption on it, he probably will. Personal experience tells me a P100 (running FreeBSD, not Linux) can easily firewall a 100Mb network link for a few dozen users, so anything P2 class shouldn't have any trouble at all.
No seriously, you're going to swamp your PCI bus if you're doing routing between internal subnets. Goodbye, LAN throughput. Not to mention what merry hell you'll play with the CPU with VPN and firewall rules.
The PCI bus is not an issue. PCI is ~120M/sec and even 100T ethernet is only 10M/sec.
Any P2 class PC with some decent network cards (I personally recommend Intel EtherExpress cards) should handle his setup _easily_. You'll probably run out of (ie: have to manually tweak) OS resources long before the hardware is stressed. The bottleneck is not going to be raw throughput per se, it's going to be how fast the machine can process individual packets.
well, to give you an idea of what can be done, i'm running a slackware based p100 as a gateway/firewall/router/name server for my entire home network. there are 12 computers between a bunch of people. it sits between the cable modem and two switches with 2 10/100 $10 ethernet cards in it. of course this is not a large scale network, but it shows you what a p100 can handle with ease. for security i disallow all incoming connections except ssh. and if you think it doesn't get much traffic, i keep gnutella running on one of my computers 24/7 with about 100 active downloads at any time.
Interesting, nobody has 0wned any of the linux systems I admin at work in the year I've been working there.
Just to clarify, this is a project for my High School. They are upgrading the network infrastructure, and I work with the tech-ed department through an internship class. I just wanted to make sure this was reasnoble, before I suggested it to my own bosses.
Pfft, I'll bet you just didn't notice. That's how 0wnz0rd you are.
I want my Cowboyneal
Love the thought but pc hardware is hardly up to mission critical status even with a stable OS on it ata drives fail cpu's overheat junk ram corrupts data a company of 3000+ people cant afford to have downtime from that crap chipset or failed ram and can afford to by something that is more likely to last