Many administrators prefer to set up a second, dedicated interface on their clustered systems for the heartbeat service. This is generally a good idea, especially if the primary network interface has a lot of traffic.
Making this configuration is fairly simple. This article assumes you have a working cluster configuration where the node names are not the same as the machine’s hostname. In addition, it is assumed each node has two properly configured network interfaces.
In following example, we have a two node cluster. The hostnames of these systems are cluster1.example.com and cluster2.example.com. The node names of the two systems, as defined in the cluster configuration file /etc/cluster/cluster.conf are node1-priv and node2-priv.
# cat /etc/cluster/cluster.conf
[…]
•To configure the heartbeat to use a second interface instead of the primary interface, modify the /etc/hosts file on each node so that the hostname points to the IP address of the primary interface. The node name should point to the secondary interface.
•Here is the /etc/hosts file for both nodes:
$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
# node1 settings
10.10.xx.xx cluster1.example.com cluster1
192.168.xx.xx node1-priv #### Cluster node name
# node2 settings:
10.10.xx.xx cluster2.example.com cluster2
192.168.xx.xx node2-priv #### Cluster node name
•In the above configuration, the heartbeat would be sent over eth1 in the 192.168.xx. subnet. All other traffic would be sent over eth0, which has is the 10.10.xx. subnet.
•Note:
o The change in cluster heartbeat network will require a restart of entire cluster, please refer to the following article for detailed information about which configuration changes would need a restart of cluster:
Which configuration changes require a restart in a Red Hat Enterprise Linux cluster?