In lab and test environments it’s often useful to be able to provide a configuration which can emulate multiple physical locations. Examples of this include testing a multiple site Active Directory configuration or to showing the impact of network latency on applications. Historically I have used a Windows 98 system to provide this functionality (definitely not recommended from a security perspective especially now-a-days) but my thought was that if you have existing Windows 7 home edition licenses – maybe they could be repurposed towards use as a virtual router (at a cost of less than $100 for a Windows 7 Operating System there may be situations where this would be logical). A side-effect of developing this virtual router on Windows 7 was to determine what the minimum amount of memory which was required for Windows 7 (148 mb versus 12 mb with Windows 98).
These were the steps required to build a virtual router in Windows 7:
- Install Windows 7 (Home Edition in this case)
- Patch the system with all outstanding critical updates
- Disable the firewall (it may be able to be be re-enabled after the routing is functional, but disable to make it easier to test the routing functionality)
- Enable routing on the Windows 7 system by creating a key called IPEnableRouter (REG_DWORD) with a value of 1 as shown below in HKLM\SYSTEM\CurrentControlSet\Tcpip\Parameters.
5. Create a route from the system attempting to reach the remote location and back from the system attempting to be reached. I used route add but netsh may be a preferred approach (see the links section towards the end of this blog article).
The ping test below shows a ping before addition of the route and after addition of the route displaying the ability to ping a remote system.
Summary: Windows 7 home edition can provide a relatively lightweight router for virtual environments.
Additional links with good reading on this topic:
Stefan Stranger created a blogpost about creating a virtual router using Vyatta which maybe also a good solution for a small memory using virtual router.