共用方式為


Understanding Networking with Hyper-V

With Hyper-V the world of networking is quite different than it was with Virtual Server. First to set the scene, with Windows Server 2008 installed on a system with one network adapter you will see this under Network Connections:

shot1

And your system is operating like this:

netpic1

Once you install Hyper-V and create a virtual network your system now operates like this:

netpic2

As you can see the parent partition (host operating system in Virtual Server lingo) is now using a virtual network adapter to connect to the physical network.  If you look at network connections on the parent you will now see the original network adapter and a new virtual network adapter:

shot2 shot3

The original physical network adapter now has nothing bound to it except the Microsoft Virtual Network Switch Protocol.  The virtual network adapter now has all of the standard protocols and services bound to it instead.

Some interesting things to note here:

  • The virtual network adapter that appears under Network Connections will have the same name as the virtual network switch it is associated with.

  • It is possible to create an 'Internal' virtual network - which will expose a virtual network adapter to the parent partition without needing to have a physical network adapter associated with it.

  • Unlike with Virtual Server, Hyper-V only binds the virtual network service to a physical network adapter when a virtual switch is associated with the physical network adapter in question.  The advantage of this is that you avoid the performance overhead involved with having this service enabled on network adapters that are not associated with virtual network switches, the downside is that it means that networking gets disrupted on the network adapter in question when a virtual network switch gets created or deleted.

Cheers,
Ben

Comments

  • Anonymous
    January 09, 2008
    Ben, shots 2 & 3 look the same to me. Did I miss something?

  • Anonymous
    January 09, 2008
    I think image 2 & 3 are the same? is this right?

  • Anonymous
    January 11, 2008
    I have an issue that I'd be delighted to see you cover in the near future or throw some help at.. I'm trying use a virtual machine as a web server. Now the only way I'v emanaged to get my VM's to connect to the internet is follow these directions (http://blogs.sqlxml.org/bryantlikes/archive/2008/01/09/setting-up-hyper-v-virtual-networking.aspx). All well and good, but neither my router or other physical machines on my network know how to get to the 192.168.0.x stack. How can I create a VM that is exposed and accessible to the internet (web server, remote desktop) and other machines in my physical network?

  • Anonymous
    January 12, 2008
    There appears to be an odd bug wrt to networking in the current beta (it will be in Connect when I have the chance)... when creating a new VM you must have something, not sure what yet (TCP/IP?) bound to the real physical NIC for the new installation wizard to offer the card as a NIC for making a new network.  If you unbind everything it's not in the list... but afterwards, if you unbind and make a new network in the management console, you can do it.

  • Anonymous
    January 13, 2008
    That got it, was able to create the external network fine after unbinding. Much appreciated!

  • Anonymous
    January 15, 2008
    I have the same 192 issue; what do you mean by unbind? In the VM's network setup or in the Hyper-V setup of the VM? Or in the host's Network setup? Or somewhere else?

  • Anonymous
    January 20, 2008
    Daniel - the unbinding is done on the host computer's physical network connection. On the properties dialog for the network connection there's a section in the middle 'This connection uses the following items' (Client for Microsoft Networks, TCP/IP, etc). In there you want to uncheck all the items and click OK. If you now go back into the Hyper-V network settings on the host computer, you can create an external network bound to the network adapter WITHOUT getting the 'this adapater is already bound' error. Once it creates the new network adapter, change the settings of your virtual machine to use the new external adapter and go back into the propterties of your host computer and re-tick all the boxes as they were before. You should then be good to go.

  • Anonymous
    February 06, 2008
    Ugh. I'm sure there are good reason for this, but people experienced with VS2005 are going to be very very very very confused by this and probably assume it is an error!

  • Anonymous
    May 27, 2010
    mr plase help me img8.img98.com/.../i68333_Untitled.jpg im buy 18 IP and ADD to LAN SERVER im make VPS windows or lliux im send INFO server for you plase see give me email address ? i have not MAC  for ech ip so IPs add to switch {Also, make sure that there is no MAC address limiting configured on the physical switch that the Hyper-V host External Virtual Network is patched to.} it job ok by datacenter i see winvideo-ITPro-NAThyperV.avi  and do job step to step for crate NAT but also ping 4.2.2.4 time out to VDS i m wait fo answer u thanks

  • Anonymous
    August 19, 2010
    I have been looking for a good post that explains Hyper-V and how to use NAT with it. I have 5 virtual machines in Hyper-V that I want to NAT with private addresses like (192.168.1.X) So far I have been able to get NAT to give out addresses but the internet does not work. I am not sure if you ever have time to touch on this subject.

  • Anonymous
    September 01, 2010
    Hi Ben, Is there any new feature expected in new release of Hyper-V like Private vLAN concept in virtual Switch. If this feature will introduced in Virtual switch then Tenate isolation is possible. Thanks Regards BG

  • Anonymous
    October 12, 2010
    Hello Ben, Thanx for this helpful post. I guess i am in d same situation like others. built a Hyper V server, on the LAN with win 2000DC , and successfully managing the server using a Win7 desktop hyper V manager.  but very unfortunately i try to create an new network type on hyper V (type external) it simply disconnects me from everything and more surprisingly on the actual server no more shows that NIC. any help will be really appreciated.

  • Anonymous
    October 28, 2010
    I have server set up with the NIC being external, two VMs with legacy NICs. Everything is like your diagrams. I'm frustrated because no matter what I do the VMs can see each other and the host machine but not anything outside the host machine. The host machine has a second NIC and I'm able to access the network with it. I manually entered IP, Mask and GW on each VM's virtual NIC. I was wondering if I should use the normal GW on these or should I use the IP of the virtual switch? Any idea on what I could be missing that is preventing me from getting network connectivity?

  • Anonymous
    February 16, 2011
    Here is a link with explanation of 'Configuring virtual networks' technet.microsoft.com/.../cc732470(WS.10).aspx

  • Anonymous
    March 23, 2011
    The comment has been removed

  • Anonymous
    April 27, 2011
    The comment has been removed

  • Anonymous
    May 26, 2011
    we are using dell blade and server 2008 r2 with Hyperv roles but always our server is crashed all 16 blade have same issue is this h/w issue or other

  • Anonymous
    July 08, 2011
    This makes perfect sense... Do you know if there is any way to enable icmp traffic within WVPC running in NAT mode? I understand why from a security perspective it would be disabled, but my Electronic Software Distribution (ESD) system requires a ping every 3 seconds to manage bandwidth throttling. We have over 100,000 devices and as such when it's patch time, without throttling we crush the network. This is standing in the way of a Med-V deployment. Thanks

  • Anonymous
    August 17, 2011
    Does it matter what items are configured on the Hyper-V host virtual network adapter (VNA)? I have a Hyper-V server where the VNAs have none of the items check-marked. If the NIC on the virtual server is configured correctly with tcp/ip, etc., do you also need to configure the same items and settings on the Hyper-V host VNA for that virtual server?

  • Anonymous
    August 20, 2011
    tech98 - You do not need to have the different NICs configured in the same manner. Cheers, Ben

  • Anonymous
    September 11, 2011
    Be careful with location and language options!!! Even if you chose a language different to location during the setup, the Hyper-V will install location defaul language and you will not be change it after!!

  • Anonymous
    January 17, 2012
    wow it's a right tecknowlogy to do somtings without and cost

  • Anonymous
    August 10, 2013
    The comment has been removed

  • Anonymous
    January 05, 2015
    Thanks for clearing this up Ben. In addition to this post I found having a good subnet calculator like www.tunnelsup.com/subnet-calculator is helpful for con figuring the networking on Hyper-V.