Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

Hosts File Windows Server 2003 Machine adding an alias

I would like to use enter an alias in a host file on a server 2003 machine. I found the following example. Does this seem right?

c:\widnows\system32\drivers\etc\hosts


127.0.0.1         localhost localhost.localdomain
192.168.30.32   illiad   cdlc-union

illiad is the host name
cdlc-union is the alias

3 questions.
1.  Is the 127.0.0.1 line correct given that the machine's  name is illiad and the domain is cdlc.org.

2. Do I need to include the domain in the names of the hosts on 192.168.30.32 line?
3. Am I completelhy off base?

Thanks,
0
notcjw
Asked:
notcjw
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
1.  Is the 127.0.0.1 line correct given that the machine's  name is illiad and the domain is cdlc.org. no the correct form is below
2. Do I need to include the domain in the names of the hosts on 192.168.30.32 line?
no you put whatever you want to refer it as on hosts line
3. Am I completelhy off base?

Yes, the format is ip-address and then whatever you whatever name you want to refer to the ip-address as. Note: this information is only applicable for the specific machine that this hosts file is on.

127.0.0.1 localhost
192.168.30.32   cdlc-union
0
 
gdaiitCommented:
Yes, that example is correct.  The way you have it there. cdlc-union will alias to illiad.
0
 
Leon FesterIT Project Change ManagerCommented:
When working with a hosts file, you don't need to create alias records like you would a CNAME in a DNS console.

The HOSTS just needs the server name and the IP.
All you need is:
[IP ADDRESS]    [HostName]
where [IP ADDRESS] is the IP for the host
and
[HostName] is the name that you want to reference. It can be a FQDN or a Netbios name.

Here is the intro text from a standard hosts file:
# 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.
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now