• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 657
  • Last Modified:

All entries of a long LMHOSTS files are not loaded

Hi Guys,

I have a very long LMHOSTS file. This was always working fine until we got too many entries in there. Apparently, the remaining entries after the 1000th entry are not read or loaded. This behaviour is the same on NT4, Windows 2000 or Windows 2003 servers.

I have seen something in the MS Technet saying that depending of the performance of the server, 1000 entries of the LMHOSTS file could be parsed before some kind of timeout. But what I cannot find in the MS Technet is a way (registry or something else) to increase that timeout or to force the OS to read the complete LMHOSTS file.

Does someone have an idea, an answer and a solution for me?

Greg
0
scainfra
Asked:
scainfra
  • 3
  • 3
  • 2
  • +3
1 Solution
 
JohnGerhardtCommented:
I think you best option would be to get a DNS server running on your network...!
or at least WINS.
Hope this helps.
0
 
oBdACommented:
Forgive me, but I have to ask: Why would you have the need for an lmhosts file with more than 1000 entries?
Are you using a WINS server, and if yes, why still the lmhosts file, and if no, why not?
0
 
CompassITCommented:
I am assuming that you have Active Directory domain which means you already have a DNS server configured. Hopefully you are using 2000/2003 DNS and not NT40. NT 40 you will have to manually enter IP addresses or you must import your lmhost files. 2000/2003 DNS is dynamic. Just make sure that you have set your DNS forward lookup zone(s) properties  to allow dynamic updates. Furhter you need to set all your client machines  ip properties to point to the IP of your server running DNS. This will eliminate the need for lmhost files.

I would suggest using DHCP in conjucntions with the previously mentioned services. Ensure that all non server machines are set to obtained dynamic ip addresses. All you need to do is configure your DHCP servers scope options to provide your clients all IP info which will include  DNS server(s) addresses including domain search suffix e.g. mobil.com and to provide the clients with wins server(s) ip addresses if you are going to use wins and also include your router(gateway)address.

Make sure you have setup your Wins server(s) before activating your DHCP scope. You will also need to authorize your DHCP server in AD by opening DHCP console once installed and right clicking your server and selecting Authorise. If you don't do this your DHCP will never hand IP addresses. Your DHCP server will provide all your clients with unique IP addresses + Wins server addresses + DNS server information and register all your client information with your DNS server if you are using 2000/2003 DNS. You will know be able to fully communicate with other clients withou lmhost files. Just make sure your servers are configured with static ip's, and that they are configured with a static wins server ip address .Furhter  exclude your servers IP addresses from the range that your DHCP server will hand out.

If you need more detail on how to best setup these technologies please just shout!!!
0
Independent Software Vendors: 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!

 
lightningstalkerCommented:
Maybe changing your registry size could help since some things are loaded into that memory space.

right click on my computer>properties>advanced>performance options>look down at registry size.
0
 
scainfraAuthor Commented:
Hi Guys,

First, thanks for your quick reaction!

Yes, I know it is a bit wird to have a LMHOSTS file containing more than 1000 entries...

To clarify a bit our situation, I would like to explain what we have today.
We have a very large network and we are currently migrating from NT4 legacy domains to 1 single Active Directory domain with DNS and WINS enabled.
But, in the past we had WINS servers spread per country or even per site and now we are also migrating to a central WINS server solution. As a fall back solution (if the central WINS servers are not available), we built this big LMHOSTS file. This big LMHOSTS file is also used for name resolution during the step by step migration of our NT4 domains.

So, you can see we need that big LMHOSTS file for migration and fall back reasons...

I am sure there should be a solution to force the computers to read that big LMHOSTS file completely, but I can't find it...:-(((

Please, help me guys!

Greg
0
 
CompassITCommented:
All your legacy clients can use DNS and it really becomes a pain having to maintain lmhost files, but if this is the way you guy's intend doing it I suppose who am I to question your actions. Best of luck with the migration. :-)

Regards
0
 
scainfraAuthor Commented:
Yes, I know we can use DNS and/or WINS. And we have that also.

But we need that LMHOSTS functionality...

Apparently nobody can help...:-(((

Greg
0
 
CompassITCommented:
You can use multilple lmhost files by using the following inclusions in your lmhost files.

BEGIN_ALTERNATE
INCLUDE \\localsrv\public\lmhosts
INCLUDE \\rhino\public\lmhosts
END_ALTERNATE

Hope this helps

Regards :-))))
0
 
Leandro IaconoSenior Premier Field EngineerCommented:
I would recomend 2 things in your Case.

1. Default Node Type which can be:

b-node, p-node, m-node, h-node

Depending on the Node Type, what The lmhost Client Will do:

Refer to this site for more information:

http://support.microsoft.com/default.aspx?scid=kb;en-us;160177

And 2.

I would recomend perhaps including a #PRE statment before any important address in your lmhost file. You are limited to a max of 100 - but you can change that.

Go to this article under the title (Adding Remote System Names by Using #PRE)

http://www.microsoft.com/technet/archive/winntas/support/sur_lmh.mspx

You can preload more address as to make the name address resolving process a bit more succesfull.

You should also "nbtstat -R" all your computers to refresh your PC's cache with any new addresses ...

So in conclusion, setting Node Types on your PC along with #PRE statements could force your PC's to read your whole LMHOST file ... Even though it should do so by defualt anyways ... right? LOL

But again, LMhost file is only used for about 200 entrys max??? ... I really don't know but if you have 1000 entrys you should really consider getting in that DNS or WINS Server ASAP ...

Cheers,

Hope I helped out.
0
 
Leandro IaconoSenior Premier Field EngineerCommented:
I hope my response helped him out ...
0
 
Leandro IaconoSenior Premier Field EngineerCommented:
Thanks!
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!

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