person typing code on a laptop with a mug in the back

August 29, 2017 - By Parwinder Singh

To use a server as a router or to create a subnet, Routing and Remote Access [RRAS] feature of Windows server are very useful and helpful.

Purpose:
Create new subnet and make that subnet device accessed [RDP] by devices in the current network.

Scenario:
1. Hyperv with Static IP adapter in current network for Example 192.168.1.72
2. Create new subnet [10.10.10.0/24] on Hyperv with the help of RRAS.
3. Create new Hyperv Virtual Switch with an internal network option.
4. Assign that Virtual Switch adapter to Guest VM on Hyperv.
5. Make sure the VM can connect to the internet.
6. Provide static IP for the Guest VM as 10.10.10.10.
7. Make sure the current network device can remote into Guest VM.

Requirements:
• Hyperv needs at least two NIC adapters.

Steps:
To install and configure this feature, please follow below steps:

Server Manager > Add Roles & Features > Select Remote Access

Click Next > Next > Next > Select Routing > Go with all default selections and Direct Access will be automatically selected, Click Next > Install:
You don’t need to restart the server to make to fully functional.

Create HYPERV Virtual Switch:

Before we configure RRAS, set up HYPERV Virtual Switch and set up that Virtual Switch for new subnet [10.10.10.0/24]:

Hyperv > Virtual Switch Manager > New Virtual Network Switch > Internal > Create Virtual Switch:

Name the Virtual Switch > Select Internal Network > Apply > OK
Go to Network & Sharing Center > Change Adapter Settings > Select the adapter created in Hyperv:
Configure RRAS:

Go to Start Menu and search for Routing and Remote Access and open it:

Right click on the server name and click Configure and Enable Routing and Remote Access.
Select NAT option:
Click Next > Choose first NIC which will provide the Internet Access. In this Scenario, a NIC with 192.168.1.72 address.

Click Next > Choose second NIC which will be new subnet NIC. In this scenario, a NIC with 10.10.10.1 [Virtual Hyperv Adapter].

Click Next > Go with Enable Basic Name and Address services option > Click Next > Finish. Once the wizard finishes, it will set up the server to use as a router. But you need to manually configure few things.

RRAS > Server > IPv4 > Right Click NAT > Properties > Select Address Assignment Tab:

Assign NAT the subnet address you are creating and click OK.

In NAT section, right click the Public IP adapter and select properties. In this scenario, an adapter with 192.168.1.72 address. Click Services and Ports> Check and select Remote Desktop > Edit > Select On this Interface > Type 10.10.10.10 [IP of the Guest Virtual Server]. Click Ok > Click Ok.

That is it!!! We are done with RRAS configuration.

Things to remember:

• Make sure these ports [3389 – 3390] are open in Windows Firewall.
• In VM remote settings, allow remote connection.

If you need to provide static IP address to the Guest Virtual Machine, then the configuration will be like this in this scenario:

You should be able to access this subnet VM from any current network device now. In this scenario, you should be able to RDP into the 10.10.10.10 server from any device with IP address of 192.168.1.X.

Thank You for Reading!

Share this story: