Sie sind auf Seite 1von 10

Setting up Routing on Windows Server 2012

for Your Labs


ceriumnetworks.com
P a g e | 1

Setting up Routing on Windows Server 2012
for Your Labs
Jason Guel, Systems Engineer
Cerium Networks
Keeping up with new technologies is the hallmark of most of us that work in the field of Information Technology.
Often to keep up with these new technologies we set up lab environments on a server using virtualization. Of
course usually we have to keep these lab environments separate from our production environments but you still
want those virtual machines to be able to access the internet to do things such as download and install patches
or prerequisites.
This is a tutorial on how you can use Routing in Windows Server 2012 on a Windows Server 2012 host using
Hyper-V.
1 CONFIGURE YOUR VIRTUAL SWITCHES:
In your Hyper-v manager under actions click on Virtual Switch Manager. As you can see here we already have a
virtual switch set up that is set up as an External Network and uses the hardware NIC to allow outside access.

Setting up Routing on Windows Server 2012
for Your Labs
ceriumnetworks.com
P a g e | 2


If you dont have a virtual switch set up like above click on New virtual network switch and select External
and configure as above.
Click on New virtual network switch again and this time select Private and click the Create Virtual Switch
button configure as below. You can select any name you want or leave it as the default but I recommend you
put the word private in the description somewhere so you know which switch is which when you need to
configure you VMs. When youre done click OK to save your new virtual switch.

2 CREATE AND CONFIGURE A WINDOWS SERVER 2012 VIRTUAL MACHINE.
Create your Windows Server 2012 virtual machine and when you get to the Configure Networking screen
select your External virtual switch. Complete your configuration giving it however much RAM and drive space
you want; however it is unlikely you will need more than 1GB RAM and about 40GB of hard drive space and that
is what I used for mine.

Setting up Routing on Windows Server 2012
for Your Labs
ceriumnetworks.com
P a g e | 3


Once your configuration is complete dont start your new virtual machine just yet! Click on your virtual machine
and click on Settings in the under Actions in the lower half section.

Click on Add Hardware and in the box select Network Adapter and click Add.

Setting up Routing on Windows Server 2012
for Your Labs
ceriumnetworks.com
P a g e | 4


On the configuration page for the Network Adapter you just added under Virtual switch click the drop down box
and select your Private Switch. Then click OK. Once that is completed start your virtual machine and install
Windows Server 2012.

3 CONFIGURE NICS, NAME, AND DOMAIN
Go into the Network and Sharing Center from the control panel and if your external network is set up for DHCP
you should see that one of your NICs is connected to the Internet this will be the virtual NIC that is connected
to your External virtual switch of course and so the other will be the one connected to your private switch. If you
dont have DHCP set up then you will have to manually configure the external NIC and ensure you can get out to
the internet on that server.

Setting up Routing on Windows Server 2012
for Your Labs
ceriumnetworks.com
P a g e | 5

I would recommend you click on Change adapter settings and rename them so they are easier to identify.

Next configure the Internal nic with the IP address scheme you plan to use for your internal users. In this
scenario Im using the 192.168.x.x private address space. Specifically 192.168.144.x. However do not configure a
default gateway or a DNS server.

Click OK and close all the open control panel windows.
At this point you will have to create, if you dont already have it, one or more DCs for your lab domain. These
DCs should all have NICs that are on the Hyper-v Private network you created and at least one should have a

Setting up Routing on Windows Server 2012
for Your Labs
ceriumnetworks.com
P a g e | 6

manually configured IP address. The IP address of your AD DNS server should be set to what you input for DNS
Server above.
In my case I just have one DC for my lab domain. In the TCP/IP properties of your DC set the gateway address to
the internal IP of your new Windows Server 2012 virtual machine.


Optional: The following is optional but recommended once the above is completed.
Open Server Manager and click on Local Server and under the properties click on Computer Name and change
the name of your server and add it to your internal domain as a member server. In order to do this you may have
to create a static route from the command line as the Private NIC has no GW address.
e.g. route add 192.168.144.0 mask 255.255.255.0 192.168.144.2


Setting up Routing on Windows Server 2012
for Your Labs
ceriumnetworks.com
P a g e | 7

4 SET UP THE ROUTING
Open Server Manager and click on Add roles and features and click next, next, make sure the local server is
selected under Server Selection and click next again.
Under Server Roles scroll down and select Remote Access click the Add Features button when you get the
pop up. Click Next until you get to the Confirmation page then check the box at the top that says Restart the
destination server automatically if required then click the Install button at the bottom.

After the server reboots repeat the above process until you get to the place shown in the screen shot above. You
will now have a little arrow next to Remote Access. Click the arrow to expand and you will now see an
additional option you will need to install which is Routing. Select it to install the routing option and click Next
until you get to the confirmation page and then click Install button.
Once the installation is complete in Server Manager click on Tools in the upper right then click on Remote
Access Management.

Setting up Routing on Windows Server 2012
for Your Labs
ceriumnetworks.com
P a g e | 8


In the console click on Open RRAS Management under VPN on the right. Then right click on the name of your
server in the list and click on Configure and Enable Routing and Remote Access

Click Next and under Configuration select Network address translation (NAT) and click Next.
On the next page leave Use this public interface to connect to the internet: selected and in the list select the
NIC configured on the External Hyper-V switch and click Next then click Finish.

Setting up Routing on Windows Server 2012
for Your Labs
ceriumnetworks.com
P a g e | 9


It will go through some configuration and then you should see a lot of additional items appear for optional
configuration as well as a green arrow icon on your server.

Once this is complete go back to your other server or workstation configured on the private virtual switch and
you should now have internet access on that VM and any others that you configure similarly.

Setting up Routing on Windows Server 2012
for Your Labs
ceriumnetworks.com
P a g e | 10

Das könnte Ihnen auch gefallen