Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 503
  • Last Modified:

Ping -s resolves wrong name

Hi,
When I do ping -a 192.168.xxx.xxx, it is giving a wrong name than the actual machine name for some machines. Could somebody please point where I need to correct this?
0
arsmed840
Asked:
arsmed840
3 Solutions
 
woolmilkporcCommented:
Hi,
Examine your /etc/hosts file or your Name Server
Wmp
0
 
arsmed840Author Commented:
Hi eoolmilkporc,
on both the name servers this is what I have in /etc/hosts.I am not sure where else its coming from

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
0
 
Hypercat (Deb)Commented:
If it's not in a HOSTS file, then it's probably a HOST record on your DNS server with the wrong host name registered for that IP address.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Hypercat (Deb)Commented:
Or, actually, since you're using ping -a, it's probably a PTR (rDNS) record, not a HOST record.
0
 
mpeacockbcCommented:
are you on a domain? if so, you could have some old entries in the DNS server that are not being cleared out or updated properly when the IP address is assigned to another machine via DHCP.
0
 
woolmilkporcCommented:
/etc/hosts is only used for resolving hostnames locally. So the only relevant /etc/hosts file is the one located at the machine you issue the ping -a from. What's in this file?
 Name server configuration is not done via /etc/hosts, but with separate tables on central server(s), as hypercat wrote above.
 
 But (I should have asked before): What do you mean with 'wrong name' and 'actual machine name'?
 
 The name resolved by ping -a (or host, or nslookup) has nothing to do with the 'hostname' or the 'nodename' of the machine, as obtained by 'hostname' or 'uname -n' respectively.
 
As I wrote, the network name (ping -a etc.) comes from /etc/hosts or DNS and must be altered there, while hostname and nodename are settings internal to the machine, and can be altered via 'hostname [name]' or 'uname -S [name]' resp.


0
 
hau_itCommented:
The most usual thing is that you have records in yous dns database that are old.
Try to find these records and delete them.
Also enable the scavenging option, that deletes old records automatically
0
 
sifueditionCommented:
Also, be sure to check the LMHOSTS file on the machine that is resolving the wrong name.
0
 
qualchoice-itCommented:
From the box your doing the ping -a run these commands first

ipconfig /flushdns

ipconfig /registerdns

nbtstat -R
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Building an Effective Phishing Protection Program

Join Director of Product Management Todd OBoyle on April 26th as he covers the key elements of a phishing protection program. Whether you’re an old hat at phishing education or considering starting a program -- we'll discuss critical components that should be in any program.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now