Hyper V with local DNS and forwarding - nslookup works but ping gets general failure

5,231

"Transmit error : code 1231" correspond host cannot find default gateway. See this link. So I guess when you set network configuration to static, perhaps you didn't entered default gateway information. An ipconfig /all result should give us more information.

Share:
5,231

Related videos on Youtube

Nathan
Author by

Nathan

Updated on September 18, 2022

Comments

  • Nathan
    Nathan almost 2 years

    I have a Hyper-V virtual machine configured with its own DNS manager and entries for testing. The VM DNS manager is setup to forward all other requests to the "regular" DNS servers.

    This all used to work fine, but now I am running into issues (possibly corresponds to about the time I changed the virtual machine's network adapter to bind to multiple static ip addresses - previously it was a single DHCP address).

    The interesting thing is that I ping the VM DNS entries just fine. However, for the forwarded entries, nslookup succeeds, but ping fails, and no external internet sites can be accessed.

    For example, here are the results for www.google.com, after a fresh ipconfig /flushdns:

    C:\Windows\system32>nslookup www.google.com
    Server:  localhost
    Address:  127.0.0.1
    
    Non-authoritative answer:
    Name:    www.google.com
    Addresses:  2607:f8b0:4003:c01::68
          173.194.64.105
          173.194.64.99
          173.194.64.103
          173.194.64.106
          173.194.64.147
          173.194.64.104
    
    
    C:\Windows\system32>ping www.google.com
    Ping request could not find host www.google.com. Please check the name and try again.
    
    C:\Windows\system32>ping 173.194.64.106
    
    Pinging 173.194.64.106 with 32 bytes of data:
    PING: transmit failed. General failure.
    PING: transmit failed. General failure.
    PING: transmit failed. General failure.
    PING: transmit failed. General failure.
    
    Ping statistics for 173.194.64.106:
        Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
    

    But pinging my internally defined dns entries (defined in forward lookup zones) works fine.

    Update

    With the static ip setup (multiple static ips on the same network connection, dns server set to 127.0.0.1 with forwarding to "official" dns servers), I can ping both dns entries defined on my VM and dns entries local to the wider internal network. However, I can't ping addresses on the Internet.

    If I allow Windows to "diagnose" my network connection in the virtual machine, it suggests changing my VM adapter back to DHCP - if I allow it to do so, I can ping external internet (but not my VM dns entries). As soon as I switch it back to the static ip addresses, the problematic behavior exhibits itself again.

    Update 2

    All assigned ip addresses are on the same subnet.

    Here is a tracert result:

    C:\Windows\system32>tracert 173.194.64.106
    
    Tracing route to oa-in-f106.1e100.net [173.194.64.106]
    over a maximum of 30 hops:
    
      1  Transmit error: code 1231.
    
    Trace complete.
    

    Why is my virtual server able to successfully resolve external DNS entries, but not actually connect to them?

  • Nathan
    Nathan almost 11 years
    Interfaces is set to listen on "All ip addresses". I also tried just using one ip address at a time, and still got the same results.
  • Nathan
    Nathan almost 11 years
    Updated the question with the additional information (all ips on the same subnet, and a tracert result).