Solved

Cannot ping by hostname

Posted on 2011-02-13
17
1,316 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
Comment Utility
try running this first...

ipconfig /flushdns

then ping again...
0
 
LVL 12

Expert Comment

by:Alan3285
Comment Utility
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
Comment Utility
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
 

Author Comment

by:smith1974
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:smith1974
Comment Utility
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
Comment Utility
Then register fixed the problem...
0
 

Author Comment

by:smith1974
Comment Utility
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
Comment Utility
yup...
0
 
LVL 12

Expert Comment

by:Alan3285
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
...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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now