Configure Network Names

You must configure each host in the cluster to ensure that all members can communicate with each other.

  1. Set the hostname to a unique name (not localhost).
    sudo hostnamectl set-hostname
  2. Edit /etc/hosts with the IP address and fully qualified domain name (FQDN) of each host in the cluster. You can add the unqualified name as well.  foo-1  foo-2  foo-3  foo-4
  3. Edit /etc/sysconfig/network with the FQDN of this host only:
  4. Verify that each host consistently identifies to the network:
    1. Run uname -a and check that the hostname matches the output of the hostname command.
    2. Run /sbin/ifconfig and note the value of inet addr in the eth0 (or bond0) entry, for example:
      eth0      Link encap:Ethernet  HWaddr 00:0C:29:A4:E8:97  
                inet addr:  Bcast:  Mask:
    3. Run host -v -t A $(hostname) and verify that the output matches the hostname command. The IP address should be the same as reported by ifconfig for eth0 (or bond0):
      Trying ""
      ;; ANSWER SECTION: 60 IN	A