Configure Network Names
You must configure each host in the cluster to ensure that all members can communicate with each other.
-
Set the hostname to a unique name (not
localhost).sudo hostnamectl set-hostname foo-1.example.com - Edit
/etc/hostswith the IP address and fully qualified domain name (FQDN) of each host in the cluster. You can add the unqualified name as well.1.1.1.1 foo-1.example.com foo-1 2.2.2.2 foo-2.example.com foo-2 3.3.3.3 foo-3.example.com foo-3 4.4.4.4 foo-4.example.com foo-4 - Edit
/etc/sysconfig/networkwith the FQDN of this host only:HOSTNAME=foo-1.example.com - Verify that each host consistently identifies to the network:
- Run
uname -aand check that the hostname matches the output of thehostnamecommand. - Run
/sbin/ifconfigand note the value ofinet addrin theeth0(orbond0) entry, for example:eth0 Link encap:Ethernet HWaddr 00:0C:29:A4:E8:97 inet addr:172.29.82.176 Bcast:172.29.87.255 Mask:255.255.248.0 ... - Run
host -v -t A $(hostname)and verify that the output matches thehostnamecommand. The IP address should be the same as reported byifconfigforeth0(orbond0):Trying "foo-1.example.com" ... ;; ANSWER SECTION: foo-1.example.com. 60 IN A 172.29.82.176
- Run
