1

I was wondering if this is possible. I would like to setup an internal virtual network, with internet access. I'm trying to create a lab environment for some testing. Nothing in the Lab Environment can touch the production network that the host is trying to get internet from. If this is possible, how can i set this up? My guess would be to have the hosts physical nic on the production network subnet, and creating a new subnet for the virtual network. Then somehow creating a static route between the 2 would be enough, but I'm not sure.

1 Answer 1

1

When thinking about this problem, you should start by ignoring the fact that virtualization is involved.

Imagine that you have an internal network of computers all connected to a switch, and you want those computers to have internet access. You can't just connect your switch to the production network, because that would put everything on the same LAN segment. There are basically two ways to fix this.

  1. Get another internet connection. This usually means contacting your ISP and having another modem installed. I worked with one ISP that actually gave out the second modem for free, and data was metered in the same account as the first line.
  2. Share your existing connection. You will need a router that supports connections to multiple LANs. (For an example see the Wikipedia article on single-firewall DMZ).

I'm assuming that option #2 is what you're interested in. Basically, you want to set up two subnets on the router and configure both of them to use NAT with your internet connection. You don't want to set up a route between these subnets, because then your testing environment could communicate with the production environment. The exact configuration will vary depending on what kind of device(s) you have.

Once you have a router set up to do NAT for two networks, the rest is easy. If you have two NICs on your Hyper-V server, just connect one to each network. Then use the Hyper-V Virtual Network Manager to set up two networks, one for each NIC. Then each virtual machine can be assigned to one of those networks.

If you only have one NIC on your router, or only one NIC in your Hyper-V server, then it's still possible to set this up using VLANs but it will be a little bit more complicated.

1
  • When thinking about this problem, you should start by ignoring the fact that virtualization is involved. - have to agree with this. While virtualisation might make some things easier (and some harder, come to that) its worth remembering that nothing magical happens just because someone said "virtualisation". Essentially: How would you achieve this normally? Do that then.
    – Rob Moir
    Feb 4, 2012 at 20:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .