Creating a (VERY) Basic Router for a Hyper-V Private Network – Part One: Creating Virtual Switches

 

So, I need to set up a test network because I have problems with GPO settings not being picked up by Windows 10 clients.  I’m pretty sure it’s a problem with Windows 10, but I need to get my ducks in a row so I can talk Microsoft into refunding the $500 I’ll spend on the support call.

My home network looks like this-ish:

Home Network.png

 

It ties into some other networks, so I don’t want to add more stuff into it.  Instead, I want to create a virtual lab environment.  It needs access to the internet, but I want the traffic isolated(ish).

I have two NICs on my desktop computer, so one of those can be dedicated to Hyper-V.  Ideally, I’d like to accomplish something like this:

Goal Virtual Network.png

 

Creating the virtual environment isn’t particularly difficult.  The challenge is in routing the traffic from the virtual environment to the internet via the home network.  I figured there was some sort of virtual router I could download, but they’re all geared towards creating Wi-Fi hot spots.  So, I created my own.

Creating the Virtual Switches

I’ll need two virtual switches:  One for the lab environment network and one that connects to the home network.  For access to the home network, I’ll need to create a virtual switch and connect it to an “external” network.

In Hyper-V Manager, open the Virtual Switch Manager:

Open VSM.png

In the left pane, under “Virtual Switches”, select “New virtual network switch”.  In the right pane, select “External” and then click the “Create Virtual Switch”:

VSM Create.png

Give the Virtual Switch a name and then select the network card to use for the virtual switch:

VSM Select NIC.png

Clear the check box for the “Allow management operating system to share the network adapter” setting, and then click “OK”:

VSM OS Access.png

You’ll get a warning regarding network connectivity to the host OS which you can safely ignore, so just click “Yes”:

Warning.png

Go through the same process again, this time creating a Private virtual switch:

VSM Private.png

Give it an identifying name:

VSM Private 2.png

The networks are set up now, so it’s time to assign the virtual machines to the private switch and create the router.

That’s in Part Two.

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s