{"id":1478,"date":"2014-06-18T04:46:06","date_gmt":"2014-06-18T04:46:06","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=1478"},"modified":"2018-09-06T23:41:59","modified_gmt":"2018-09-06T23:41:59","slug":"hyper-v-private-cloud-networking-for-beginners-virtual-networks","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=1478","title":{"rendered":"Hyper-V Private Cloud Networking for Beginners &#8211; Virtual Networks"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Just in case you didn\u2019t get the memo: Microsoft is \u201call in\u201d when it comes to cloud computing. I\u2019ve written a bit about cloud computing before on this site and will do so more in the future. Most analysts think Microsoft has made the right decision to go \u201call in\u201d with the cloud, in part because the nature of the service delivery business is changing from an IT driven one to a consumer driven one. Add to that what we\u2019re seeing in terms of trends toward \u201cubiquitous\u201d computing, and the writing on the wall becomes clear; the PC revolution is winding to an end and it\u2019s time to introduce yourself to the new boss.<\/p>\n<p>While that day is certainly coming, it isn\u2019t all going to happen this week. The journey to the cloud is going to take time. And before we all become consumers of \u201cutility computing\u201d in the public cloud, there are going to be plenty of private clouds floating around out there. In fact, the vision of \u201ccomputing utilities\u201d (of which Microsoft hopes to be a major provider) will likely never be complete because our laws, regulations, corporate policies and personal peccadillos will prevent everyone from going \u201call in\u201d with a public cloud.<\/p>\n<p>Private clouds are actually pretty cool. They provide you with most of the benefits you get from a public cloud with a big difference:\u00a0you control the solution from layer 1 (physical) to layer 8 (political or psychiatric \u2013 the \u201chuman factor\u201d). While there are a number of elements that define a private cloud, one thing that is common to all private cloud deployments is virtualization. That means if you want in on the private cloud, you\u2019re going to need to have some knowledge of virtualization, and if you want to get on top of the Microsoft private cloud, that means you\u2019ll need to know something about Hyper-V.<\/p>\n<p>Tom and I cut our virtualization teeth on VMware products. Thus, in the beginning I was somewhat skeptical of Hyper-V. Sure, I had heard good things about it, and some of my friends said they actually preferred it to VMware. I found that hard to believe, but I\u2019m an open minded kind of gal so I thought I\u2019d give Hyper-V a chance. Well, it turned out that my friends were right, and willingness to try new things paid off! I love Hyper-V now and consider myself a convert. Not that VMware is a slouch \u2013 because it\u2019s not. I just find that I like working with Hyper-V more. I especially like its interface, the Hyper-V Manager.<\/p>\n<p>For the most part I found Hyper-V to be pretty intuitive and didn\u2019t experience much of a learning curve. However, one thing I didn\u2019t grok immediately was how Hyper-V virtual networks worked. I was accustomed to the VMware approach to virtual networking, and so making the transition to the way that Microsoft does it took a little rethinking. It\u2019s not hard to understand, but if you\u2019re coming from a VMware world, you need to know a couple of things to get up and running.<\/p>\n<h2>Varieties of Hyper-V Virtual Networks and NICs<\/h2>\n<p>First the good news: Hyper-V virtual networks are virtual \u201cswitches\u201d, which is very similar to the way VMware handles virtual networking. There are three types of virtual networking you can create with Hyper-V:<\/p>\n<ul>\n<li><b>External Virtual Networks<\/b>. External virtual networks can be connected to the live production network. Virtual machines that are connected to an external virtual network can contact each other and the host operating system if they are all connected to the same physical network through one or more External virtual networks.<\/li>\n<li><b>Internal Virtual Networks<\/b>. An Internal virtual network enables virtual machines to communicate with each other and with the host operating system. You can use these when you want to isolate the virtual machines from a production network, such as when you\u2019re doing testing, or when you want to allow controlled access to the live network, such as when you put a virtual firewall in, which has a leg in the Internal virtual network and a leg on an External virtual network. The VMs can also communicate with the host operating system, which allows you to transfer files between the host operating system and the virtual machines.<\/li>\n<li><b>Private Virtual Networks<\/b>. A Private virtual network is similar to an Internal virtual network, except that the virtual machines cannot communicate with the host operating system and the host operating system cannot communicate with the virtual machines. Use Private virtual networks when you want to make sure that no VM can \u201cbreak out\u201d of the virtual environment and communicate with other machines on the network, including the host operating system. If you want to transfer files to the VMs on a Private virtual network, you\u2019ll need to find an alternative method, such as creating and mounting an .iso file, or use a multi-homed virtual machine that enables the virtual machines on the Private virtual network to contact hosts on an External network (i.e., hosts on a production or \u201clive\u201d network).<\/li>\n<\/ul>\n<p>Note that Hyper-V doesn\u2019t support wireless networks, which sort of sucks. I\u2019m hoping this will be fixed at some point in the future.<\/p>\n<p>There are also two types of virtual adapters that you can create:<\/p>\n<ul>\n<li><b>A \u201cnormal\u201d NIC<\/b>. I have to note here that this isn\u2019t the official term for this type of virtual NIC. I could have called it \u201cthe non-legacy\u201d NIC. This is the higher performing of the two types of virtual NICs that you can create. This NIC is available to operating systems that support Hyper-V integration services, which means only Microsoft operating systems.<\/li>\n<li><b>A \u201clegacy\u201d NIC<\/b>. A legacy NIC is lower performing than the non-legacy NIC, but it will work for any operating system, or even when there is no operating system, such as when you want to perform a PXE boot.<\/li>\n<\/ul>\n<p>And although it\u2019s annoying that you can\u2019t use wireless networking with Hyper-V virtual networks, you can assign your External virtual networks VLAN IDs. In fact, you should only assign VLAN IDs to virtual NICs and not to your physical NICs.<\/p>\n<h2>How External Networks Give the Impression that Your NICs are Horked<\/h2>\n<p>I remember the first time I installed the Hyper-V role on a Windows 2008 computer. After the role was installed, I opened up the Network Connections folder and couldn\u2019t figure out what had happened to my NICs! The NIC I thought I was using to connect to the network had all of its IP addressing information removed, and there was a new NIC there with a new name and I couldn\u2019t figure out how that new NIC got there and what it was doing there.<\/p>\n<p>What happens is that when you install the Hyper-V role, a virtual NIC is created on the host operating system. Then Hyper-V binds all the typical services you\u2019re used to seeing on a physical NIC to the virtual NIC, which is configured as an External network adapter. Then it changes the physical NIC by removing all the services bound to that NIC, except for the Virtual Network Service Protocol.<\/p>\n<p>You can see an example of what happens in Figure 1 below. The NIC labeled <b>Intel P1<\/b> is a physical NIC. After installing the Hyper-V role on this server, a new NIC was created, which had the name <b>Local Area Connection 5<\/b>. Notice in the description of the virtual NIC that it takes the name you give it when you configure the External Network in the Hyper-V console.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.windowsnetworking.com\/img\/upl\/image0021308510728983.jpg\" alt=\"\" align=\"bottom\" border=\"0\" hspace=\"0\" \/><br \/>\n<b>Figure 1<\/b><\/p>\n<p>In Figure 2 below, you can see that the original NIC has had all the services unbound from the NIC except for the <b>Microsoft Virtual Network Switch Protocol<\/b>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.windowsnetworking.com\/img\/upl\/image0041308510728999.jpg\" alt=\"\" width=\"376\" height=\"471\" \/><br \/>\n<b>Figure 2<\/b><\/p>\n<p>In Figure 3, you can see that all the services that were previously bound to the physical NIC are now bound to the new External virtual network adapter.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.windowsnetworking.com\/img\/upl\/image0061308510728999.jpg\" alt=\"\" width=\"376\" height=\"471\" \/><br \/>\n<b>Figure 3<\/b><\/p>\n<p>If you open the <b>Virtual Network Manager<\/b> from the Hyper-V console, you can see that the External virtual network adapter\u2019s description, as seen in the <b>Network Connections<\/b> window, is taken from whatever you entered in the <b>Name<\/b> text box for that virtual network, as seen in Figure 4.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.windowsnetworking.com\/img\/upl\/image0081308510751483.jpg\" alt=\"\" align=\"bottom\" border=\"0\" hspace=\"0\" \/><br \/>\n<b>Figure 4<\/b><\/p>\n<p>It\u2019s a good idea to have at least two NICs in a Hyper-V server. You need one that can be used by the virtual machines to connect to the live network\u00a0 and one that you can use to connect to the host operating system. While you can connect to the host operating system through the External virtual network adapter from anywhere on a live or production network, those communications are going through the virtual switch, along with all the traffic to and from the VMs that might be using that virtual switch.<\/p>\n<h2>Using Virtual Networks with Virtual Machines<\/h2>\n<p>Assigning a virtual machine to a virtual NIC\/network is very easy. Open the Hyper-V manager and then right click the virtual machine you want to connect to a specific network and click <b>Settings<\/b>. You\u2019ll see the <b>Settings for<\/b> dialog box\/page, as seen in Figure 5. On the left side of the dialog box, click the <b>Network Adapter<\/b> entry. On the right side of the page, you\u2019ll see a <b>Network<\/b> drop down list box. Click the down arrow and you\u2019ll see the list of virtual networks you\u2019ve created on the Hyper-V server. Just click on the virtual network to which you want to attach the virtual machine, and it will connect to that network. The behavior of the virtual machine is similar to what you would see on a physical machine that is unplugged from a network and then plugged into a new one.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.windowsnetworking.com\/img\/upl\/image0101308510768780.jpg\" alt=\"\" align=\"bottom\" border=\"0\" hspace=\"0\" \/><br \/>\n<b>Figure 5<\/b><\/p>\n<p>Also note, as seen in Figure 6, that you can choose between <b>Dynamic <\/b>\u00a0and<b>Static<\/b> MAC addresses. The default configuration is to use a <b>Dynamic<\/b> MAC address. The Dynamic addresses are obtained from a pool of MAC addresses that were created when the Hyper-V role was installed. You can find the starting and ending MAC addresses created in the Registry at HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Virtualization. The keys are <b>MinimumMacAddress<\/b> and <b>MaximumMacAddress<\/b>.<\/p>\n<p>Note that if you change the MAC addresses in the pool, it will <i>not<\/i> change the MAC addresses that are currently assigned to the existing virtual machines.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.windowsnetworking.com\/img\/upl\/image0121308510787202.jpg\" alt=\"\" align=\"bottom\" border=\"0\" hspace=\"0\" \/><br \/>\n<b>Figure 6<\/b><\/p>\n<p>Also, if you just want to change the range, you don\u2019t have to go into the Registry. Open the <b>Virtual Network Manager <\/b>from the Hyper-V console and click the <b>MAC Address Range<\/b> entry on the bottom left of the dialog box, as seen in Figure 7. There you can adjust your MAC address pool, which by default contains 256 entries.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.windowsnetworking.com\/img\/upl\/image0141308510803780.jpg\" alt=\"\" align=\"bottom\" border=\"0\" hspace=\"0\" \/><br \/>\n<strong>Figure 7<\/strong><\/p>\n<h2>Summary<\/h2>\n<p>In this article, we began with a short discussion about cloud computing and how the path to the public cloud will probably include a visit to the private cloud first (if you don\u2019t end up staying there). We then went over the types of virtual networks and virtual adapters that are available with Hyper-V, then talked about what happens to your physical NIC configuration when you install the Hyper-V role. We then finished up by demonstrating how you bind a virtual network to a particular virtual machine. In the second part of this series, we\u2019ll look at some of the details of how to configure virtual networks and examine some scenarios where you would use different types of virtual networks, and we\u2019ll discuss how virtual networking should be approach in the private cloud.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Just in case you didn\u2019t get the memo: Microsoft is \u201call in\u201d when it comes to cloud computing. I\u2019ve written a bit about cloud computing before on this site and will do so more in the future. Most analysts think Microsoft has made the right decision to go \u201call in\u201d with the cloud, in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,53],"tags":[],"class_list":["post-1478","post","type-post","status-publish","format-standard","hentry","category-server-virtualization-hyper-v-2","category-virtualization-virtual"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1478","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1478"}],"version-history":[{"count":2,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1478\/revisions"}],"predecessor-version":[{"id":2669,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1478\/revisions\/2669"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}