Share via


Configuring Hyper-V for multiple subnets with only one NIC (Server 2012 R2 Edition)

This is a follow post from my previous post Configuring Hyper-V for multiple subnets with only one NIC for Server 2008 R2 . This post provides guidance as to how to achieve the same for Server 2012 R2.

Check with support before doing this in a production environment. I use this configuration in my lab and that's my intention for guidance.

 

Assuming you have Hyper-V loaded already, lets get started!

Open Hyper-V Manager and click on Virtual Switch Manager on the Actions pane.

Click New virtual network switch on the left and click Create Virtual Switch on the right

On the New Virtual Switch Network window, fill in the following fields.

  • Name: vNet Internal 10.10.10.0/24 (you can name these whatever you want; I like to keep mine named after the respective subnet)
  • Notes: (optional)
  • Connection type: Internal network
  • Click Apply

On the New Virtual Switch Network window, fill in the following fields.

  • Name: vNet Internal 10.10.20.0/24
  • Notes: (optional)
  • Connection type: Internal only
  • Click OK

On the New Virtual Switch Network window, fill in the following fields.

  • Name: vNet External
  • Notes: (optional)
  • Connection type: External network (select your network adapter in the drop down)
  • Click OK

You can add as many as you want/need by repeating the above steps.

Open Server Manager, select Local Server and click Manage > Add Roles and Features from the upper right corner

On the Before You Begin page, select the check box to Skip this page by default and click Next

On the Installation Type page, select Role Based or feature-based installation and click Next

On the Server Selection page, select your Local Server and click Next

On the Server Roles page, select Remote Access and click Next

On the Features page select RAS Connection Manager Administration Kit (CMAK) and under Remote Server Administration Tools > Remote Administration Tools select Remote Access Management Tools and click Next.

On the Role Services page, select DirectAccess and VPN (RAS) and Routing. If prompted by the Add Roles and Features Wizard, select Add Features and click Next.

Review the Web Server Role (IIS) page and click Next

On the Role Services page, click Next

On the Confirmation page, [you may need to specify a path to your Server 2012 R2 Installation files]

 


[whoops! highlighted the wrong selection, click the one under the highlighted one]

Click the link to Specify an alternate source path

Enter the location of your SxS folder on the installation media when prompted and click OK

 Click Install to begin the installation

This may take a few minutes to feel free to get up, do some stretches or grab a cup of coffee and head on over to https://www.bing.com/news and check out what’s happening!

Ok, now that the installation is complete, click Close to complete the wizard.

Now that we have the bits installed, it’s time to configure them.

 

Pop over to your Start menu and look for this icon

 

If you don’t see it, simply start typing (while on the Start menu) “Rou” and you should see the icon:

 

Go ahead and right click that and Pin it to the Start menu, then click it to open the RRAS Configuration Wizard

From here, it’s time to configure. It’s pretty much the same steps required from Server 2008 R2, so we’ll go ahead and work through them quickly.

Right click on Server Status and click Add Server

 

When the Add Server menu opens, select This computer if it’s not already selected, and click OK

Right click your server and select Configure and Enable Routing and Remote Access

 

Click Next at the setup wizard

Select Custom configuration and click Next

Select NAT and LAN routing

Selecting NAT will allow your virtual machines to access the internet. If this isn't your intentions, do NOT select this setting

Review your selections and click Finish

Click Start Service when prompted

You’ll need to configure your network adapters in the VMs to the proper configurations and you also need to assign your NICs to the appropriate network in the VM settings! You can refer back to my 2008R2 guide to see how I had them configured…I used the same configurations with the 2012 setup.

Good luck!

Comments

  • Anonymous
    January 01, 2003
    @Ben, you'll need to configure the External switch if you're wanting to connect to the VMs. Check out this page in the Mastering Hyper-V 2012 R2 book: http://bit.ly/XP6NQN

  • Anonymous
    January 01, 2003
    @Pete, sorry the solution isn't working for you. I find it quite odd that it would cause a BSOD simply by accessing Gmail. Are the BSOD's happening on the host or the guest VM? I'd recommend configuring the guests to create a memory dump file (Control Panel > System > Advanced System Settings > Advanced tab > click Settings under Start Up and Recovery) in there, you can configure the system to create a dump file that you can analyze to try and determine the root cause. Here's some guidance on analyzing the dump files: http://support.microsoft.com/kb/315263

  • Anonymous
    January 01, 2003
    @Sam, you'll need to ensure your Hyper-V hosts are able to communicate with one another via a router or switch of some sort.

  • Anonymous
    February 12, 2014
    Thanks for this updated post. Is it mandatory that the VM should have local IP's ? What if we want to configure VM with public IP's ? What steps needs to be done ?

  • Anonymous
    March 05, 2014
    Thank you for reviewing how do this. I have a question, after configuring the vswitch and then setting up the RASS, the vswitch is showing "unidentified network". I would assume that if the configuration had gone correctly the vswitch should see the network, correct?

  • Anonymous
    May 09, 2014
    Chris, thanks for the article. This is almost exactly what I'm trying to setup for a lab environment to study for the MCSA Windows Server 2012 exams. I wanted my VM servers to have access to the Internet but also be on a different subnet from my other home computers so the DHCP server wouldn't conflict with anything else (is this a valid concern?).

    Just one issue so far. One of your steps doesn't seem to match what I'm seeing:
    "On the Features page select RAS Connection Manager Administration Kit (CMAK) and under Remote Server Administration Tools > Remote Administration Tools select Remote Access Management Tools and click Next."

    I don't see anything that specifically says, "Remote Access Management Tools." One possible reason could be that when I installed the eval for Server 2012 on my server machine, I didn't realize at first that I didn't install the R2 version. I just left it as is since I'll be mostly working on the VM's. Do you think that could cause the differences? I don't remember exactly what I see in there since I'm not at home right now.

  • Anonymous
    June 05, 2014
    Chris, Great Article! just one question...

    I have two hosts in my lab.. i want to configure 10.10.10.x & 10.10.20.x on one host and 10.10.30.x and 10.10.40.x on the other host. How can i get 10.10.10.x to talk to 10.10.40.x and vice versa?


  • Anonymous
    June 12, 2014
    Hi Chris
    Thanks for the article. It is a good one. However, it didn't work for us. we've got a new Dell server with 2 broadcom NICs (only one of which is used) running Hyper-V on Windows Server 2012 R2 in the host and guests. We have followed your recipe very carefully on 2 occasions with a clean rebuild, but have a completely reproducible, severe bug at the end of it: In a guest VM, logging on to Gmail in Internet explorer (from different gmail accounts) blue screens and reboots the host. We've reproduced this following 2 clean rebuilds. We haven't been able to get any useful debug data following the reboot. The system is completely stable until we introduce the internal subnets. The instability does occur in other "network intensive" (if loading gmail can be considered network intensive) operations - although loading gmail is the most usefully reproducible. There is clearly some fragility somewhere in the system. It's a shame because it looked like it would be an excellent solution for us.

  • Anonymous
    June 24, 2014
    The comment has been removed

  • Anonymous
    August 18, 2014
    Hi Chris,

    Using your great tutorial, I've managed to get my LAB almost up and running. My VMs can connect to the internet and each other, however I cannot connect to the guests from my laptop. I have not configured the External virtual switch, but I don't think this will matter?

    VM Network: 10.10.10.0
    LAN Network:192.168.13.0

    Server IP: 192.168.13.252

    I've manually added a route to my laptop for the 10.10.10.0 rage to 192.168.13.252 but that didn't resolve my issue. Any ideas?

    Thanks,

    Ben

  • Anonymous
    August 24, 2015
    In Hyper-V Server 2012 R2 (StandAlone), it's not possible. Because no have the Feature RRAS in this version/edition

  • Anonymous
    May 02, 2017
    The comment has been removed

  • Anonymous
    June 14, 2017
    To Chris and all others, This is a great tutorial!! However, it does not work for those of us who cannot install a physical instance of Server 2012 R2!!If you are using the Hyper V supplied on Windows 8.1 or 10 host, you will not have access to "Routing and Remote. Microsoft has declared it is only offered as a Server role and chanced of that changing a slim.For those of us in that predicament, might I suggest the following link:http://wordsideasandthings.blogspot.de/2013/01/hyper-v-internal-virtual-network-and.htmlI have not yet tried to set it up but the reviews look promising. Good Luck!!

    • Anonymous
      June 14, 2017
      The comment has been removed
  • Anonymous
    August 14, 2017
    Hi my friend! I wish to say that this post is awesome, nice written and include almost all vital infos. I’d like to see more posts like this.

  • Anonymous
    September 18, 2017
    The comment has been removed