A virtual network functions in much the same way as a physical network: two or more computers are linked together to share resources. In a virtual network, one or more VMs are linked together or to an external network. Virtual components can be used with VMs to create virtual networks.
The following table identifies types of virtual networks:
Network Type | Description |
External | In an external network, VMs bind to the physical NIC, which allows them to access the physical network. Use this option to allow the VM to communicate with the host operating system, other VMs running on the system, and other physical network devices. |
Internal | In an internal network, VMs can communicate with one another and with the host operating system, but cannot access the physical network. This configuration is typically used to build a test network where you connect to the VMs through the management operating system. |
Private network | In a private network, VMs can communicate with each other but cannot communicate with the host operating system or access the physical network. This network type is optimal when a VM needs to have a degree of isolation. |
Fibre Channel | In a Fibre Channel network, VMs can connect to existing Fibre Channel storage arrays. |
If you do not set up a network, the VM cannot communicate with any other physical or virtual machine. It may be best to not have any network setup for your VM if it is used for testing or performing other tasks in which isolation is beneficial.
You can use virtual network adapters to:
- Manage bandwidth settings for the physical adapter:
- Minimum bandwidth
- Maximum bandwidth
- Unrestricted bandwidth
- Manage MAC addresses for the virtual adapter:
- Disable MAC spoofing to protect from malicious VMs.
- Enable MAC address spoofing to allow a VM to change its source MAC address for outgoing packets or to support failover in NIC teaming.
Use Hyper-V Manager to create and manage virtual adapters. The VM must be offline in order to create, configure, or manage the virtual network adapter.
The following table describes which types of virtual network adapters are supported in generation 1 and 2 VMs:
VM Generation | Virtual Network Adapter Types |
Generation 1 | Generation 1 virtual machines can use the following types of virtual network adapters:
|
Generation 2 | Generation 2 virtual machines can use the following types of virtual network adapters:
|
Similar to a physical switch, a virtual switch allows one or more VMs to transmit data to local or external network resources. Be aware of the following regarding virtual switches:
- Virtual switches created by Hyper-V are software-based.
- Virtual switches can have an unlimited number of ports. Ports can be added or removed dynamically.
The following table describes considerations for installing virtual switches:
Type | Description |
External | External virtual switches allow a VM to communicate with the external network as well as other VMs. In Windows Server 2012, Hyper-V provides:
|
VLAN | VLANs can be set on the virtual switch, the physical switch or on the virtual adapter.
|
Fibre Channel | Fibre Channel SAN switches:
|