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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Virtualization

From novice to tech pro — start learning today.