IP addressing for NIC's on HyperV host

I have a HyperV server with three VM's. Each VM is plugged into separate NIC. The IP addresses for the virtual machines are hard coded 10.140.10.50. .51 and .52

In Network Connections on the HyperV Host I see the three NICs which are named for each VM. Each one is set to obtain an address from DHCP.   I had thought that these would be the same IP as the VM but evidently not.

What is the best practices for IP addresses for these NICS. Should they be the same as the VM, a static IP on the same network or a static IP on a different IP network?
ajdratchAsked:
Who is Participating?
 
Lee W, MVPConnect With a Mentor Technology and Business Process AdvisorCommented:
I have a HyperV server with three VM's. Each VM is plugged into separate NIC. The IP addresses for the virtual machines are hard coded 10.140.10.50. .51 and .52

First off, this is wrong, at least in terminology if not concept.  You have 3 VMs.  Each has a static IP.  Each is plugged in to a virtual switch.  Each virtual switch is connected to a dedicated NIC.

In Network Connections on the HyperV Host I see the three NICs which are named for each VM. Each one is set to obtain an address from DHCP.   I had thought that these would be the same IP as the VM but evidently not.

A screen shot would be good here... but if you're looking at what I think you're looking at, how many of those NICs have ONLY "Hyper-V Extensible Virtual Switch" checked off?  Also, in the Hyper-V Virtual Switch Manager, how many NICs are shared with the Host OS?  Any reason you're not teaming the NICs?

Those IPs would NOT be the same because they don't belong to the VMs.  The VMs have virtual NICs, not physical NICs.  The Physical NICs are "connected" to a virtual switch and the virtual machines are also connected to that virtual switch.

What is the best practices for IP addresses for these NICS. Should they be the same as the VM, a static IP on the same network or a static IP on a different IP network?
Best practice depends on your needs, but NEVER assign the same IP - that will likely create an IP conflict.  I SUSPECT you shared the NICs with the host OS and if you have IPs on them, then they are probably DHCP and used by the host server.  Typically, I assign only one NIC to the host server OR I team the NICs and share it with the VMs.
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Put another way, you seem to think the NICs are bound to a VM - they are not.  They are bound to a virtual switch.  It's another layer.  MULTIPLE machines can be bound to one virtual switch and they ALL MUST HAVE UNIQUE IPs!
0
 
Philip ElderTechnical Architect - HA/Compute/StorageCommented:
I have two very thorough EE articles on all things Hyper-V:

Some Hyper-V Hardware and Software Best Practices
Practical Hyper-V Performance Expectations

The above articles explain a lot about how to set up the Hyper-V Host.

In a virtual setting much of what we've learned in the physical server world goes out the window.

The goal in a virtual setting is to eliminate as many single points of failure that we can. So, in this case, if the server has four ports then team two and set them up with a management IP and then team up the other two and bind them to a virtual switch not shared with the host OS.

Then bind the vNIC in each VM to that vSwitch.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Tom CieslikIT EngineerCommented:
Yes, my colleges are correct.
As soon as you will create virtual switch in Hyper-V , real NIC is loosing his IP since switch can't have IP right ?
I'm not talking about management switch from Cisco or HP where you can assign IP to one port and use it to log in to switch.
Virtual switch deasn't need IP since access to it you can have from Host.
So long story short, you are loosing NIC as soon as you'll configure it as Virtual Switch for your VM, but then you can use one Virtual Switch (physical NIC) to connect many VM with different IP addresses
0
 
MaheshArchitectCommented:
Virtual machines NICs can be tagged to *virtual switch* and not to physical NIC
you must convert physical NIC to virtual switch so that VMs can connect to external world via virtual switch
Since physical host NIC is converted to switch, you must have unique IP configuration on every virtual machine
As a best practice, you should keep one physical NIC reserved only for management traffic where you can connect to Hyper-V host etc
Other NICs can be teamed with link aggregation and further should be pass through virtual switches to avoid interfering host traffic with virtual machine to increase network performance
If this is hyper-v cluster with multiple NICs, NIC should be dedicated to live migration etc
0
 
ajdratchAuthor Commented:
Thanks. I was planning on teaming these sometime but have not gotten to it yet
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.