Connecting using a hosts file

Content Platform Tenant Management Help

File Size
4269 KB
Part Number

All operating systems have a hosts file that contains mappings from hostnames to IP addresses. If the HCP system does not support DNS, you can use this file to enable access to tenants by hostname.

The location of the hosts file depends on the client operating system:

  • On Windows®, by default: c:\windows\system32\drivers\etc\hosts
  • On Unix: /etc/hosts
  • On Mac OS® X: /private/etc/host

Hostname mappings

Each entry in a hosts file maps one or more fully qualified hostnames to a single IP address. For example, the entry below maps the hostname of the europe tenant in the HCP system named to the IP address

The following considerations apply to hosts file entries:

  • Each entry must appear on a separate line.
  • Multiple hostnames in a single line must be separated by white space. With some versions of Windows, these must be single spaces.
  • At the system-level, the fully qualified hostname includes admin.
  • Each hostname can map to multiple IP addresses.

You can include comments in a hosts file either on separate lines or following a mapping on the same line. Each comment must start with a number sign (#). Blank lines are ignored.

Note: If you don’t know the IP addresses for the HCP system, contact your HCP system administrator.

Hostname mapping considerations

You can map a hostname to any number of IP addresses. The way multiple mappings are used depends on the client platform. For information about how your client handles multiple mappings in a hosts file, see your client documentation.

If any of the HCP nodes listed in the hosts file are unavailable, timeouts may occur when you use a hosts file to access the System Management Console.

Sample hosts file entries

Here’s a sample hosts file that contains mappings for the repository as a whole and the europe tenant:

# HCP system-level mappings

# tenant-level mappings