question about one name resolves to 2 IPs

Cooky

Golden Member
Apr 2, 2002
1,408
0
76
I was using PING to test my connectivity on 2 machines connected to the same router on the same home network. Pinging yahoo.com on machine1 gives me 66.218.71.198 and doing the same on machine2 gives me 64.58.79.230.
Nslookup tells me yahoo.com resolves to the 2 IPs and my Question Is:

1) How come no matter how many times I ping, machine1 always resolves the name to one particular IP (66.218.71.198) and machine2 always resolves to the other (64.58.79.230)?? Shouldn't they be using the same DNS server from my ISP?? How does the DNS decide which IP to resolve to??

2) From the look of the ping result on machine1 it takes longer (120ms) versus 30ms on machine2 does that mean yahoo.com has 2 servers at 2 different geographical locations?? (like one's on East and the other's on West coast) The 2 machines have different NICs but normally machine1 is faster when browsing the web but in this case it has slower response so I doubt it has something to do w/ the hardware on my side.

Any thoughts??
 

randal

Golden Member
Jun 3, 2001
1,890
0
71
Yahoo.com is such a massive site, it has multiple servers hosting it. Each webfarm has to have at least one IP, if not more. That is why you get multiple, different IP addresses on pings.

1) Your machine is caching dns information. It's not actually looking up the address every time you type in "ping yahoo.com" -- it's pulling the IP address from it's store and using that. If you're on win2k, at a prompt, type "ipconfig /flushdns" to clear your cache, then try pinging again and see if it's different. lather, rinse, repeat.

2) Yes, almost certainly different locations / networks.

Cheers,
randal