Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Ping -s resolves wrong name

Posted on 2009-04-14
9
Medium Priority
?
500 Views
Last Modified: 2012-06-27
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
Comment
Question by:arsmed840
9 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24140651
Hi,
Examine your /etc/hosts file or your Name Server
Wmp
0
 

Author Comment

by:arsmed840
ID: 24140743
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
 
LVL 38

Assisted Solution

by:Hypercat (Deb)
Hypercat (Deb) earned 300 total points
ID: 24141010
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 38

Expert Comment

by:Hypercat (Deb)
ID: 24141013
Or, actually, since you're using ping -a, it's probably a PTR (rDNS) record, not a HOST record.
0
 
LVL 1

Assisted Solution

by:mpeacockbc
mpeacockbc earned 75 total points
ID: 24141168
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
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 375 total points
ID: 24141178
/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
 
LVL 7

Expert Comment

by:hau_it
ID: 24145687
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
 
LVL 6

Expert Comment

by:sifuedition
ID: 24172333
Also, be sure to check the LMHOSTS file on the machine that is resolving the wrong name.
0
 
LVL 3

Expert Comment

by:qualchoice-it
ID: 24180514
From the box your doing the ping -a run these commands first

ipconfig /flushdns

ipconfig /registerdns

nbtstat -R
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question