The Linux Virtual Router Project - Informal Description

Note 5/3/2011: This page is out of date but kept around for historical reasons. These days we are still running a Linux virtual router, but it is based on CentOS 5.x + Linux 2.6 + Quagga.

One of the more exciting projects we have been working on lately is the Linux Virtual Router. Quite simply, it is a group of Linux machines that function together as a single Layer 3 Router, in a redundant fashion so that if the primary machine goes down, another can take over for it transparently. It routes between virtual layer 2 networks, implemented using IEEE 802.1Q VLANs. Please note that this page is a work in progress, and will be updated over the next few weeks with more details as I find time to do so.

Audience

This page is intended for a network administrator familiar with IP routing, Virtual Router Redundancy Protocol, and IEEE 802.1Q VLANs. It is an informal description of the project, and doesn't go into extreme detail.

Goal

We want to build a Layer 3 router that can link several Layer 2 IP subnetworks (implemented as multiple VLANs on a switched network) together. The big problem, though, is lack of redundancy. If the router fails, there is no connectivity. The solution we might come up with first is to simply have two routers. This works great, however we must remember that every host on an IP network must have a default route. Because of this, we have to choose one router or the other for the default route, and if we are unlucky enough to have the one we chose fail, network connectivity is lost for those hosts. Oops.

Virtual Router Redundancy Protocol (RFC 2338) was created to solve this problem. The goal of this project was to implement two things with Linux: (1) A router that can sit on several VLANs and route packets between them, and (2) Combining two or more of these routers into a VRRP virtual router for redundancy.

There exist hardware routers that can do this, and probably faster than a software solution. However, they are expensive, and the performance and reliability requirements of our application are met by this software solution.

Software Used

Hardware Used


+ Yes, we realize the secondary router has more RAM. This is because the primary requires buffered SDRAM, which we don't have a large quantity of. We're up to our necks in unbuffered SDRAM, however.

Configuration summary

So far we have had much success with this project. We have come across several caveats, but have managed to work around them. The stability of the Linux kernel when doing heavy IP routing is quite impressive.

Caveats (and solutions, if any)

Performance

Routing performance is pretty good, considering that it is all software routing and packets are coming in and out of the same physical interface. We have achieved 400-500 Mbps of throughput through the primary router, which has a gigabit interface. CPU load has been found to be minimal at all times.

Interoperability

We have successfully joined a Nortel Networks Accelar router/switch into the virtual router. It takes over properly when the Linux routers go down. Unfortunately, Cisco does not support VRRP (they have their own proprietary version) so we have not been able to test interoperability with Cisco IOS.

Links and Resources

Miscellaneous

I am always open to comments and suggestions concerning this project. It is ongoing, as our core network infrastructure at FIU-SCS depends on it.

This page written by John Flynn - flynnj@cs dot fiu dot edu
Sagwa the Siamese Cat (c) Cinegroupe, used without permission 'coz it's cute. :)