How do I refresh or view a list of hostname associating with IP-address?

I am connecting to another computer say "User2" in y network. Its original IP address is say 123.123.123.123

Then, I changed User2 IP address to say 123.123.123.124, any other IP address.
When I type: ping User2 (in command promt)
it is still ping to 123.123.123.123
it is taking quite a while before it refresh to the new IP address.

Is there a way that I can refresh the hostname that is associating to that IP-address in my computer?
Is there any command that I can use to view all the computers that are connected to the network with their latest IP-adress?

thanks.

oldbAsked:
Who is Participating?
 
Bill BachConnect With a Mentor PresidentCommented:
The HOSTS file is simpler, so let's do that first.  On Windows XP, it is C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS.  (Note that this file has NO extension, so if you use NotePad, be sure to NOT save it with a TXT extension.)   This provides the FIRST level of name resolution (i.e. BEFORE DNS).   HOSTS files are easy to set up and maintain (simply follow the guidelines in the samples), but are static and must be maintained on EVERY workstation.  For the smallest networks, this works out the best.

For larger networks, HOSTS files are too cumbersome, so another naming convention, such as WINS or DNS is used.  DNS services come in all of the Windows server-class operating systems, as well as NetWare and Linux boxes.  (In other words, XP doesn't have a DNS service.)  Additionally, many firewalls also contain a DNS server.

Each DNS service is configured differently (some with text files, some with GUI utilities), so your first task is to locate which DNS server you are using.  From the workstation, enter "IPCONFIG /ALL" and look for a line like this:
   DNS Servers . . . . . . . . . . . : 192.168.1.11
In this case, the DNS server can be found at this address.  Figure out which machine this is, and it should have a DNS server on it.

Of course, if you are using DHCP to allocate IP addresses, then each workstation can get a new address each time it boots up, so a static DNS or HOSTS files will be outdated almost immediately.  If you are using a static naming system, then you'll also want to configure static IP address, too.  Again, this works well for small networks, but can be a maintenance nightmare for larger ones.
0
 
Bill BachPresidentCommented:
This "refresh" usually happens automatically.  It is partially handled by the WINS or DNS server on the network (that is handing out the address initially), and partially handled by the local client, which has a DNS cache.

To refresh the DNS server from the box immediately after you change the IP address, you can use the command IPCONFIG /REGISTERDNS.  For most systems using dynamic DNS, this should update the server's table of IP addresses and names.

The other side of the equation is also important (i.e. the box doing the PING, not the one receiving the PING).  To clear out the DNS cache on a Windows box, use the command IPCONFIG /FLUSHDNS.  

Of course, if you have a static DNS entry, then the first item won't work, as you'll need to manually update the DNS tables.  And, if you're using a HOSTS file, the second won't work either, and you'll have to manually update THAT table.


0
 
oldbAuthor Commented:
I tried IPCONFIG /registerDNS and IPCONFIG / FLUSHDNS, they dont work.
I have a statis DNS entry, so the first dont work.
How do I manually update the DNS tables? where is it?
How do I know I am using a HOSTS file?
thanks
0
All Courses

From novice to tech pro — start learning today.