Solved

Cannot ping by hostname

Posted on 2011-02-13
17
1,332 Views
Last Modified: 2012-05-11
Hi

I am running Windows 2008 Server with AD DNS (2008 as well).

I have a machine, machine1.domain.com which was working fine. I could ping via IP and hostname.

Suddenly, I can't ping by hostname, only IP.

Will running ipconfig/registerdns on my machine fix this, or is it an entry that needs to be done on the DNS server side?

Also, does Dynamic DNS updating fit into this (which we have enabled)?
0
Comment
Question by:smith1974
  • 6
  • 5
  • 5
  • +1
17 Comments
 
LVL 7

Expert Comment

by:Cuteadder
ID: 34883980
try running this first...

ipconfig /flushdns

then ping again...
0
 
LVL 12

Expert Comment

by:Alan3285
ID: 34884146
Can you ping by hostname from another machine (not the hostname machine itself)?

If so, then the issue is likely on your machine, if not, then the issue is likely with your DNS server, and we can diagnose methodically.

Thanks,

Alan.
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 34884158
Please run on that DC in command-line

dcdiag /test:dns >c:\dcdiag.txt

and post reults here (attach this file). Maybe somethin wrong with your DNS server?

On that "faulty" client try also:

arp -d *
ipconfig /flushdns
ipconfig /registerdns

and check ping once again.

Regards,
Krzysztof
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:smith1974
ID: 34884508
Hi

To confirm, we couldn't ping machine1.domain.com from any other machine. I did run /flushdns and /registerdns on machine1 too as well as reload the DNS entry in AD.

So I'm not sure which of the two actions fixed it? :(

Basically, if multiiple machines could not ping machine1.domain.com (or machine1) by hostname, would running /registerdns on machine1 actually have resolved the issue? I would have thought this was related to the actual DNS system.

What does /registerdns actually do? Register a new record with the DNS server?
0
 
LVL 7

Accepted Solution

by:
Cuteadder earned 250 total points
ID: 34884563
registerdns makes sure the dns server knows what ip address the local computer is on...
flushdns flushes the dns on the local computer and makes sure the local computer asks the server for the address...

but as long as its fixed...
0
 
LVL 12

Expert Comment

by:Alan3285
ID: 34884569
I can't see how registerdns would have fixed it on anything other than that local machine, so the issue must have been in the DNS / AD Server.

Glad its all okay now.

Alan.
0
 

Author Comment

by:smith1974
ID: 34884594
Yep, it's fixed, but I'm interested to know what the fix was :)

Does /registerdns command on the local machine re-register the entry with the DNS server? If so, could this have fixed it in case the entry on the DNS server was corrupt/someone accidentally deleted it?

Or does /registerdns mean that the client (i.e. machine1) just pulls down the latest info from the DNS server for its local cache?

I've tried to read on the Internet what /registerdns actually does but there doesn't seem to be much info.

Thanks all!
0
 
LVL 7

Expert Comment

by:Cuteadder
ID: 34884613
if the computer you are trying to ping is on a dhcp ip address, the chance is that the computer you were pinging from cached the ip address of the other computer at the same time the computer you were pinging changed ip address...

which meant when you pinged the computer you were actually pinging the old ip address...

to the same extent, computers do time from time lose there register with the dns server....
0
 

Author Comment

by:smith1974
ID: 34884628
Thanks cuteadder, but when I was having the problem and trying to ping machine1.domain.com, it wasn't coming back with an invalid address - it was saying that there was no host named machine1.domain.com at all!
0
 
LVL 7

Expert Comment

by:Cuteadder
ID: 34884661
Then register fixed the problem...
0
 

Author Comment

by:smith1974
ID: 34884683
So does /registerdns command on the local machine re-register the entry with the DNS server? This would explain how other clients could suddenly ping it again by hostname?

0
 
LVL 7

Expert Comment

by:Cuteadder
ID: 34884708
yup...
0
 
LVL 12

Expert Comment

by:Alan3285
ID: 34884712
Hi Smith1974,

My understanding is that /registerdns does the following two things:

1) Refreshes all the DHCP address leases on the machine - basically asks the DHCP server to renew its leases on the IP addresses it is using

2) Registers all related DNS names configured and used by the machine - bascially says I am using these names, so please record that they are mine (and, I would guess, warn if some other machine is using the same name - just guessing on that one, but it would be easy to test if you want to be sure).

HTH,

Alan.
0
 
LVL 12

Expert Comment

by:Alan3285
ID: 34884842
Hi Smith1974,

Upon reflection, you are right - flushdns *could* have fixed that problem I think (assuming you ran flushdns on the machine that cuold not be pinged as opposed to the machine that could not get a response to its ping).

Doesn't mean it *was* the solutions - whatever you did on the server might have done it too of course.

Perhaps next time (if there is one) you see this issue, try doing just the flushdns, see if that works, and if not, do the server side things again and check.

HTH,

Alan.
0
 

Author Comment

by:smith1974
ID: 34886121
Hi Alan

Do you mean flusdns or registerdns? I thought flushdns just deletes the local DNS cache - nothing to do with the server...whereas registerdns means that machine1 re-registered itself with the DNS server.

Which also leads to the question - do we ever need to manually create DNS records in DNS in that case? Can we just run /registerdns from the client?
0
 

Author Comment

by:smith1974
ID: 34886127
...and how would that DNS record for machine1 have been lost in the first place? Is this not uncommon?
0
 
LVL 12

Assisted Solution

by:Alan3285
Alan3285 earned 250 total points
ID: 34886715
Hi Smith1974,

I did mean registerdns - typo on my part - sorry!

Creating records in DNS gives to central control, and stops the 'anarchy' of each local machine havnig whatever name the admin(s) on that machine might want to give it.  You can do it via /registerdns though, and if you are the sole admin, then it wouldn't be out of control of course!

I have no idea how your DNS server could have lost that particular record at that time.  Is it possible that someone 'flushed' out all the DNS records on there?  Are you the only admin?

Alan.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

786 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