Using a hosts file

Typically, HCP is included as a subdomain in your DNS. If this is not the case:

For system-level access, you can use an IP address in the URL, or you can use the [hcp_system] network domain name in the URL and use a hosts file to define mappings of one or more node IP addresses to that domain name.

For tenant-level access, you need to use the tenant management network domain name in the URL and use a hosts file to define mappings of one or more node IP addresses to that domain name.

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/hosts

Note: Every network is associated with a domain. If HCP is not included in your DNS, this is a dummy domain with a name that follows the conventions for well-formed DNS names.

Hostname mappings

Each entry in a hosts file is a mapping of an IP address for a system to an FQDN for that system.

Each hosts file entry that you create for access to HCP must include:

A valid network IP address defined for an HCP node on the [hcp_system] network or tenant management network, as applicable

The FQDN of the domain associated with the applicable network

For example, if the [hcp_system] network domain name is hcp.example.com and one of the HCP nodes has the IPv4 address 192.168.210.16 and the IPv6 address 2001:0db8::101 defined for that network, you could add either or both of these lines to the hosts file on the client:

192.168.210.16 admin.hcp.example.com

2001:0db8::101 admin.hcp.example.com

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.

Hostname mapping considerations

In the hosts file, you can map IP addresses for any number of nodes to a single domain name. The way a client uses multiple IP address mappings for a single domain name depends on the client platform. For information on how your client handles hosts file entries that define multiple IP address mappings for a single domain name, 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 through the management API.

Sample hosts file

Here’s a sample hosts file that contains mappings at the system and tenant levels for both IPv4 and IPv6 addresses:

# HCP system-level mappings
192.168.210.16 admin.hcp.example.com
192.168.210.17 admin.hcp.example.com
192.168.210.18 admin.hcp.example.com
192.168.210.19 admin.hcp.example.com
2001:0db8::101 admin.hcp.example.com
2001:0db8::102 admin.hcp.example.com
2001:0db8::103 admin.hcp.example.com
2001:0db8::104 admin.hcp.example.com

# tenant-level mappings
192.168.210.16 finance.hcp.example.com
192.168.210.17 finance.hcp.example.com
192.168.210.18 finance.hcp.example.com
192.168.210.19 finance.hcp.example.com
2001:0db8::101 finance.hcp.example.com
2001:0db8::102 finance.hcp.example.com
2001:0db8::103 finance.hcp.example.com
2001:0db8::104 finance.hcp.example.com

192.168.210.16 hr.hcp.example.com
192.168.210.17 hr.hcp.example.com
192.168.210.18 hr.hcp.example.com
192.168.210.19 hr.hcp.example.com
2001:0db8::101 hr.hcp.example.com
2001:0db8::102 hr.hcp.example.com
2001:0db8::103 hr.hcp.example.com
2001:0db8::104 hr.hcp.example.com

Trademarks and Legal Disclaimer

© 2017 Hitachi Data Systems Corporation. All rights reserved.