Table of ContentsView in Frames

Adding a host name in the /etc/hosts file

You can add the host name and aliases of the storage system in the /etc/hosts file. You can use the setup command to rewrite the /etc/hosts file.

About this task

During setup, if you enable IPv6 on the storage system and configure IPv6 addresses for your network interfaces, these IPv6 addresses are also added to the /etc/hosts file.

Step

  1. From a workstation that has access to your storage system, edit the /etc/hosts file. Add the following line to the /etc/hosts file:
    IP_address host_name aliases

    IP_address is the IP address of the host.

    host_name is the name of the host.

    aliases are the alias names for the host.

    Example

    To add a host name, myhost, with an IP address 192.0.2.16, add the following line in the /etc/hosts file:

    192.0.2.16 myhost newhost myhost-e0a

    newhost and myhost-e0a are the alias names for myhost.

    The following is a sample /etc/hosts file:
    #Auto-generated by setup Tue Apr 21 17:41:40 IST 2009
    127.0.0.1 localhost
    192.0.2.16    	 myhost myhost-e0a
    # 0.0.0.0       myhost-e0b
    # 0.0.0.0       myhost-e0c
    # 0.0.0.0       myhost-e0d
    The following is a sample /etc/hosts file in which an IPv6 address is also configured for the interface e0a:
    #Auto-generated by setup Tue Apr 21 17:41:40 IST 2009
    127.0.0.1 localhost
    192.0.2.16    	 myhost myhost-e0a
    2001:0db8::95   myhost myhost-e0a
    # 0.0.0.0       myhost-e0b
    # 0.0.0.0       myhost-e0c
    # 0.0.0.0       myhost-e0d