Solved

How to setup LAN Adapters (DNS and DHCP) for Win 2008 R2 Server with Hyper V Virtual Servers

Posted on 2014-03-29
7
1,552 Views
Last Modified: 2014-11-12
My server has 2 gigabit adapters.  And I am running two virtual servers (one for SBS domain controller and the other is our in-house web server).  I had to re-install the OS for the hyper V server, so lost a few settings.

I went to install Hyper V and it said something about Virtual Networks.  Anyway I ticked both LAN adapters because I didn't need remote management of this server.  My theory was that it was more important for me to make either adapter available to the virtual servers (considering that my staff might accidentally plug the LAN into either adapter).

So now on the Hyper V Server I have 4 LAN Adapters.
* Local Area Connection (unplugged)
* Local Area Connection 2 (Enabled)
* Local Area Connection 4 (Unidentified network) Local Area Connection Virtual Network
* Local Area Connection 5 (Unidentified network) Local Area Connection 2 Virtual Network
0
Comment
Question by:enigmasolutions
  • 4
  • 3
7 Comments
 
LVL 31

Expert Comment

by:Frosty555
ID: 39964477
The extra networks are normal.

Think of it this way - inside of Hyper-V is a "virtual switch". That's exactly what it sounds like, it is a network switch implemented in software, with one port for every VM that is connected to it.

The virtual switch now needs to connect to your physical network, In Hyper-V manager you can assign one of your physical network interfaces to the switch, bridging that interface with the switch.

However, when you do this, the physical network interface is dedicated to that virtual switch in Hyper-V. It is no longer usable by the host. If you  try to go into the properties for the interface in View Network Connections on your host you'll discover you can't assign an IP address to it anymore.

If you want to use the network interface for both the host AND the virtual switch, you tick the "Allow management operating system to share this network adapter".

Unless you want load balancing / link aggregation / failover, or you want your VMs to have access to multiple networks (all of which sounds more complicated than you need in your case), you do not need both of your network interfaces to be set up as a virtual switches in Hyper-V, you only need one.

Since you have two gigabit network interfaces the best way to set this up IMHO is to have one network interface dedicated to the Hyper-V Virtual Switch, and the other one is not used in Hyper-V at all and is dedicated to your host OS.

As far as your staff are concerned, BOTH of your physical network ports on the server must be connected to your physical network switch. One of the ports is for the host operating system, the other one is for the VMs. They can both go to the same physical network if you want, or you could connect your host to a separate "management network" if it is desirable for you to keep your host separate from your VMs. That's up to you.
0
 
LVL 1

Author Comment

by:enigmasolutions
ID: 39964513
Well I think this is all OK.  And actually I got all my servers working.  But would like to check a few settings... (to see if I got them right)

My SBS Server is my DNS Server.  DHCP is disabled on my router at 192.168.0.1.

On my Hyper V Server (ie the main server that runs the virtual servers):
Physical LAN Adapter 1 (unplugged)
   IP V4 = Not Ticked (not sure how this happened?)
   IP Address = properties greyed out
Physical LAN Adapter 2
   IP V4 = Not Ticked (not sure how this happened?)
   IP Address = properties greyed out (ie cant set properties)
Virtual LAN Adapter 1 (unplugged)
   IPv4 Address = 192.168.0.8
   Default Gateway = 192.168.0.1
   Preferred DNS Server = 192.168.0.1  (not sure if this is right)
Virtual LAN Adapter 2
   Obtain an IP Address Automatically (strange - I thought I hard coded this???)

On my SBS Server
MS Virtual Machine Bus Network Adapter #2
   IPv4 Address = 192.168.0.2
   Default Gateway = 192.168.0.1
   Preferred DNS Server = 192.168.0.1  (not sure if this is right)

On my Web Server
MS Virtual Machine Bus Network Adapter #3
   IPv4 Address = 192.168.0.4
   Default Gateway = 192.168.0.1
   Preferred DNS Server = 192.168.0.1  (not sure if this is right)
0
 
LVL 1

Author Comment

by:enigmasolutions
ID: 39964525
Frosty555, Thank you for your great answers.
But now I have a few questions with respect to your advice...

1) So I must have assigned both physical LAN adapters to the Virtual Switch

2) This is why I can't assign IPs to the Physical adapters

3) I haven't ticked "Allow other network users to connect through the computers internet connection" on the sharing tab of LAN adapter properties.  this option not ticked on any of my LAN adapters.  Should I think it?  Which adapter?

4) I do not need load balancing, so perhaps I only need one LAN adapter for the virtual switch

5) So your suggestion to use one LAN just for the Hyper V Host and the other for the Virtual Servers means that...
    a) I must connect both LAN cables to my hardware switch
    b) This will allow me to see / RDC to the Host Hyper V server from my workstations.
        Which is perhaps the best reason to do this.
    c) currently I only have the physical LAN #2 Adapter connected - this is OK
       (just not as good - because of b above)

6) You say both LAN Adapter MUST be plugged in... somehow I managed to make it work in the past with only one adapter plugged in.  Not sure how.  But I will take your advice (without any hesitation).  But I guess I am curious to know the reasons why I must plug both adapters in?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 31

Expert Comment

by:Frosty555
ID: 39964531
To answer some of your questions

IP V4 = Not Ticked (not sure how this happened?
... So I must have assigned both physical LAN adapters to the Virtual Switch
Correct. The IPV4 networkign is unavailable and not ticked because the adapter has been dedicated to the Hyper-V virtual switch, meaning IP services are NOT available to the Host. Because you added both network adapters into Hyper-V, and because you didn't tick the "Allow management operating system to share this network adapter" option, both adapters are now dedicated to Hyper-V and your host has no network connectivity.

IMHO it doesn't make sense for you to assign both network interfaces to Hyper-V, because your VMs don't need it

You say both LAN Adapter MUST be plugged in... somehow I managed to make it work in the past with only one adapter plugged in... But I guess I am curious to know the reasons why I must plug both adapters in?
If you set it up the way I recommended, you would need both adapter configured, but you aren't obligated to set it up that way. If you want a single network adapter to do all the work and provide networking services o  the host AND also to the Hyper-V virtual switch, you can absolutely do that. You would just tick the "Allow management operating system to share this network adapter" option in Hyper-V Manager->Virtual Switch Manager.

If you do that, you would only need ONE network adapter. The other adapter would sit there unused. I believe there is a very small performance hit for doing it this way, but it's minor.

IMHO though, the way I see it is that you've got two network cards, why not use them both?

Allow other network users to connect through the computers internet connection
That is Internet Connection Sharing, it's an archaic old method of sharing the internet between multiple computers back when routers didn't exist. You don't need or want this option enabled on any of your adapters.
0
 
LVL 1

Author Comment

by:enigmasolutions
ID: 39964542
Frosty555 great answers.  Very Clear.  Thank you.  

"Allow management operating system to share this network adapter" was already ticked for second physical LAN adapter.
Q1) Is it the case that this should NOT be ticked on when connecting both LAN adapters?

Q2) I may as well connect both LAN adapters.  So I guess I should "Remove" LAN adapter #1 from the Hyper V Virtual Network Manager?

Q3) Also I am a bit concerned about my LAN Adapter Settings as per my 2nd post above.  Of course these will need to change with both adapters plugged in.  Perhaps you might guide me on the following:

On my Hyper V Server (ie the main server that runs the virtual servers):
A) Physical LAN Adapter 1      (to be used for the Host Server)
   IP V4 enabled = ?
   IP Address = ?
   Default Gateway = ?
   Preferred DNS Server = ?
B) Physical LAN Adapter 2      (to be used for the Virtual Machines)
   IP V4 enabled = ?
   IP Address = ?
   Default Gateway = ?
   Preferred DNS Server = ?
C) LAN Connection 4 - Virtual LAN Adapter     (this may disappear when I remove it from Hyper V)
   IP V4 enabled = ?
   IP Address = ?
   Default Gateway = ?
   Preferred DNS Server = ?
D) LAN Connection 5 - Virtual LAN Adapter #2    (ie use of physical LAN #2)    
   IP V4 enabled = ?
   IP Address = ?
   Default Gateway = ?
   Preferred DNS Server = ?

On my SBS Server
E) MS Virtual Machine Bus Network Adapter #2
   IP V4 enabled = ?
   IP Address = ?
   Default Gateway = ?
   Preferred DNS Server = ?

On my Web Server
F) MS Virtual Machine Bus Network Adapter #3
   IP V4 enabled = ?
   IP Address = ?
   Default Gateway = ?
   Preferred DNS Server = ?

Thank you.
0
 
LVL 31

Accepted Solution

by:
Frosty555 earned 500 total points
ID: 39965003
Hi enigmasolutions,

Any network interface you have added to Hyper-V and you left the "Allow management operating system to share this network adapter" unticked, you can leave the network adapter at it's default settings, there's nothing to configure and there is no IP address, similar to how there's nothing to configure on an physical unmanaged network switch.

On network interfaces that you have not added to Hyper-V, they are normal network interfaces you can configure directly in "Control Panel->View Network Connections", and assign an IP address to it, the adapter works like normal.

For interfaces that are part of Hyper-V but the "Allow management operating system to share this network adapter" option is ticked, you will have the ability to go into the Virtual LAN adapter that was created in "Control Panel->View Network Connections" and configure an IP address for the host there. In your second comment it looks like you actually did do this (the IP of your host was 192.168.0.8 and you set that IP on the Virtual LAN Adapter 1).

Inside your VMs, you configure their IP settings inside the VM the same as you would a physical computer. The VM's IP configuration is done on the VM, not on the host.

At this point you should now have the ability to assign IP address to all of your machines, for a SBS environment you'd usually do it like this:

Router
   IP = 192.168.0.1   (in this example)

Hyper-V Host
   IP = 192.168.0.8
   Default Gatway = 192.168.0.1
   Primary DNS = 8.8.8.8 / 8.8.4.4 (or some other public dns or another physical DNS server on your network like a router, if it supports that feature)

You don't want the Hyper-V host to rely on any of the services provided by it's VMs to function properly. Your Hyper-V host should not be joined to the SBS server's domain. It doesn't need to use your SBS server for DNS.

SBS Server
   IP = 192.168.0.2  (in this example)
   Default Gateway = 192.168.0.1   (e.g. IP address of your router)
   DNS = 192.168.0.2  (set it to be the same IP as the SBS server, do not set it to 127.0.0.1)

Web Server
   IP = 192.168.0.4 (in this example)
   Default Gateway = 192.168.0.1 (e.g. IP address of your router)
   DNS = 192.168.0.2   (IP address of the SBS server)

The web server is a member server that is part of your domain, so it's DNS server should be set to your SBS server.
0
 
LVL 1

Author Closing Comment

by:enigmasolutions
ID: 39980804
Frosty555,

Superb answers!!!  

Thank you.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now