2

When ping host from hyper-v VM, it works both with ipv4 or ipv6.

Pinging MyHost [fe80::3549:ee49:a75c:619c%9] with 32 bytes of data:
Reply from fe80::3549:ee49:a75c:619c%9: time<1ms
Reply from fe80::3549:ee49:a75c:619c%9: time<1ms
Reply from fe80::3549:ee49:a75c:619c%9: time<1ms
Reply from fe80::3549:ee49:a75c:619c%9: time<1ms

Ping statistics for fe80::3549:ee49:a75c:619c%9:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

When ping Hyper-V VM from host, ipv4 time out.

Pinging win-hyperv [192.168.1.126] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.1.126:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

And ipv6 got

Ping request could not find host win-hyperv. Please check the name and try again.

Why host use IPv4 while another way use IPv6?

  • There's a lot of reasons why IPv6 pings might work and IPv4 Pings wouldn't. The primary being that IPv6 can actually autosense config details to put itself in the correct subnets. IPv4 requires the DHCP server or static config to do it for it. I suggest you disable IPv6 on the VM, retry the ping (Because now it will only use IPv4) and see if the VM can see the host on IPv4. – Naryna Apr 27 '16 at 16:12
  • It's also possible to just specify the type of IP you want to use in the command syntax here. You can just use the -4 or -6 switches to test connectivity with. – Naryna Apr 27 '16 at 16:23
  • I tried -4 and -6 and -6 got the error of "could not find". The question has been updated. – sjzls Apr 27 '16 at 16:31
  • Well, things make a lot more sense now. Is your VM statically configured for IP or getting DHCP? Also, can you try the force IPv4 ping on the VM to the host? I have a sneaking suspicion it won't resolve to anything, but I could be wrong. – Naryna Apr 27 '16 at 16:40
  • Yes, force IPv4 ping on the VM to host works too. – sjzls Apr 27 '16 at 17:23
2

have you checked the host based Firewall on the VM? is it allowing ICMP traffic? this would explain why the VM can ping the host but not the other way round

| improve this answer | |
  • This was the issue for me - found the rule "File and Printer Sharing (Echo Request - ICMPv4-In)" inside the VM firewall and enabled it. Not sure why it was disabled. – eddiewould Jun 28 '17 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.