Missing hosts file, devices not resolving to correct IP addresses

Posted on 2013-09-04
Medium Priority
Last Modified: 2013-09-23
We have a peer-to-peer network of 7 PCs. 6 are running Windows 7, one is running Windows XP. We have a ZyXel PK501Z modem/router. I know just enough about networking to get by - so please bear with my limited knowledge.

I have an accounting program that has the accounting database stored on one PC, called officemgr-pc. It is accessed on the officemgr-pc and also from my laptop (jodylptp). jodylptp wasn't able to access the database last week. The accounting program's tech support discovered that I didn't have a hosts file in c:\windows\system32\drivers\etc.

According to my router/modem, the officemgr-pc has been assigned an IP address of But when I ping officemgr-pc from my laptop, it is pinging a very different address - something like These pings all time out in error. I tried pinging other PCs in the office (i.e., matt-pc) and had the same result. I can ping

We created a new hosts file that resolves officemgr-pc to This fixes the problem with the accounting program. But this is only a temporary fix, as the router may assign officemgr-pc a different IP address tomorrow.

We also have had on and off issues with our Xerox ColorQube 9203's scan-to-e-mail feature. Sometimes it works, sometimes it doesn't. Xerox says everything is correct on their end and points to our ISP as the culprit. Our ISP says everything is correct on their end and points to Xerox. Now I'm wondering if the issue described above is responsible for the problem.

My questions are:
Why would I not have had a hosts file?
How does the hosts file get updated, and why doesn't it have all of the PC names from our network in there?
Isn't there another "service" that should be resolving these PC names to IP addresses? Shouldn't our router handle that?

Any help is greatly appreciated. Thanks!
Question by:lyonski
  • 6
  • 5
  • 2

Accepted Solution

BigPapaGotti earned 750 total points
ID: 39464128
More than likely the hosts file was either deleted (accidentally) or removed via malware that was installed on your computer. I would run a scan with Malwarebytes just to be sure you are not infected.

The hosts file will only be updated by you manually opening the file up and typing in the entries. The HOST cache file however will be updated on the fly as you resolve IP addresses to HOSTS. The other machines are not going to be contacted unless the PC tries to browse to it, meaning it will not go out and search automatically for all other computer on the local area network.

The other service you are referencing is DNS that will resolve PC names to IP addresses and vice versa. This would be something you could install on a Windows server. The router will not provide this service. Since your network is so small I find it hard to justify setting up a server for only this purpose. Now if you wanted to migrate DHCP/DNS/File server/Print server to a dedicated server then this would be more justifiable.

My recommendation to you is to setup the router to use DHCP reservations for your Accounting "server" so that it ALWAYS gets the same IP address. Alternatively you could also assign a static IP address to this "server" and use the router's IP address as the default gateway, this would ensure that it never changes on a reboot/power outage. I recommend you do the same thing for the printer. After you have a static IP address configured on the printer or a DHCP reservation assigned to it go ahead and setup the printer on all of the machines and test out your printer to see if you are still having issues with scanning/printing/emailing.

Author Comment

ID: 39464235
BigPapaGotti - we do have a static IP address assigned to the printer. We have always been able to print TO the printer. But the scan-to-e-mail works sporadically.
When you say the "HOST cache file will be updated on the fly as I resolve IP addresses to HOSTS" - how is that done?
Thank you.

Expert Comment

ID: 39464735
What type of e-mail account are you using on the printer? Is it a Gmail account, Exchange account or some other kind? Do you get any error message when this problem occurs? What does the log show of the printer/scanner.

As far as how name resolution goes here is a website that gives a run down on the different ways that this occurs. In summary what your computers are doing on your LAN to resolve hostnames to IP addresses is that it is using a NetBIOS broadcast asking who has the name "Computer1" all computers will receive it and then when "Computer1" receives the broadcast it replies with it's IP address saying "I am Computer1 and my IP address is 192.168.1.XXX" From there the original sender of this broadcast will cache the IP address relating to this hostname for future use.

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.


Author Comment

ID: 39464868
It is using Xerox@creativelaminatesinc.com. It goes through our ISP CenturyTel.net. No error message or error log is produced at the printer/scanner. Everything appears to work, but the e-mail is never received from the printer/scanner.

Expert Comment

ID: 39465056
I know this may be a silly comment and question to ask but I have to ask it just to be sure. Are the users certain they are entering in the correct e-mail address when sending a test e-mail. Does it randomly happen to different users or is it the same user by chance?

Author Comment

ID: 39465989
Not a silly question at all. The e-mail addresses are saved in a list in the copier. So we select a name from the list to send to. It happens to all users equally. When I say that it works sporadically, it may work from 7 am-11 am, then not work for the rest of the day. Then it may not work again until the following afternoon. When it's not working for one user, it's not working for any users. When it works for one, it works for all.
I always send to both my work address and my personal address, to rule out the question as to whether there is an issue with a given e-mail server.

Expert Comment

ID: 39466032
Is the smtp server settings setup to use authentication? Does there seem to be any relationship between the amount of emails being sent at a given time before it stops working. What I am wondering is if the email server or the imap is for some reason b locking these emails from being sent because of a quota or limit being reached. I would think if the ISP was to blame it would block outgoing emails entirely and it would not work at all.

Did you happen to have the ISP or whoever handles your email server on the phone at the time is not working to see if they can monitor the log in real time to see if they are even getting the traffic

Author Comment

ID: 39466082
Yes, the smtp server is setup to use authentication. I haven't noticed any relationship between the amount of e-mails being sent before it stops working. And we don't lose the ability to send and receive e-mails from any PCs. We just lose the e-mails that are being sent from the scanner.
I have had the ISP on the phone when it's not working. I have not asked them to monitor anything, and they haven't come up with that idea. What specifically would I ask them to monitor in real time? Is there a specific command that I should ask them to run?
Here's the other thing that's weird. I can access the Xerox through a browser. From there, I can test the settings. A test e-mail is sent. That e-mail comes through regardless of whether or not our scan to e-mail feature is working.
LVL 17

Assisted Solution

vivigatt earned 750 total points
ID: 39466628
Basically you do have a name resolution problem.
Name resolution means finding the IP address that is associated with a host name.
When using Windows, there are several mechanism used for name resolution.
DNS resolution, is one of them, but not the only one. If DNS resolution fails, Windows ca, use several other mechanisms: WINS resolution and broadcast resolution.
Check this article:
It is an old one, but as far as I can tell, the mechanisms are still the same with Windows 7.
What you want to make sure is that your windows hosts are set to use the correct method first.
Read this article:
It describes name resolution AND node types.
Now you should have a pretty good picture of what is going on.
You just miss one thing:
Some ISP thought that it would be smart to always resolve DNS queries and, in case a query is send and does not resolve (unexisting host), they send an IP address of their own and a web browser would typically land to a page on said IP address that tells the user that the host was not found. But if you use something else than a web browser (say a client/server accounting solution that requires a client to locally connect to a PC running a database software) and the DNS name resolution for the client to contact the "server" does not fail, it will try to connect to the ISP's host. Fail !

Now for your config, I would use static IP addresses instead of relying on  the router DHCP service to assign IP addresses to hosts.
Make sure that the IP addresses you select for your local nodes (including printers) are outside the router DHCP addresses range.
When you have all the nodes using static IP addresses, create hosts and lmhosts files, copy them to each host.

Some resources:

Hope this helps

Expert Comment

ID: 39467604
I would ask the ISP to check the logs of the mail server you are setup to use. You will likely need to provide them with the SMTP server that you are using as well as the username and password so they can check the appropriate log file. What will help in troubleshooting this issue will be to have specific e-mails for them to try and trace. This information will include the following:

- Exact Date and PRECISE time at which the e-mail was sent.
- The From Address used to send the e-mail.
- The To Address that the email was sent to.

What is strange is that you are able to send a test e-mail without any issues when the problem occurs but other e-mails are unable to be sent. Are the files you are trying to scan and e-mail very large? How many pages are being scanned when the issue pops up and does this include black and white or color pages?

I've seen before that a small little graphic in the corner of the page that is trying be sent cause the file size to be increased drastically. As a result the e-mail was never received and the e-mail server simply dropped the email without logging it. Once I reduced the number of pages being scanned and sent I was able to narrow down the issue to the size of the files being sent and the attachment limit which may be what you are running into now.

Author Comment

ID: 39467914
I will ask them to do the trace.
I tried scanning a single sheet today with all text - no graphics - and it didn't come through. So file size is a good suggestion to consider, but that doesn't appear to be the issue.
LVL 17

Expert Comment

ID: 39468338
There are two separate questions actually:
1/ LOCAL Host names resolution not working
2/ scan-to-email not working

We should address them separately, I don't think they are related (unless you have a local smtp server, which I doubt).

Author Comment

ID: 39472439
Vivigatt you are correct - I do not have a local smtp server.
I realize now that these are two separate issues. I just threw in the issues with "scan-to-email" not working, thinking that they might be related. But yesterday we setup the printer/scanner to use gmail's outgoing server, and that seemed to solve the issue - we'll see if it continues to work - if it does then we know our ISP is the culprit for the scan-to-email issue.
I don't have time to digest all of the suggested links tonight. But thank you for providing those. I am interested in better understanding name resolution. I'll read those, try your suggestions and post back next week.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Network ports are the threads that hold network communication together. They are an essential part of networking that can be easily ignore or misunderstood, my goals is to show those who don't have a strong network foundation how network ports opera…
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

586 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