setting up internal network with internet access


  • I have installed a copy of hyper-v 2012 core, and I am trying to make a test environment to learn on, I have already created 3 virtual machines, one will be the DC, one will run Exchange, and the last one will be a windows 7 client. Now, I want this to be an internal network, but also have internet access, all the information I have come across online is very confusing for someone just getting started with hyper-v. Any help/advice is appreciated.


    Tuesday, September 02, 2014 2:48 AM

All replies

  • If you're asking about what vSwitch type to use, the answer is external.

    External vSwitch = attached to physical NIC (need for Internet access that you require) + can have vNIC for management OS ( = physical host = parent partition) + can have vNICs for guests ( = VMs = Child Partitions)

    On the other hand, internal and private vSwitches do not connect to physical NICs (or NIC team).

    A Private vSwitch does not allow a vNIC for the host, while the internal vSwitch does.

    You would typically use an IPv4 private address segment like ( or ( or (

    Sam Boutros, Senior Consultant, Software Logic, KOP, PA (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable)

    Tuesday, September 02, 2014 9:22 AM
  • You can use internal but you would need an additional VM running some sort of proxy/firewall that would have access to both the internal and a external network it would be your gateway for the internal network and have 2 network interfaces one on internal switch and one on external.

    Tuesday, September 02, 2014 2:44 PM
  • OK, I know that to run an internal network with internet access I will need a machine set up with 2 network interfaces, question is, how is that set up. Can I set it up on the Domain Controller VM? Does it use NAT, how is it configured, that is what I am having trouble with.
    Wednesday, September 03, 2014 2:22 PM
  • You do NOT need a machine with 2 NICs. You setup your VMs' networking precisely the same way you setup physical machines. 

    For example, if your network address is - Mask, Gateway being your Internet router, you setup you VMs' networking the same exact way you would a physical machine. For example, IP, Mask, gateway or set it to DHCP if you have a DHCP server somewhere on your LAN. 

    Nothing different or special about a VM networking setup.

    Sam Boutros, Senior Consultant, Software Logic, KOP, PA (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable)

    Wednesday, September 03, 2014 5:47 PM
  • So what do I do if I want to learn the DHCP and DNS Roles of the server if I am on a home network that is already getting that information thru the ISP router without messing up the existing network?
    Wednesday, September 03, 2014 5:59 PM
  • I would start by taking classes in-person or online and apply that knowledge to your home lab. You can disable DHCP on the router if you want to practice setting up DHCP on one of your lab machines. Or you can have more than one active DHCP server on the same network with non-overlapping scopes. These are the things you learn in a typical CompTIA A+ or Network+ course for example. 

    Sam Boutros, Senior Consultant, Software Logic, KOP, PA (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable)

    Wednesday, September 03, 2014 7:17 PM
  • I am just trying to get information on if there is a method/setting in hyper-v that will allow me to access internet from internal network. I know that I would need 2 virtual switch networks, 1 internal and 1 external. I am not looking to take a course on networking, I am just trying to find out what settings I might need to set up on the adapters so that it will work properly. I found a YouTube video showing how to set this up using hyper-v on a windows 8 machine, but since I am using hyper-v core, I do not have access to the gui interface. After creating both the internal and external vswitchs I can go to the hyper-v server, and I see that the external connection is using one of my adapters, which has a static IP that I have already assigned it. there is also a new virtual adapter that has a 169 address, which I know is normal. Do I need to make any more adapter changes in hyper-v core, or can I do the rest of the necessary configuration from within the server 2012 virtual machine.
    Wednesday, September 03, 2014 8:35 PM
  • First, since you are new to this, I highly recommend that you download an evaluation copy of Windows Server so you can use the GUI.  Hyper-V Server is meant for those experienced users who are comfortable managing everything remotely with PowerShell. It is NOT meant for someone trying to learn the basics you are describing.

    If you want to have all your test environment running on an internal network, meaning that the network is available just to the VMs and the physical host, but is not connected to a physical NIC, and yet you still want to have the VMs access the internet, you will need to install the RRAS feature on the Hyper-V host to work as a router between your internal network and your physical network.  Your Hyper-V host would have to configure the internal network on the IP subnet you plan to use.  That IP subnet must be different from the IP subnet on the physical NIC.  Search TechNet or Bing for RRAS installation/configuration and you will find a number of blogs with examples.  Yes, you end up using the NAT feature of RRAS.

    . : | : . : | : . tim

    Wednesday, September 03, 2014 11:10 PM
  • Thank you for the information. I downloaded the hyper v core because it was free, but you are probably right, I'll probably go ahead and install server 2012 eval to use it as a hyper-v host and build my test lab in that. Thanks for the information.
    Wednesday, September 03, 2014 11:20 PM
  • I know it has been a few days, but I am needing a little more assistance. I have installed server 2012 R2 with hyper-v role as well as RRAS role. I have 3 virtual machines. I set them up to run with an internal connection and they work fine. I installed NAT, however it does not give me the option to select the internal virtual adapter I created

    If I create an external connection instead it will pull its information from the Verizon ISP router which I don't want. I am just trying to get a system running that will let me test DHCP, DNS, and Active Directory, without messing up the home network as I am not the only one using it. Please help.

    Friday, September 12, 2014 2:56 PM
  • "however it does not give me the option to select the internal virtual adapter I created"

    Did you configure the internal network presented to the host with a fixed IP address on the internal network?

    If you are just trying to test AD, DNS, and DHCP, why do you need access to the internet?  You can do all of that with no internet access.  If you want to ensure patches (not really needed for an isolated environment like what you are describing), that can be handled in a variety of other ways.

    . : | : . : | : . tim

    Friday, September 12, 2014 5:42 PM
  • OK, essentially what I want to do is study to get my MCSA in windows server, however, I am also wanting to learn exchange 2013 and possibly down the road SharePoint. I thought it would be nice to have internet access for exchange. At the moment I don't have the time or money to take any Microsoft boot camp courses, so I am trying to set something up so that I can do self study. I have heard that if you are going to get certified the best one to get first is Windows Server certifications. The reason I have been trying to do NAT is that right now I am on a home network used by more than just me, so I can't go in and turn of DHCP for my testing. If I am going about this the wrong way let me know.


    Friday, September 12, 2014 7:34 PM
  • You can do this by creating two switches and two nics.

    Create a private switch, Create an external switch, Connect a nic to each

    For the nic attached to the private switch come up with a subnet that is not used by your lan. Ex: if the lan uses use for the private switch nics. Just make sure everything is on the same subnet.

    For the nic on the external switch, if it does not receive DHCP addressing (or if you don't want to use dhcp) then just assign it a free static IP from your lan subnet. It doesn't need to use nat.

    You can still use DHCP for your private switch if you want to for testing purposes. All you gotta do is just not give the DHCP vm a nic connected to the external switch, or alternatively you can specify which interfaces the DHCP will listen which case you need to make sure it only listens on the private network interface. This way the only things that can hit it are the other vm's and their nics that are on the private switch.

    • Edited by Noah Sparks Friday, September 12, 2014 8:41 PM
    Friday, September 12, 2014 8:35 PM