DNS resolution on Windows 7

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

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...