Announcement

Collapse
No announcement yet.

How to replace Host files entries on desktops with DNS configuration

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to replace Host files entries on desktops with DNS configuration

    Hi,
    Our company has gone through a major change and thus we have to make some changes in the host files of individual desktop across the company to access certain site located across various Servers within our company. I have changed the host file on one desktop and found that it is working fine.

    Host file entry looks as shown below
    10.30.10.5 intranet.apnim.co.nz
    202.89.46.205 development.apndata.co.nz
    202.89.46.205 development.apnfindaservices.co.nz

    Our vendors has installed a new Win 2003 Std Server and DNS integrated Active Directory. Our DNS has been configured by our vendor with forwarder to the ISP's address for all external DNS queries.

    Can we make suitable entries on the DNS Server so that I do not have to make changes on the host files on individual desktops across the organization ?

    If this can be done, I would request someone to kindly help me on this as I am new to DNS configuration.

    Thanks in advance.

    PB

  • #2
    Re: How to replace Host files entries on desktops with DNS configuration

    Why not script it.

    Create a script that will

    a. Rename the exisitng hosts file.
    b. Copy a new hosts file (The one you have created) to the machine.

    Wouldn't be too hard to do.

    Comment


    • #3
      Re: How to replace Host files entries on desktops with DNS configuration

      Hi wullieb1

      I was reading posting in different forums where people mentioned how to configure the DNS for an intranet and thinking in those terms.

      Yesterday I read in one of the forums that in the DNS if you create a A Record and point it to the intranet we do not require to edit the host files on the desktops. That means in our case I need to create a A Record as :

      10.30.10.5 intranet.apnim.co.nz.

      Do you think it would work ?

      However, your idea of writing a script to modify the host files are great. To be honest it did not click into my mind at all.

      Many thanks.

      Pankajb

      Comment


      • #4
        Re: How to replace Host files entries on desktops with DNS configuration

        That would also work.

        You would need to create a new zone for the apnim.co.nz (unless your domain name is that)

        If it is that then all you need to do is create a new 'A' record called intranet and sit it inside your exisitng zone.

        Comment


        • #5
          Re: How to replace Host files entries on desktops with DNS configuration

          Once he has added these records to his DNS setup, would he have to erase those entries in the client PCs HOSTS files? Or, what would happen if one was different from the other, would Hosts take priority or the entries in DNS?
          Best wishes,
          PaulH.
          MCP:Server 2003; MCITP:Server 2008; MCTS: SBS2008

          Comment


          • #6
            Re: How to replace Host files entries on desktops with DNS configuration

            Originally posted by PaulH View Post
            Once he has added these records to his DNS setup, would he have to erase those entries in the client PCs HOSTS files? Or, what would happen if one was different from the other, would Hosts take priority or the entries in DNS?
            Yes unfortunately the entries would need replaced.

            This is the reason i despise using a HOSTS file for anything.

            Comment


            • #7
              Re: How to replace Host files entries on desktops with DNS configuration

              Hi,
              Many thanks to wullieb1 for all his suggestions.

              Thanks to PaulH for his comments.

              Reading the conversation between PaulH and Wullieb1, may I ask for another clarification.

              Quote:
              ----------------------------------------------------------------------------------------------------
              Originally Posted by wullieb1
              Yes unfortunately the entries would need replaced.

              This is the reason i despise using a HOSTS file for anything.

              ------------------------------------------------------------------------------------------------------

              At this stage my host files on the desktops have default entries.

              Wouldn't it be easier to make entries on the DNS with steps suggested by wullieb1. Then I do not have to deal with editing the host files at all. Everytime, I need to make any amendment, I can make changes in the DNS.

              Wullieb1 must be thinking in long terms. There must be more advantage on sticking to editing of host files than making DNS entries. Could you kindly throw some light on that if possible.

              Regards,

              Pankajb

              Comment


              • #8
                Re: How to replace Host files entries on desktops with DNS configuration

                Originally posted by pankajb View Post
                Hi,
                Many thanks to wullieb1 for all his suggestions.

                Thanks to PaulH for his comments.

                Reading the conversation between PaulH and Wullieb1, may I ask for another clarification.

                Quote:
                ----------------------------------------------------------------------------------------------------
                Originally Posted by wullieb1
                Yes unfortunately the entries would need replaced.

                This is the reason i despise using a HOSTS file for anything.

                ------------------------------------------------------------------------------------------------------

                At this stage my host files on the desktops have default entries.

                Wouldn't it be easier to make entries on the DNS with steps suggested by wullieb1. Then I do not have to deal with editing the host files at all. Everytime, I need to make any amendment, I can make changes in the DNS.

                Wullieb1 must be thinking in long terms. There must be more advantage on sticking to editing of host files than making DNS entries. Could you kindly throw some light on that if possible.

                Regards,

                Pankajb
                So you have the following entries in your HOSTS file??

                Code:
                10.30.10.5 intranet.apnim.co.nz
                202.89.46.205 development.apndata.co.nz
                202.89.46.205 development.apnfindaservices.co.nz
                And you need to change the current hosts file to something else, actually deleting the entries??

                You need to understand that there is a specific order in which the client machine does host name resolution.

                1. Checks to see if name is its own.
                2. Checks HOSTS file
                3. Checks DNS Servers
                4. If none of the above work then NETBIOS resolution takes over.

                See here for more info.

                http://support.microsoft.com/kb/172218

                So in your case you are still going to have to replace all the HOSTS file regardless of whether you change to DNS or not.

                I would recommend that you create the DNS entries and delete the exisitng HOSTS file and replace it with a blank one.

                Comment


                • #9
                  Re: How to replace Host files entries on desktops with DNS configuration

                  Hi wullieb1,
                  Thanks a million for your wonderful clarification on the host name resolution and also for your recommendation.


                  Regards,

                  Pankajb

                  Comment


                  • #10
                    Re: How to replace Host files entries on desktops with DNS configuration

                    Originally posted by pankajb View Post
                    Hi wullieb1,
                    Thanks a million for your wonderful clarification on the host name resolution and also for your recommendation.


                    Regards,

                    Pankajb
                    No problem.

                    If you need any more help then don't hesitate to ask.

                    Comment

                    Working...
                    X