WIN2012R2 Hyper-V Beginner tutorial 04-Virtual Switch with network configuration

Source: Internet
Author: User

Virtual switches in Hyper-V if you have studied VMware virtualization, the virtual switches in them are fundamentally different, so let's briefly talk about the three virtual switches for Hyper-V network virtualization.

For child shoes that are just touching hyper-V, a virtual switch may make you feel a bit more headache, first of all, Hyper-V will not bring any created virtual switches and virtual network cards (in the Hyper-V Deployment Wizard you will be prompted to create an external virtual switch, and VMware Workstation not the same it will create a new two virtual network card, which is related to the Microsoft itself, my site I make the decision, hehe).

When we choose to create a new virtual switch, Hyper-V Virtual Switch Manager lets us choose one of the following three virtual switches:

L External

L Internal

L Private

It is important to note that here we create a virtual switch, not a virtual network card, so the virtual switch is divided into these three types.

External Virtual Network : You can use this type of virtual network when you want to allow virtual machines to communicate with external servers and the management operating system (sometimes referred to as the parent partition). This type of virtual network also allows virtual machines located on the same physical server to communicate with each other.

Internal Virtual network : You can use this type of virtual network when you want to allow the virtual machines on the same physical server to communicate with the virtual machine and the management operating system. An internal virtual network is a virtual network that is not bound to a physical network adapter. It is typically used to build a test environment that is required to connect to a virtual machine from the management operating system.

Dedicated Virtual network : You can use this type of virtual network when you want to allow communication between virtual machines on the same physical server only. A dedicated virtual network is a virtual network that does not have a virtual network adapter installed in the management operating system. A dedicated virtual network is typically used when you want to isolate a virtual machine from the management operating system and from network traffic in the external network.

Although Hyper-V allows you to configure complex virtual network environments, the basic concept of a virtual network is simple. For a simple virtual network configuration, it is recommended that you configure at least two network adapters on the server that is running Hyper-V: One network adapter is intended for use by a physical computer for remote management, and one or more network adapters are dedicated to virtual machines. If you are running Internet SCSI (ISCSI) initiators for virtual hard disk storage, we recommend that you use the other network adapters in the management operating system. The management operating system is a partition that invokes the Windows hypervisor and requests that a new partition be created. Only one management operating system can exist.

In Hyper-V, when a virtual machine is created and connected to a virtual network, it is connected using a virtual network adapter. There are two types of network adapters available for Hyper-V: Network adapters and legacy network adapters. For the network adapter to work properly, you must install the integration service, which is part of the Hyper-V installation. If the integration service cannot be installed because of the operating system version, you will not be able to use the network adapter. You need to add a legacy network adapter that simulates the Intel 21140-based PCI Fast Ethernet adapter and works without installing a virtual machine driver. The legacy network adapter also supports network-based installations because it has the ability to boot to pre-boot execution Environment (PXE). Legacy network adapters are also required if the virtual machine needs to be booted from the network. After booting to PXE, you need to disable the network adapter.

Hyper-V supports virtual local area networks (VLANs) because VLAN configurations are software-based, so computers can easily move and still maintain their network configuration. For each virtual network adapter that is connected to the virtual machine, you can configure a VLAN ID for the virtual machine. You need to have the following devices to configure VLANs:

• A physical network adapter that supports VLANs.

• A physical network adapter that supports network packets with an applied VLAN ID.

On the management operating system, you need to configure the virtual network to allow network traffic on the physical port. This is done to enable the VLAN ID to be used internally with the virtual machine. Next, you need to configure the virtual machine to specify the virtual LAN that the virtual machine will use for all network traffic.

You can use two modes to configure VLANs: access mode and trunk mode . In access mode, the external port of the virtual network is limited to a VLAN ID in the UI. There can be multiple VLANs that use WMI. Use Access mode when the physical network adapter is connected to a port on a physical network switch (also in access mode). To enable a virtual machine to have external access to a virtual network in Access mode, you must configure the virtual machine to use the same VLAN ID that is configured in Access mode on the virtual network. Trunk mode allows multiple VLAN IDs to share the connection between the physical network adapter and the physical network. To enable virtual machines to have external access to virtual networks in multiple VLANs, you need to configure the ports on the physical network to trunk mode. You also need to know the specific VLAN used and all VLAN IDs used by virtual machines that are supported by the virtual network.

Below we look at the manager of the virtual switch in Hyper-V R2.

1. Click on "Hyper-V Manager" to select "Virtual Switch manager ..."

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" WpsAB7D.tmp "border= "0" alt= "wpsab7d.tmp" src= "http://s3.51cto.com/wyfs02/M00/9C/CE/wKioL1l2oeGzk6VWAABPRcSB3TE446.jpg" width= "574" height= "175"/>

2. On the "New virtual network switch", click "Create Virtual Switch"

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" WpsAB8E.tmp "border= "0" alt= "wpsab8e.tmp" src= "http://s3.51cto.com/wyfs02/M01/9C/CE/wKioL1l2oeOSU0Z0AAC-0FOZOts006.jpg" width= "574" height= "482"/>

Note: When you create an external virtual network, Hyper-V binds the Virtual Network Service protocol to the physical network adapter. When you create or delete an external virtual network, the external network connection is temporarily interrupted.

3, here we can choose to create an internal network, a private network and enable the corresponding VLAN and set Vlanid, of course, if you want to remove the virtual network switch, you can select the corresponding virtual network switch, click "Remove" here

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" WpsAB9E.tmp "border= "0" alt= "wpsab9e.tmp" src= "http://s3.51cto.com/wyfs02/M02/9C/CE/wKioL1l2oeTBqEl1AADgFN4KsXE551.jpg" width= "574" height= "422"/>

4, here we can set the global network MAC address range

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" WpsABAF.tmp "border= "0" alt= "wpsabaf.tmp" src= "http://s3.51cto.com/wyfs02/M02/9C/CE/wKioL1l2oeWCzzTCAAC23EDJbHM887.jpg" width= "574" height= "425"/>

5, through the previous settings we have set up the corresponding virtual switch, this time we need to connect the corresponding computer to the virtual switch, how to deal with it? Here we select the corresponding virtual switch, then click "Set ..."

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" WpsABB0.tmp "border= "0" alt= "wpsabb0.tmp" src= "http://s3.51cto.com/wyfs02/M01/9C/CF/wKiom1l2oebysnG7AACFhbjnXN4954.jpg" width= "574" height= "359"/>

6, select the virtual network that you just created at the network adapter, if you have set up the corresponding VLAN, here you need to enable the corresponding VLAN, and enter the corresponding Vlanid, of course, there is a bandwidth management function, that is, to manage the bandwidth traffic of this virtual machine to meet the existing requirements.

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wpsabc0.tmp "border=" 0 "alt=" wpsABC0.tmp " Src= "Http://s3.51cto.com/wyfs02/M02/9C/CF/wKiom1l2oeiQBdxkAAETDNDrqZE375.jpg" width= "574" height= "477"/>

This article from "System operation and Maintenance" Systemdevops "" blog, declined reprint!

WIN2012R2 Hyper-V Beginner tutorial 04-Virtual Switch with network configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.