VM cannot communicate with the host.

Wayzz4003 -  
brupala Posted messages 111138 Registration date   Status Member Last intervention   -

"Message to the moderator to avoid deleting my message, no I am not a student, and I am not looking for a ready-made easy solution. What I want is help to understand where my mistake could be; I have already tried multiple solutions found on other forums and even asked the AI, but nothing works, the problem persists."

As part of an exercise, I need to create a small business network infrastructure. One of the steps is to create Hyper-V VMs to make different servers, IIS, MySQL, DHCP, etc...

The problem is that the host and the VMs cannot ping each other, but only in that direction; I mean, the VMs can ping each other and access all other devices on the network without any problem. Conversely, the physical server can also communicate with the rest of the devices.

The problem is really only between the VMs and their host.

They are all (the VMs and the host) in the same VLAN on the switch; I have already tried disabling the firewalls, with no results.

And I admit I'm stuck; I don't understand where my mistake is.

2 answers

  1. brupala Posted messages 111138 Registration date   Status Member Last intervention   14 440
     

    Hello anyway,

    a ping (successful) is always a round trip of data, so a ping that goes one way consists of nearly identical packets in both directions (the pong).

    If a ping goes one way and not the other, it's always a firewall issue or a dynamic NAT that leads to the same thing in this case.

    I suppose you have a NAT between the local network of the VMs and the physical network of the host, that's the default configuration for VMs.

    This makes it possible for pings to be sent from the VM network to the outside, but not from the outside to the VM network.

    If you can change the source address of the ping from your host to its source address on the VM network instead of its physical address, you should be able to get your ping through.

    However, it won't work from another machine on the physical network; additional firewall rules and static routing are needed.


    And there you go, voilà ....

    But misery, how annoying the line spacing is!!

    0
  2. Wayzz4003
     

    Hello, 

    No, my VMs are on Hyper-V, so I don't think there is any NAT.

    As for the firewall, I've already tried turning it off on both sides, but it doesn't work.

    It should be noted that the VSwitch is external in the Hyper-V manager.
    Also, the VMs are on the same VLAN as the host.

    Additionally, the VMs are and should be considered as independent machines on my network.

    0
    1. brupala Posted messages 111138 Registration date   Status Member Last intervention   14 440
       

      If your VM network is in bridge mode with the physical network and there is no NAT, then the VM IP addresses are in the same IP network as the physical network; otherwise, they are not.

      Even on the same switch, it means nothing if you have multiple interfaces on the host.

      In the same physical network, it can only be a matter of firewall, whether you like it or not.

      After that, I have never worked with Hyper-V, only with VirtualBox, but the networking concepts are pretty much the same.

      If you want to go further, I recommend posting your question in the virtualization forum: https://forums.commentcamarche.net/forum/virtualisation-309

      0
      1. Wayzz4003 > brupala Posted messages 111138 Registration date   Status Member Last intervention  
         

        I don't know if "external" mode is equivalent to bridge mode, but indeed there is no NAT.
        And yes, the VMs have their IPs in the same IP network as the host.

        So it could be the firewall even though I disabled it?

        And yes, okay, thank you, I will go put it over there.

        Goodbye.

        0
      2. brupala Posted messages 111138 Registration date   Status Member Last intervention   14 440 > Wayzz4003
         

        yes, it seems that the external switch is equivalent to a bridge, in fact the host machine only has its interface to the bridge, its connection to the physical network is that of the switch.

        However, WSL, which is based a bit on hyper-v, I believe, works well in nat mode, it would suit me if it were in bridge mode, because it does not manage ipv6.

        0