from the wonderful said:
Hi,
Thank you, I can ping the PC now by name.
Could you tell why I can ping others PCs by name even they are not listed in
the hosts file except this PC?
Someone on the network has to be responsible for assigning IP addresses
and managing the names/IP address translation. On most networks there is
a DHCP server (often a router/switch, sometimes a server PC) that does
that job. If the errant PC is not getting it's IP address from the DHCP
server the same way as the others are, then maybe the IP address has not
been cached (against a host name) properly.
You could try (from a CMD window) ipconfig /all for a couple of PCs and
see if they have the same settings (obviously the IP address should be
different, but the rest should match). You could also try ipconfig
/renew on the 'errant' PC (that's the one that you can't see) and see if
that fixes the problem. Sometimes it seems to come down to 'who rebooted
last', especially if a PC stays up while the DHCP server/router gets
reset.
You should not =have= to list a PC in the Hosts file, although that's a
good quick fix if nothing else seems to work.