Windows local host entry

Hello,

I don't have DNS server and I would like to resolve host name through %WinDir%\System32\Drivers\Etc\hosts
and put the host name, but it is not resolving it.

I have rebooted the server and it didn't fix.

Any thing else need to do?
mokkanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Larry Struckmeyer MVPCommented:
Can you be more specific?  You have a Windows server?  Any specific reason you don't enable the DNS server role?  Windows domains, even workgroups, really expect there to be local DNS.

But in any case, please post up the contents of your hosts file.  It should show the ip address of the station/server and the name of the station.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mokkanAuthor Commented:
I am more into Unix/Linux and just learning Windows  because I need to do some configuration for my VCS project.

Yes, it is windows 2008 R2 server.  I'm not sure how to enable the DNS server role and edit the DNS zone file.  I need to create lanman resource for VCS and I need to setup a virtual name.

I  just added the following entry

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#      127.0.0.1       localhost
#      ::1             localhost

192.168.0.20   thara
0
Sir LearnalotCommented:
All thats doing is resolving the IP to name... you have to open Server Manager (an application that comes with Windows Server) and go to "Add Roles" and select DNS Server :) Once you install the role, you can click on DNS and configure it how you like, adding Forward/Reverse Lookup Zones and such. Good luck :)
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

mokkanAuthor Commented:
Thank you very  much.  Is this  DNS server like bind?
0
mokkanAuthor Commented:
But, isn't suppose to resolve without DNS lookup since I already have host name in  hosts file?  Why do I need DNS since I put the host name in in hosts file?
0
Larry Struckmeyer MVPCommented:
I have never done this, but try the FQDN of the station, as in thara.domain.local or whatever.
0
Sir LearnalotCommented:
Larry is correct, you have to put in the FQDN of the server not just the name of the machine
0
mokkanAuthor Commented:
I  put the FQDN and still  not resolving it. My question is that if there is no DNS setup, isn't it suppose to go and check the host file resolve the host name like unix ?
0
Sir LearnalotCommented:
Hmm, curious. Yes it is... did you double check to make sure your firewall isn't blocking the connection?
0
Larry Struckmeyer MVPCommented:
Check to see you can ping the thara system by name and ip.
0
mokkanAuthor Commented:
yes, I can ping by IP, not by hostname which I put in  hosts file.

Sorry, what firewall port needs to be opened? I'm just quering against local server.
0
Sir LearnalotCommented:
Would you mind pasting here how you entered your FQDN, I've often seen people enter it incorrectly and be the cause of the issue.
0
Sir LearnalotCommented:
And DNS uses port 53... which SHOULD be enabled by default...
0
mokkanAuthor Commented:
Thank  you very much guys, some how IP wasn't pingable, but it was showing in IP config, when I pinged I got

Tranismit failed:  General failure error.

I did  ipconfig  /release and ipconfig  /renew on  server, and went to my my xp where I had vsphere client installed to access my lab and I did  ipconfig  /release   and ipconfig  /renew and worked.  Thank you very  much guys.
0
Sir LearnalotCommented:
lol.... so all you needed was to refresh the connection to update the settings. :) Glad it worked. Please mark down all assisted solutions, thank you and have a great day!
0
mokkanAuthor Commented:
Thank you guys.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.

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.