[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

Ping hostname and IP don't match

I'm having some issues resolving hostnames.  I'm running server 2008 DNS servers.  When I ping a computer name it gives me that computer's ip address, then I ping the ipaddress with the -a switch to confirm the host name and it gives me a different host name for that IP.  I've copied the ping sequence below.  I've flushed the dns cache on my local machine [ipconfig /flushdns]and on the DNS servers as well [dnscmd /clearcache], but I still get the same results.  Any idea what the problem is?  Thanks in advance.


C:\Users\username.domain>ping computer1

Pinging computer1.domain.local [192.168.0.29] with 32 bytes of data:
Reply from 192.168.0.29: bytes=32 time<1ms TTL=128
Reply from 192.168.0.29: bytes=32 time<1ms TTL=128
Reply from 192.168.0.29: bytes=32 time<1ms TTL=128
Reply from 192.168.0.29: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.0.29:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\username.domain>ping -a 192.168.0.29

Pinging computer2.domain.local [192.168.0.29] with 32 bytes of data:
Reply from 192.168.0.29: bytes=32 time=1ms TTL=128
Reply from 192.168.0.29: bytes=32 time<1ms TTL=128
Reply from 192.168.0.29: bytes=32 time<1ms TTL=128
Reply from 192.168.0.29: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.0.29:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms
0
HogRing
Asked:
HogRing
  • 2
1 Solution
 
Sarang TinguriaSr EngineerCommented:
This is due to stale DNS entries in your DNS server  as the scavaging is not enabled in your DNS server
You will need to check on that  PC itself or DHCP server for correct entries and run ipconfig /flushdns and ipconfig /registerdns on the client
0
 
BenNCommented:
DNS uses different record types to perform the two different queries.  

Your first example ping using the the host name causes a DNS query using its A or address record.  It is also known as a forward lookup and is the most common type of query.   The second ping using the IP address calls on DNS to lookup the name using a PTR or pointer record, also known as a reverse lookup.

The A address record and PTR pointer records are independent of each other.  DNS can be set to create or update the PTR record when A record is created or updated.  However it is not required or always done.  It is very easy to have an old PTR record that was never updated.  It is also possible for a destination address to have more than one address record, just like a person could be called John, Jonathan or Johnathan.  A destination could go by different names.  However a PTR pointer record can only point back to one name which could also be cause of the difference.
0
 
HogRingAuthor Commented:
There are different records for the ip 192.168.0.29 in the domain and in the reverse lookup domain.  The reverse lookup domain has the incorrect host name.  I also noticed in the domain itself that there were a lot of individual records that shared the same ip address.  If I enabled scavenging will this fix the issue?  Any down side to enabiling scavenging
0
 
Sarang TinguriaSr EngineerCommented:
Hi

Refer below article and see details on scavanging

http://blogs.technet.com/b/networking/archive/2008/03/19/don-t-be-afraid-of-dns-scavenging-just-be-patient.aspx

and yes that would solve your problem and reoccurance
0

Featured Post

Industry Leaders: 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!

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