Skip to content

Instantly share code, notes, and snippets.

@oldmud0
Last active April 2, 2017 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oldmud0/8d549bad60f66546629615211440fe6b to your computer and use it in GitHub Desktop.
Save oldmud0/8d549bad60f66546629615211440fe6b to your computer and use it in GitHub Desktop.
vRouter proposal

A few days ago, it appeared to me that a virtual router software did not exist at all. Expensive Cisco software for simulating Cisco equipment exists, but it is used solely for their cert exams and labs. Router companies only offer blank/skeleton versions of their router's web configuration pages, but it does not offer a way to test routers without actually breaking them. Enter vRouter.

vRouter, if the project ever takes off, is an open-source project written in Qt intended to develop virtual networks based off real hardware from routers of every tier. Whether you want to test the stability of the newest DD-WRT firmware for your exact router model or need to assess a new configuration before deploying it to production routers, vRouter strives to replicate the workings of the vast variety of routers out there to make your job easier.

vRouter can let you build a network of any size and integrate it with existing networks. You can bridge your virtual network with virtual machines running in common virtual machine software (initially, VirtualBox), or you can bridge it directly with your physical NIC using an NDIS 6 driver. This allows you to manage your network as if it were a real one: if you wanted to, you could access the virtual router's web interface as if you were configuring an actual router.

There are, of course, professional applications for vRouter that make it economically feasible, such as for support contracts. vRouter's robust networking capabilities make it an essential tool for security researchers, network administrators, students, and those wishing to move toward full virtualization. Since it is free, anyone can contribute, and those companies that would like to pay for features end up benefiting the entire project, as those features become available to the entire project, not just to the customer (except, of course, if it is for a highly specific task or is part of a classified project, in which the organization gets a personalized, private branch of the source tree).

Everyone deserves the opportunity to enhance their experience with Internet connectivity and networking; it is no doubt that routers are restarted daily for simply not understanding why they're not working as intended. What's more, the people who actually take their time to troubleshoot the problem are hesitant to flash new firmware, in fear that their router will be bricked forever, a far cry from simply having intermittent Internet connectivity. vRouter quells these fears: does the firmware work? Will a tiny change in configuration throw off the stability of the entire router? A router is not a magical black box after all; it is a machine that can be tamed, like the computer that you are using right now.

Naturally, there are immense obstacles to the creation of vRouter, especially in the realm of virtualizing each and every variation of router specifications. Routers are embedded applications with customized PCBs, often lacking any standard firmware interface: whereas PCs have BIOS or UEFI, there is no equivalent for routers. The solution is to create a generalized model that can be fit with minor tweaks to most models for a certain brand, product family, or chipset. Proprietary interfaces are abound, and reverse engineering will not be uncommon to make virtual versions of all these routers a reality. Some routers use MIPS32, others use ARM, and some even have MiniPCI slots for expansion.

The bright side is that due to the extensive use of open-source software by a number of router manufacturers such as Linksys and Netgear, they are legally obligated to release the entire source code for their firmware, absolutely free of charge. This means that opening up firmware in IDA Pro is absolutely not a requirement, and we can use what we know from the source to virtualize the hardware based on how the software expects it to work, along with spec sheets, effectively opening the way for mass virtualization of routers.

Finally, while the word "router" is most mentioned in this proposal, keep in mind that the target is all network equipment, including switches, firewalls, and load balancers. Virtual machines and physical network cards can be placed on the network.

After initial working versions, the roadmap would include packet tracing/capturing, saving the state of a network, and so many other things I can't even think right now.

Build your dream network, and never brick a router again. Welcome to the world of vRouter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment