Windows 7: Why would I getting a public ip address returned when pinging a machine on my local network?
I have a very small network, only 4 PC's All running windows 7 ultimate I have a new Linksys wireless router which is acting as my DHCP server and I am guessing is my DNS server as well. I assume this because I have nothing else running that could act as a DNS. (I would like to have one of the PC act as a DNS server but I don't think it is possible to have a non-server OS act as a DNS server, or is it?) I have the router handing out a 192.168.1.XXX string and public DNS server addresses which my ISP provided. One of the PC's has a hard coded address, which I am using as a "server”. The odd thing is that when I go to a run command and ping the "servers" name, I get a reply from a public ip address even though the servers has a hard coded IP address of 192.168.1.4? Why would the name of a local machine be resolved into a public ip address?
July 16th, 2010 3:54pm

Most probably your server has a public DNS name and the client that tries to ping the server has the same domain suffix as the server. You can call nslookup servername to check what is queried. I guess that you get something like myserver.publicdomain.net. If you want to ping the lokal adresse try appending a dot (.). That will prevent the DNS client from automaticly appding the domain suffix. Windows will try to resolve the server address by a broadcast. As long as that is not prevented by a firewall it will work. Ralf
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2010 6:07pm

You're correct, your router is probably acting as a local DNS server as well. To test this open a command prompt and type ipconfig /all. Is your router's address showing up where it says DNS servers? As to why your pinging a local machine is resolving to a public address, since its address isn't doled out by the router's DHCP function it's never entered into the router's DNS tables; when the router can't find the address in its own tables, it's forwarding the request to your ISP's DNS servers, which may forward it to another and another... until it's resolved somewhere down the line. There are several ways to resolve this issue; Ralias gave you one, another would be to add your "server's" IP address to each machine's HOSTS file, or you could just let your router give the machine an address through DHCP. You can set up a DHCP reservation on the router using the machine's MAC address so that it gives the same IP address each time. That way the machine's address goes into the router's DNS tables properly.
July 16th, 2010 7:57pm

Thank you both, the adding the servers name to the host file was the best solution for me. Thank you very much for your help
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2010 9:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics