DNS resolution on Windows 7

4

1

I have Windows 7 and MacOS on Macbook Pro with cable internet connection in hotel. When I am using MacOS, internet connection is just fine. When I am using Windows 7, there is no internet connection. After digging a bit found that DNS resolution is causing the problem, simply names are not resolved. I installed Wireshark and strangely I found in the capture the response to DNS resolution request with resolved IP, but somehow they are not reaching Windows 7 core. Not sure if it's related or not, but after each response I see single STP packet.

The network is using DHCP to setup interface and in both OS's interfaces are setting up identically. I can ping DNS servers, default GW from Windows 7

Update:

nslookup

C:\>nslookup
DNS request timed out.
    timeout was 2 seconds.
Default Server:  UnKnown
Address:  80.58.61.250

> Yahoo.com
Server:  UnKnown
Address:  80.58.61.250

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-ou

ipconfig

Windows IP Configuration

   Host Name . . . . . . . . . . . . : Mac-Windows 7
   Primary DNS Suffix  . . . . . . . : 
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . : 
   Description . . . . . . . . . . . : Broadcom NetXtreme GBabit Ethernet
   Physical Address. . . . . . . . . : C4-2C-03-3B-30-8E
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 172.31.17.14(Preferred) 
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, December 16, 2010 6:57:58 AM
   Lease Expires . . . . . . . . . . : Friday, December 17, 2010 7:01:16 AM
   Default Gateway . . . . . . . . . : 172.31.17.254
   DHCP Server . . . . . . . . . . . : 172.31.17.254
   DNS Servers . . . . . . . . . . . : 80.58.61.250
                                       80.58.61.254
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter iSATAp.{5E50E7E1-3532-4D59-97F3-437CB9ABD85B}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : 
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : 
   Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

trace route (result is same for macos as well)

C:\>tracert 8.8.8.8

Tracing route to 8.8.8.8 over a maximum of 30 hops

  1    <1 Microsoft    <1 Microsoft    <1 Microsoft  172.31.17.254
  2     *        *        *     Request timed out.
  3     *        *        *     Request timed out.
  4     *        *        *     Request timed out.
  5     *        *        *     Request timed out.
  6     *        *        *     Request timed out.
  7     *        *        *     Request timed out.
  8     *        *        *     Request timed out.
  9     *        *        *     Request timed out.
 10     *        *        *     Request timed out.
 11     *        *        *     Request timed out.
 12   111 Microsoft   109 Microsoft   109 Microsoft  8.8.8.8

Trace complete.

netstat

C:\>netstat

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    127.0.0.1:5357         Mac-Windows 7:49165     TIME_WAIT
  TCP    127.0.0.1:5939         Mac-Windows 7:49164     ESTABLISHED
  TCP    127.0.0.1:49157        Mac-Windows 7:49158     ESTABLISHED
  TCP    127.0.0.1:49158        Mac-Windows 7:49157     ESTABLISHED
  TCP    127.0.0.1:49160        Mac-Windows 7:49161     ESTABLISHED
  TCP    127.0.0.1:49161        Mac-Windows 7:49160     ESTABLISHED
  TCP    127.0.0.1:49162        Mac-Windows 7:49163     ESTABLISHED
  TCP    127.0.0.1:49163        Mac-Windows 7:49162     ESTABLISHED
  TCP    127.0.0.1:49164        Mac-Windows 7:5939      ESTABLISHED

Pablo

Posted 2010-12-16T05:30:17.367

Reputation: 4 093

Does the Mac have the same DNS servers as the Windows box? Could the Windows box have hardcoded DNS servers? – Richard – 2010-12-16T08:16:32.603

exactly the same, both retrived from DHCP. I tried public DHCP as well. – Pablo – 2010-12-16T16:30:44.097

Answers

2

This was the reason for DNS not working with DHCP on Windows 7 in my case:

After 2 days of struggling, I suddenly noticed that when I rebooted the router (after modifiyng some basic parameter) its date was probably reset to its BIRTHDATE (2005), so the lease it was giving was in the PAST and probably Windows 7 relies on the date given by the DHCP instead of its own...

The result is that the lease is already over.

Then 2 odd things happen, you can check them with ipconfig /allcompartments /all on Windows 7, for some reason:

  • Windows 7 doesn't understand the lease time: it declares more than 136 years instead of 120 minutes!
  • If the lease is ALREADY OVER: Windows 7 ignores the DNS given!

To summarize the SOLUTION in my case was:

  1. Setup the correct time on the DHCP server.
  2. Run ipconfig /release
  3. Run ipconfig /renew

DHCP with DNS shoud be UP and WORKING!

So ALWAYS check the DHCP server date...

Mauro D'Antonio

Posted 2010-12-16T05:30:17.367

Reputation: 36

Windows 8: I tried changing time/release/renew didn't work on my friends computer. – neoneye – 2014-01-29T12:04:45.657

0

I guess you can try

  1. run nslookup and see if names are resolving.
  2. try to use public DNS like 8.8.8.8 / 8.8.4.4 as DNS servers to see if it works
  3. check your /etc/hosts file in windows (located in %systemroot%\system32\drivers\etc\ )

to give us more information, you may want to:

  1. give us the output of ipconfig, netstat
  2. trace the route to the DNS servers supplied using tracert

bubu

Posted 2010-12-16T05:30:17.367

Reputation: 9 283

@bubu: updated. looking forward for some ideas. Actually it was working just fine at my home network... so this damn hotel network is tricky :( – Pablo – 2010-12-16T07:22:47.990

maybe you can set the dhcp server to 8.8.8.8 and see if it works – bubu – 2010-12-16T13:17:32.450

that's what I did and it doesn't help – Pablo – 2010-12-16T21:07:31.953

Hmm.. that's strange. Could it have anything to do with other VPN/Tunnels you have specified in the windows? Try disabling all other interfaces in windows to see if it helps... – bubu – 2010-12-17T04:32:48.827

I haven't created them, they are by default. – Pablo – 2010-12-17T17:57:09.383

maybe you could post the result of [ route PRINT -4 ] – bubu – 2010-12-18T00:36:32.093

0

OpenDNS is perhaps all you need.

Jasper

Posted 2010-12-16T05:30:17.367

Reputation: 431

0

Do you have a proxy server that accidentally running in Windows 7?

Hieu

Posted 2010-12-16T05:30:17.367

Reputation: 593