How to share connection through Loopback interface and internal Hyper-V Switch ?

Hello everybody.


It's been literally 4 hours since I have been hammering my head on the wall trying to give internet connection to my Hyper-V VMs through ICS + Microsoft Loopback Interface and Hyper-V internal Virtual Switch. Let me explain it in more details.


What I need to achieve is basically be able to communicate with my Hyper-V VMs even when the host doesn't have a routed connection.


I am not a expert when it comes of networking. What I am trying to do is I am sharing the wireless NIC connection through the loopback interface through ICS, than I have created a internal Virtual Switch through the Hyper-V Virtual Switch Manager, and I gave it a static IP of the Loopback subnet, in this case I gave to the switch 192.168.137.10 since the Loopback IP is 192.168.137.1.


But unfortunately it does not work this way. None of the VMs are able to gain any IP from the Virtual Switch interface.


I have also tried creating a External Hyper-V Virtual Switch interface binding it directly with the loopback interface. Unfortunately it didn't work either this way.


What am I doing wrong? I would love some help.


Thanks

July 13th, 2015 6:40pm

Hi pietruzzo,

The main issue is to enable the communications between the hyper-v machines, right?

We just need to create a new virtual network adapter and add them to the virtual machine. Please ensure you have chosen the "Internal" properties and they are located in the same subnet.

Here is a link for reference:
Hyper-V Internal Virtual Network- The New Loopback
http://rickgaribay.net/archive/2008/08/22/hyper-v-internal-virtual-network--the-new-loopback.aspx
NOTE: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites.

Best regards

Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 4:08am

Hello MeipoXu,

thank you for your answer. I think I might not have explained properly what I need to do, let me try it again in a easier way, I hope.

Yes all of the VMs running under Hyper-V do share the same Internal Virtual Switch, they all share the same subnet and are able to communicate within each other, as well as with the HOST when the HOST is connected to a router, or if I manually set a static IP address to a NIC.

Because I don't like giving a static IP to a NIC (regardless whether wireless or LAN) since I run a FreeBSD DHCP Server both at home and work, I would rather avoid wasting time giving a NIC a static IP each time I am not connected to a router (for instance when I am on the train) in order for the HOST to be able to communicate with the Hyper-V VMs.

To make a long story short, what I need is be able to have communicate between the HOST and the Hyper-V VMs (Normally OpenSSH and HTTP) when my laptop (the HOST) is not connected to a router, and at the same time I want to leave both HOST's Wireless and LAN interfaces in DHCP. Also, the Virtual Switch where the VMs are connected to will need to share the internet connection from the HOST wireless card (I am already doing this with ICS).

I know I wrote a lot, and it is confusing. I am sorry and I appreciate your help.

Thanks 

July 15th, 2015 6:51pm

I have just realized that the Internal Virtual Switch is already bounded to the HOST localhost on 192.168.137.1, and it does routing through the VMs and the HOST even if none of the HOST physical NICs are connected to a router or are left in DHCP.

I can SSH through HOST and VMs just fine, and even the Apache server on the VMs works too.

I can't believe I have wasted two days of my life when the solution was already provided -_- 

Thanks for the support.

  • Marked as answer by pietruzzo 17 hours 29 minutes ago
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2015 9:58am

I have just realized that the Internal Virtual Switch is already bounded to the HOST localhost on 192.168.137.1, and it does routing through the VMs and the HOST even if none of the HOST physical NICs are connected to a router or are left in DHCP.

I can SSH through HOST and VMs just fine, and even the Apache server on the VMs works too.

I can't believe I have wasted two days of my life when the solution was already provided -_- 

Thanks for the support.

  • Marked as answer by pietruzzo Thursday, July 16, 2015 1:56 PM
July 16th, 2015 1:56pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics