What is the difference between an external virtual switch and an internal virtual switch?

Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Create a virtual switch for Hyper-V virtual machines

  • Article
  • 07/29/2021
  • 3 minutes to read

In this article

Applies to: Windows Server 2022, Windows 10, Windows Server 2016, Microsoft Hyper-V Server 2016, Windows Server 2019, Microsoft Hyper-V Server 2019

A virtual switch allows virtual machines created on Hyper-V hosts to communicate with other computers. You can create a virtual switch when you first install the Hyper-V role on Windows Server. To create additional virtual switches, use Hyper-V Manager or Windows PowerShell. To learn more about virtual switches, see Hyper-V Virtual Switch.

Virtual machine networking can be a complex subject. And there are several new virtual switch features that you may want to use like Switch Embedded Teaming (SET). But basic networking is fairly easy to do. This topic covers just enough so that you can create networked virtual machines in Hyper-V. To learn more about how you can set up your networking infrastructure, review the Networking documentation.

Create a virtual switch by using Hyper-V Manager

  1. Open Hyper-V Manager, select the Hyper-V host computer name.

  2. Select Action > Virtual Switch Manager.

    What is the difference between an external virtual switch and an internal virtual switch?

  3. Choose the type of virtual switch you want.

    Connection typeDescription
    External Gives virtual machines access to a physical network to communicate with servers and clients on an external network. Allows virtual machines on the same Hyper-V server to communicate with each other.
    Internal Allows communication between virtual machines on the same Hyper-V server, and between the virtual machines and the management host operating system.
    Private Only allows communication between virtual machines on the same Hyper-V server. A private network is isolated from all external network traffic on the Hyper-V server. This type of network is useful when you must create an isolated networking environment, like an isolated test domain.
  4. Select Create Virtual Switch.

  5. Add a name for the virtual switch.

  6. If you select External, choose the network adapter (NIC) that you want to use and any other options described in the following table.

    What is the difference between an external virtual switch and an internal virtual switch?

    Setting nameDescription
    Allow management operating system to share this network adapter Select this option if you want to allow the Hyper-V host to share the use of the virtual switch and NIC or NIC team with the virtual machine. With this enabled, the host can use any of the settings that you configure for the virtual switch like Quality of Service (QoS) settings, security settings, or other features of the Hyper-V virtual switch.
    Enable single-root I/O virtualization (SR-IOV) Select this option only if you want to allow virtual machine traffic to bypass the virtual machine switch and go directly to the physical NIC. For more information, see Single-Root I/O Virtualization in the Poster Companion Reference: Hyper-V Networking.
  7. If you want to isolate network traffic from the management Hyper-V host operating system or other virtual machines that share the same virtual switch, select Enable virtual LAN identification for management operating system. You can change the VLAN ID to any number or leave the default. This is the virtual LAN identification number that the management operating system will use for all network communication through this virtual switch.

    What is the difference between an external virtual switch and an internal virtual switch?

  8. Click OK.

  9. Click Yes.

    What is the difference between an external virtual switch and an internal virtual switch?

Create a virtual switch by using Windows PowerShell

  1. On the Windows desktop, click the Start button and type any part of the name Windows PowerShell.

  2. Right-click Windows PowerShell and select Run as Administrator.

  3. Find existing network adapters by running the Get-NetAdapter cmdlet. Make a note of the network adapter name that you want to use for the virtual switch.

    Get-NetAdapter
    
  4. Create a virtual switch by using the New-VMSwitch cmdlet. For example, to create an external virtual switch named ExternalSwitch, using the ethernet network adapter, and with Allow management operating system to share this network adapter turned on, run the following command.

    New-VMSwitch -name ExternalSwitch  -NetAdapterName Ethernet -AllowManagementOS $true
    

    To create an internal switch, run the following command.

    New-VMSwitch -name InternalSwitch -SwitchType Internal
    

    To create an private switch, run the following command.

    New-VMSwitch -name PrivateSwitch -SwitchType Private
    

For more advanced Windows PowerShell scripts that cover improved or new virtual switch features in Windows Server 2016, see Remote Direct Memory Access and Switch Embedded Teaming.

Next step

Create a virtual machine in Hyper-V

Feedback

Submit and view feedback for

What is the difference between an external Internal and private virtual switch?

External switch: linked to a physical card of the Hyper-V host and allows access to the network. Internal switch: isolates the virtual machines but allows network switching between the Hyper-V host and the virtual machines. Private Switch: Completely isolates the network from virtual machines.

What is an external virtual switch?

External Virtual Switch A Hyper-V virtual switch in external mode allows communications between virtual adapters connected to virtual machines and the management operating system. It uses single or teamed physical adapters to connect to a physical switch, thereby allowing communications with other systems.

What are the three different types of virtual switch connections?

Hyper-V enables admins to create three different types of virtual switches: external, internal and private..
External virtual switch. This switch type is bound to a physical network adapter and provides connected VMs with physical network access. ... .
Internal virtual switch. ... .
Private virtual switch..

How many types of virtual switches are there?

There are three types of virtual switches that provide different kinds of connectivity.