1.    30 Apr 2017 #1
    Join Date : Jan 2015
    Posts : 21
    Windows 10

    Win10 Accesses the Internet With Hyper-V's Virtual Switch


    After adding Hyper-V to Windows 10 Pro, Windows now accesses the internet with the virtual switch I created for Hyper-V instead of my Ethernet connection. Why isn't Windows 10 using my Ethernet connection?
      My ComputerSystem Spec
  2.    01 May 2017 #2
    Join Date : Oct 2013
    A Finnish expat in Germany
    Posts : 12,948
    Windows 10 Pro

    Your host machine is still using the Ethernet connection, it's just used through an external virtual switch. That's how it should be.

    To allow communications between virtual machines and host, between different virtual machines, and to let both host and virtual machines access Internet, host machine needs to use the same external switch than virtual machines.

    Let it be as it is, there's no issue here things being as they should be.

    Kari
      My ComputerSystem Spec
  3.    01 May 2017 #3
    Join Date : Jan 2015
    Posts : 21
    Windows 10
    Thread Starter

    Thanks very much for your help. Please bear with me as I become better acquainted with Hyper-V:

    I expected to see the virtual switch being used for internet access by the virtual machine when I am actually running the virtual machine. I was not expecting to see the virtual switch being used for internet access by my computer when I am not running a virtual machine. In that case I was expecting to see my computer using my 'regular' Ethernet connection, just as it did before I added Hyper-V.

    It seems there's something basic about Hyper-V that I don't understand (yet.) Would you please explain?
      My ComputerSystem Spec
  4.    01 May 2017 #4
    Join Date : Sep 2014
    Nashville, TN
    Posts : 3,143
    Windows 10 Pro

    Quote Originally Posted by Bulldog View Post
    Thanks very much for your help. Please bear with me as I become better acquainted with Hyper-V:

    I expected to see the virtual switch being used for internet access by the virtual machine when I am actually running the virtual machine. I was not expecting to see the virtual switch being used for internet access by my computer when I am not running a virtual machine. In that case I was expecting to see my computer using my 'regular' Ethernet connection, just as it did before I added Hyper-V.

    It seems there's something basic about Hyper-V that I don't understand (yet.) Would you please explain?
    It's really pretty simple. Imagine if you had 3 physical computers, and one cable modem (with a single port on it). Now, in order for these three computers to talk to each other, and all talk to the internet, you would need a switch that sits between the modem and the computers. Correct?

    That's basically what is happening here. Only one computer (either virtual or physical) can use the built-in Ethernet connection, so when you install Hyper-V it creates a "virtual switch" that sits between the host computer, as well as all the virtual computers so they can all talk to each other, as well as the internet. Just like in the previous scenario.

    If the host was talking directly to the Ethernet, then the guests would not be able to use it.
      My ComputerSystem Spec
  5.    02 May 2017 #5
    Join Date : Jan 2015
    Posts : 21
    Windows 10
    Thread Starter

    Aha! Now I get it.
      My ComputerSystem Spec
  6.    03 May 2017 #6
    Join Date : Dec 2015
    Posts : 5,865
    Windows10

    Quote Originally Posted by Mystere View Post
    It's really pretty simple. Imagine if you had 3 physical computers, and one cable modem (with a single port on it). Now, in order for these three computers to talk to each other, and all talk to the internet, you would need a switch that sits between the modem and the computers. Correct?

    That's basically what is happening here. Only one computer (either virtual or physical) can use the built-in Ethernet connection, so when you install Hyper-V it creates a "virtual switch" that sits between the host computer, as well as all the virtual computers so they can all talk to each other, as well as the internet. Just like in the previous scenario.

    If the host was talking directly to the Ethernet, then the guests would not be able to use it.
    Good description. I learnt something!

    I assume VMware etc do something similar but less obvious?
      My ComputerSystem Spec
  7.    03 May 2017 #7
    Join Date : Sep 2014
    Nashville, TN
    Posts : 3,143
    Windows 10 Pro

    Quote Originally Posted by cereberus View Post
    Good description. I learnt something!

    I assume VMware etc do something similar but less obvious?
    I haven't used VMWare in ages, but I think VMWare installs some kind of middleware driver in the network stack to do this.
      My ComputerSystem Spec
  8.    04 May 2017 #8

    Quote Originally Posted by Mystere View Post
    I haven't used VMWare in ages, but I think VMWare installs some kind of middleware driver in the network stack to do this.
    Hi there

    Vmware creates a "Virtual" adapter which as you say essentially does the same thing. These are vmnet0-vmnetn depending on how you connect to the physical NIC. Vmware routes the traffic via the vmnet interface to the physical nic on the host and hence to router and internet / LAN.

    I'm not sure how this works or can be set up if you have 2 or more physical nics on the machine

    Here's 4 VM's running on a Linux Host -- 3X W10 and 1 X W7 - network map as seen from the W7 machine. Host is machine BROWNBEAR running Linux CENTOs 7.

    I've had up to 8 running concurrently -- response drops off a bit then and if you are only using 1 physical nic you want at least a 1 - 10Gib/s one. I've actually 2 physical NIC's on the Host but not sure how to use the second one in a VMWARE network I know it's easy with HYPER-V though - but then I can't have LINUX as the host.

    Click image for larger version. 

Name:	nw10.png 
Views:	1 
Size:	486.6 KB 
ID:	133406

    Cheers
    jimbo
      My ComputerSystem Spec
  9.    04 May 2017 #9
    Join Date : Oct 2013
    A Finnish expat in Germany
    Posts : 12,948
    Windows 10 Pro

    Just to add to Mystere's excellent post, using a Hyper-V external switch virtual machines get a bridged connection. If you prefer NAT (Network Address Translation) instead, you don't have to create an external virtual switch. About bridged vs. NAT: NAT vs. bridged network: A simple diagram - TechGenix

    To use NAT in Hyper-V, first create an Internal switch in Virtual Switch Manager then share your host Ethernet or WLAN connection with your internal switch:

    Click image for larger version. 

Name:	image.png 
Views:	26 
Size:	11.9 KB 
ID:	133410

    In VM settings set virtual machines to use the internal switch. They will now get private IP addresses 192.168.137.XXX, internal switch on host acting as DHCP server with IP 192.168.137.1.

    Using NAT only with virtual machines makes external virtual switch unnecessary but as it makes networking between host and virtual machines quite a challenge if not impossible, the bridged mode with an external switch is the recommended way.

    Quote from an old tutorial at our sister site EightForums.com:

    Part 1: Understanding Virtual Switches

    To connect a virtual machine (hereafter vm) to network it needs a network controller (hereafter NIC) the same way as any physical computer would need. In Hyper-V virtualization this NIC is of course virtual, it does not exists physically.

    As we cannot connect a virtual NIC to a physical router we need a Virtual Switch (hereafter VS) to act like a network bridge between host NIC and vm virtual NIC. See the image below:

    Click image for larger version. 

Name:	Virtual_Switch_12.png 
Views:	26 
Size:	292.2 KB 
ID:	133416

    A Virtual Switch can be external, internal or private.
    • External Virtual Switch: will connect a vm to host NIC. If host NIC is connected to Internet through router, the vm is also connected to Internet. If host NIC (LAN) is not connected to router or if the router has no Internet access, the internal network will still work allowing computers (physical and vm) belonging to the same subnet and workgroup or domain to communicate with each other (file and media sharing etc.). When connecting external switch to host WLAN NIC, the vm loses all connectivity when WLAN is disabled or not connected on host.
    • Internal Virtual Switch: When a virtual NIC is connected to Internal VS it can communicate with other computers and vms on the same subnet but has no Internet access if host Ethernet or WLAN connection is not shared with it.
    • Private Virtual Switch: When a virtual NIC is connected to Private VS it can communicate with other vms on same Hyper-V server but cannot communicate with host PC nor has it Internet access. A Private vs is often needed when installing a legacy Linux or pre-XP Windows vm. After installation you need then to disable Private Switch and use Internal or External to connect to the network.
    (From EightForums.com tutorial Hyper-V Virtual Switch Manager)

    Kari
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
Solved Hyper-V error when creating virtual switch.
Hi this is my first post but I am really confused as to an issue with hyper-V Whenever I go to open the virtual switch manager, it says; The operation on computer 'DESKTOP-V1A0142' failed: Generic error. Is there anyway to fix this. I have not...
Virtualization
Hyper-V Virtual Switch
I cannot create a Virtual switch when using Hyper-V get this error message: 102137 I am using a Qualcomm Atheros AR9002WB-1NG Wireless Network Adapter and running Hyper-V with Admin Privleges. Laptop is a Toshiba Qosmio i7 with 8GB Ram...
Virtualization
Hyper-V - Unable to Create External Virtual Switch
I get the error "bind failed: General access denied error" when I try to create an external virtual switch. 67920 I tried running Hyper-V with as admin without success. Kevin
Virtualization
Solved Can't enable Hyper-V Extensible Virtual Switch in Networking
I can find the dialog to enable the Hyper-V Extensible Switch for my network card but when I say OK then it says: "Your current selection will also disable the following features: Hyper-V Extensible Virtual Switch" Yes or No Either way...
Virtualization
Cannot use Hyper-V Extensible Virtual Switch
Hey, new here. I wasn't sure if this should go in Network and Sharing or Programs and Apps, so I apologize if this is in the wrong category. Anyways, while trying to set up a virtual switch I discover I need to install the 'Hyper-v Extensible...
Network and Sharing
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:23.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums