Hyper-v scalable vswitch

Source: Internet
Author: User

Hyper-v scalable vswitch

Windows Server 2012 abstracts the topology of the physical network through network virtualization, enabling better isolation and multi-tenancy.
In network virtualization, one of the most important technologies is the Hyper-V scalable switch.

(The example in this article is shown in Hyper-V in Windows 8, and the actual 2012 is the same)
For those who are using Hyper-V, the network is the most troublesome. Hyper-V is not as easy as VMware Workstation or Microsoft's own VPC.
Introduces the concept of a scalable switch in Hyper-V.

People who first came to think that it was not just the last network, but it was still so troublesome. It was so easy and fast to click the mouse twice like the VM.
However, Hyper-V is mostly used in the production environment, which is different from that of VM (Workstation is used by default in this section ).

Differences between the three vswitches
External vswitch
In this mode, the physical network card will not be virtualized into a virtual switch, but in the virtual network card to "inherit" your local network card.
Some people will find that after creating an external switch, all the configuration information of their physical Nic is gone, only one vswitch that can be expanded by Hyper-V is selected, as shown in figure

Then I am worried that the local Nic is not enabled with the TCP/IP protocol. How can I access the Internet?
In fact, this is to virtualize your physical Nic into a vswitch. This is what Hyper-V vswitch can be expanded in the check box, the switch itself does not require ip addresses or others unless it is used for management. It is only responsible for packet forwarding. Should anyone who has a certain network knowledge?
All other information is not checked.
At the same time, there is another virtual NIC (generally named "vEthernet ({Your Nic name} vswitch) it inherits all the settings of your physical NIC (such as static IP and dns)
Then, your physical machine uses the virtual Nic to access the Internet. The topology is as follows:

(This image is referenced in Microsoft mva)
This method of surfing the internet will make the virtual machine and the physical machine have the same level of presence on the network, just like the virtual machine is a physical machine and the physical machine is connected to the same switch.
In this way, you can directly access the virtual machine from the external network.
This access method is undoubtedly the best option if the virtual machine needs to provide external services and does not use gateway or other forms.

Internal vswitch
If there are still people who are in love with the vm method, the vm actually uses this method to allow the vm to access the Internet.
An internal virtual switch virtualizes an Eni on the local machine and communicates with other virtual machines through this virtual NIC (this is similar to a virtual switch compared to the above external virtual switch, but the physical Nic does not connect to it, but continues to access the Internet as an independent NIC)
The vm accesses the Internet through this virtual network card, and then shares the network of the physical network card (that is, to the local network card, right-click the attribute-share that)
Then, the physical Nic allocates an ip address to the VM as a DHCP server to allow the VM to access the Internet.
This method can also be used in Hyper-V.
After an internal vswitch is created, all the virtual machines are connected to the network. Then, the physical network adapter uses the shared Internet access method to allow the virtual network adapter to access the Internet.
However, this method is used to access the Internet through a physical machine, also known as NAT.
In this case, external access to the virtual machine is not allowed, because the network is converted at the physical machine.

Dedicated vswitch
This is basically the same as the internal vswitch, but it does not Virtualize a network card in the network adapter of the physical machine, it is only used for communication within the Virtual Machine (that is, an internal virtual switch that eliminates the physical machine)
Basically, internal vswitches

Virtual VLAN
Note that when creating a vswitch or adding a nic, you must set a vlan id.

First, you need to find more detailed information about the significance of VLAN, such as isolated traffic to prevent broadcast storms.
In the past, VLAN configuration was required at the network hardware layer, such as vswitches. However, due to network virtualization, VLAN configuration can be implemented at the software layer.
With this configuration, network traffic can be divided into different VLANs.
At the same time, it also better meets requirements such as multi-tenant security and isolation.
Because VLANs have some natural limitations, such as the inability to span multiple subnets and the number of limits (theoretically, 4096 actually seems to be a problem with over 1000)
Therefore, Microsoft also introduced IP address virtualization through IP address Rewriting Technology.
Each virtual machine consists of two IP addresses (provider address PA and customer address CA)
IP address rewriting modifies the customer's IP address before the data packet leaves the virtual machine and then transmits it to the physical network. the receiving end uniquely identifies the current virtual machine through the addresses of PA and CA.
The advantage is that you do not need to upgrade the network adapter, switch, or network device, and do not deploy at the cost of performance.

Scalable vswitch
Ps: this function is available only in Windows Server 2012. Win8 of the client does not include this function.
A Hyper-V scalable switch is a two-layer virtual network switch. It can be managed and extended programmatically to connect virtual machines to the physical network.
Hyper-V extensible vswitch can be expanded here.
By default, Hyper-V Supports network device interface specification (NDIS) filter drivers and Windows filter platform (WFP) annotation drivers, it also allows other non-MIcrosoft Hyper-V network extensions to enhance its performance.
Its vswitch provides an open switch API through the following attributes:
Scalable: You can add new and enhanced features while retaining the local feature set.
Standard APIs: You can build extensions on NDIS and WFP. NDIS and WFP are open platforms familiar to Windows developers.
Real-time migration support: You can use extensions in Hyper-V Real-time migration.
Easy troubleshooting: provides unified tracking support for vswitches and their extensions.
In addition, Hyper-V vswitches provide the following features:
Powershell and script support
Unified tracking and enhanced Diagnosis
To facilitate its management

The structure is as follows:

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.