XP PC will not look at the hosts file 1st

Posted on 2007-07-27
Last Modified: 2012-05-05
A little test for a Friday Arvo, does anyone have any suggestions for how
I could force an XP pc to look at a Hosts file 1st  (before DNS) for name resolution,
I realise it should do this by default, but it isnt, this problem is driving me bananas,
So any help would be appreciated. Ive already tried manually adding a [DNS]
Set of entries with relevant priority to the System.ini file, but this has brought no joy.

Over to you Gents
Question by:AffinityOB
    LVL 24

    Accepted Solution

    Are you using a proxy server?  If you are, Windows XP will use the proxy and ignore the hosts file...
    LVL 8

    Assisted Solution

    Okay quick question, are you trying the name resolution from IE or from the commandline?  I only ask because I've seen IE6 and 7 both check DNS before the hosts file.  Try the commandline and if you get resolution to the hosts file, try switching browsers.
    LVL 70

    Assisted Solution

    Are you sure is not a cache issue. XP will check the DNS name cache first, it there is an entry in the cache it will use that in preference to either the hosts file or DNS - and remember that unresolved lookups are also cached.

    This means for example that if you perform host name resolution the IP/Host Name is cached locally (and the fact it failed if that is the case)

    if you then subsequently change the hosts file or DNS and then repeat the name resolution it uses the cache - which could give a false result - including an unresolvable name - even though you have chnaged the hosts file and/or DNS

    to clear the cache use
    ipconfig /flushdns
    LVL 44

    Assisted Solution

    Simple -- the same LMHOSTS and HOSTS files needs to be not only on the local PC, but also on the SERVERS and ALL SERVERS that relate to the domain cross subnetting.  Realize, the real value of the HOSTS and LMHOSTS is to provide direct name DNS translation ACROSS subnets, so unless it is gobally available on all key systems for the translation, including all servers and all DNS machines, it wont work.

    Besides, on Friday "ARVO", you are supposed to be having beer, no?
    LVL 1

    Expert Comment

    Forced accept.

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Are end users causing IT problems again?

    You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

    Suggested Solutions

    I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
    A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
    The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
    The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

    779 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

    14 Experts available now in Live!

    Get 1:1 Help Now