Link to home
Start Free TrialLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

I can ping by IPaddress but not by Hostname

I can ping by IPaddress but not by Hostname

I have a computer that I can ping by IP address, but I cannot ping it by host name.

The computer IP address is obtained via DHCP.
 if I ping IP address using -a , I can obtain Hostanme

When using NSlookup computername , I get the:
Name: computername.domainname.

when using Nslookup Ipaddress, I get the:

Name: computername.domainname.
Address: IP address

Any idea why I cannot ping by Hostname ?

Thank you
Avatar of footech
footech
Flag of United States of America image

Sounds like the PTR record doesn't match up with the A record (the A record is incorrect).  Delete the A record and create a new one.
Avatar of TMGpro01
TMGpro01

You can also try to use a command prompt (Run as Administrator) on the workstation that is trying to ping the hostname. You can do the following commands in order to clear the dns registry and reset it.

ipconfig /flushdns

ipconfig /registerdns

ping -t computername

If this clears it up the DNS registrar on your workstation was incorrect or not updating. Doing this will force a clean slate. If this does not clear it up the DNS Record needs to be looked at as Footech suggested.

Good luck!
Avatar of jskfan

ASKER

TMGpro01

It did not work

The remote computer is a VM in the DMZ, I can login to it through VSphere Client, or through RDP while entering IP address.

From my workstation

if I ping IP address using -a , I can obtain the Hostname

When using NSlookup computername , I get the:
Name: computername.domainname.

when using Nslookup Ipaddress, I get the:

Name: computername.domainname.
Address: IP address
I would look at your DNS records to make sure they aren't pointing to a different direction. Another place you can check, but rarely is used anymore, is the HOST file on the computer you are trying to reach it on, the location for this file is listed below. Any entries in this file overrides any other record as the HOST file, while not really used anymore, is the Trump all location for IP-Hostname resolution.

c:\Windows\System32\Drivers\etc\hosts

You may have to show hidden items on this if you don't see it there. Just open it up in notepad and see if any entries exist for the IP address you are trying to ping.
Avatar of jskfan

ASKER

I checked the host file , nothing there.

DNS records look good as  Nslookup responds properly , as you can see on my post above.

Firewall on the remote computer is off
was just wondering if the DMZ can block the Ping by name but not by IP
Your nslookup results are incomplete so they aren't of much use.  Copying and pasting the same information from your original question also doesn't add anything.

An nslookup command of the hostname will return the IP (if there's a record, otherwise will say "non-existent domain").  Sample results:
c:\temp>nslookup srv1
Server:  dc01.company.com
Address:  10.10.0.10

Name:    srv1.company.com
Address:  10.10.0.40

Open in new window


A firewall has no knowledge of whether you're trying to ping by name or IP.
Avatar of jskfan

ASKER

NSlookup is giving complete results by IP

C:\>nslookup 10.60.0.188
Server:  DNSServer.Domainname.local
Address:  10.60.0.70

Name:    Remotecomputer.Domainname.local
Address:  10.60.0.188

Open in new window

Avatar of jskfan

ASKER

NSlookup by hostname, is listing the hostname, but it is supposed to also to list the IP address right below the hostname

C:\>nslookup  Remotecomputer
Server:  DNSServer.Domainname.local
Address:  10.60.0.70

Name:    Remotecomputer.Domainname.local

Open in new window

Avatar of jskfan

ASKER

reverse Ping is listing the hostname and responding properly


C:\>ping -a 10.60.0.188

Pinging Remotecomputer.Domainname.local [10.60.0.188] with 32 bytes of data
a:
Reply from 10.60.0.188: bytes=32 time=2ms TTL=123
Reply from 10.60.0.188: bytes=32 time=1ms TTL=123
Reply from 10.60.0.188: bytes=32 time=1ms TTL=123
Reply from 10.60.0.188: bytes=32 time=1ms TTL=123
Ping -a tries to use the PTR to display the name, but it tries to ping the IP even if the PTR is not present or wrong.
Try this command and post back the results please.
nslookup -q=a Remotecomputer

Open in new window

NSlookup by hostname, is listing the hostname, but it is supposed to also to list the IP address right below the hostname
As cited already, there is a missing DNS record. Did you check the DNS record on the DNS server?
Avatar of jskfan

ASKER

As cited already, there is a missing DNS record. Did you check the DNS record on the DNS server?

do you mean A record is missing or PTR record ?
ASKER CERTIFIED SOLUTION
Avatar of masnrock
masnrock
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jskfan

ASKER

will do when I get a chance
Thank you