Thanks for the replies!
I tried ipconfig /flushdns. Nothing changed
I also switched to an ethernet cable instead of Wifi. The problem persists.
I ran the Network Troubleshooter. It came back with " Your computer appears to be correctly configured but the device or resource (www.microsoft.com) is not responding"
The internet connection works well for a couple of minutes after restart, but then when I am trying to visit a website, the browser reports that the connection has timed out.
If I keep reloading then eventually the website will load, but this won't last more than a minute. So the internet connection isn't totally dead.
But the crazy part as I mentioned before is that torrents keep working the whole time. I also tried with Steam downloads and they work too. It seems that only web browsing is affected.
I just installed new Ethernet drivers. It's a Marvell Yukon 88E8056 adapter. Worked for a few minutes, but same problem again.
I don't think it is a driver issue. Whatever it is, it is driving me nuts. I'm this close from reverting the Anniversary update.