Internet connection problem on new iMac
So I just bought one of the new iMacs, and am not able to connect it to the internet (I'm using my Macbook to post this).
I had an ancient Mac desktop, and was about to buy a new one, when I had some health issues, and it wiped out the $$$ I had set aside for buying a new Mac. So I later just got a refurbished Macbook Air for $600, for the time being. I didn't really want a laptop, but it was the cheapest new/near-new option I could find at the time. I just used it with the ethernet plugged into it, and just never got around to actually getting wi-fi.
So anyway, I FINALLY got a new iMac yesterday, and decided "what the ****" and got a wi-fi router, also. I set up the iMac, and then set up the router (which took a lot longer than the iMac). Then it didn't seem like the wi-fi was working. I started messing around, trying to figure out what was wrong, when suddenly, it just out of nowhere started working on the Macbook. I don't know -- I guess it just took it a while to load or recognize it or something? Then I got the iMac to also recognize it and log in. And finally, I got it working on my iPhone. So then, I used the Migration Assistant to migrate everything on the MacBook to the iMac. It transferred all of it over the wi-fi, no problems.
Then I ran into THE problem. I opened Safari on the iMac, and it told me that "You Are Not Connected to the Internet". I double-checked, and the wi-fi was turned ON, and it was connected to my Network (AND it had just migrated everything over it). But NOTHING internet-related would work. I tried opening my BitTorrent client, and a couple of other browsers, and they all refused to open, saying "Unable to check for updates. Make sure you are connected to the internet."
The internet was working perfectly fine on the Macbook, so clearly it wasn't the wi-fi not working properly. So I ran the Wireless Diagnostics app, and when it ended, it said:
DNS Resolution Failure
Your Wi-Fi connection appears to be working as expected, but your Mac is unable to resolve "www.apple.com" using the DNS settings provided by your Internet Services Provider (IPS).
Contact your Internet Service Provider (IPS) for further assistance. Blah blah blah blah...
Now, I know I'm a wi-fi newbie, and am pretty ignorant of most of it's workings, but I really don't see how that could be the problem. I went to System Preferences > Network > Advanced > DNS on BOTH the iMac and the Macbook, and they BOTH have the EXACT SAME number there. So it seems to me that if the Macbook can connect with that number, and the iMac can't, then that couldn't be a DNS problem -- it has to be some other problem with the iMac, right?
Am I wrong here? Anybody have any ideas what the problem could be?
iMac Line (2012 and Later)