How can I configure a redundant heartbeat network for a RHEL 6, 7, 8 High Availability cluster?
Environment
- Red Hat Enterprise Linux (RHEL) 6, 7, or 8 with the High Availability Add On
Issue
- Can I use Redundant Ring Protocol (
RRP) withcorosyncon Red Hat Enterprise Linux 6? - How do I configure RRP with
corosyncandpacemakerin RHEL 7? - How can I configure redundant heartbeat network with Red Hat Clustering?
- Is it possible and supported to configure more than one heartbeat network within Red Hat Clustering without using bonding?
- Can we use two separate VLANs connected to two separate physical NIC for the heartbeat connections?
Resolution
Overview
[Network bonding](https://access.redhat.com/articles/172483) can be configured to provide redundant networking for the cluster interconnect on RHEL 6 and 7, as long as a [supported bonding mode](https://access.redhat.com/articles/3068841) is chosen.
Alternatively, it is possible in certain releases to configure the cluster to use multiple independent network interfaces for communication, even if they are not joined together into a bonded or teamed interface, so as to utilize via separate network hardware and networks such as different switches, different vlans and different network adapters. Such configurations are possible with a mode in corosync known as Redundant Ring Protocol (RRP).
Recommended Prior Reading
- Support policies: Communication and transport protocols
- Support policies: Cluster network interconnect interfaces
Useful References and Guides
- Support policies for RHEL High Availability Clusters
- Exploring concepts: Member communication and heartbeat monitoring
Redundant rings with
corosync
On RHEL 6 and RHEL 7 corosync allowed for 2 rings using RRP.. On RHEL 8 multiple rings can be configured with knetd.
Multiple rings with
knetd
RHEL 8
RHEL 8 has replaced corosync with knetd, which no longer requires RRP for redundant heartbeat communication. Configuring multiple links with knetd is covered in detail in the RHEL 8 High Availability product documentation. This includes [Creating a high availability cluster with multiple links](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_high_availability_clusters/assembly_creating-high-availability-cluster-configuring-and-managing-high-availability-clusters#proc_configure-multiple-ip-cluster-creating-high-availability-cluster) and [Adding and modifying links in an existing cluster](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_high_availability_clusters/assembly_clusternode-management-configuring-and-managing-high-availability-clusters#proc_changing-links-in-multiple-ip-cluster-clusternode-management).
RRP Configuration
RHEL 7
Follow the instructions in the [RHEL 7 High Availability Add-On Reference](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/high_availability_add-on_reference/index#s1-configrrp-HAAR) to configure RRP.
The pcs cluster setup command allows specifying multiple comma-separated hostnames or IPs for each node, which will trigger configuration of redundant rings in /etc/corosync/corosync.conf by creating multiple ring addresses per-node and settings rrp_mode: passive in the totem stanza (do note that rrp_mode: active is not supported and enabling it could lead to the cluster behaving in unexpected ways):
nodelist {
node {
ring0_addr: rhel7-node1.example.com
ring1_addr: rhel7-node1-alt
nodeid: 1
}
node {
ring0_addr: rhel7-node2.example.com
ring1_addr: rhel7-node2-alt
nodeid: 2
}
}
Configuration of each ring can be done through the totem interface stanza. This allows configuration of the multicast address, port, ttl, and the address to bind to. For example:
totem {
version: 2
rrp_mode: passive
interface {
ringnumber: 0
bindnetaddr: 10.16.35.0
mcastaddr: 239.128.16.45
mcastport: 5405
ttl: 1
}
interface {
ringnumber: 1
bindnetaddr: 192.168.143.0
mcastaddr: 239.129.16.45
mcastport: 5405
ttl: 1
}
}
RHEL 6
Follow the instructions in the RHEL 6 Cluster Administration Guide to configure RRP. Below is an example /etc/cluster/cluster.conf showing such a configuration:
<?xml version="1.0"?>
<cluster config_version="42" name="rh6nodesThree">
<clusternodes>
<clusternode name="rh6node1.examplerh.com" nodeid="1">
<altname name="rh6node1alt"/>
<fence>
<method name="1">
<device domain="rh6node1" name="fenceVirt"/>
</method>
</fence>
</clusternode>
....
</clusternodes>
<cman>
<multicast addr="229.6.1.1"/>
<altmulticast addr="239.240.3.11" ttl="3"/>
</cman>
....
</cluster>
Alternatively, the mcast addr for your alternate configuration can be specified as follows, with the mcast addr specified in the altname stanza as described in the cman manpage:
<?xml version="1.0"?>
<cluster config_version="42" name="rh6nodesThree">
<clusternodes>
<clusternode name="rh6node1.examplerh.com" nodeid="1">
<altname name="rh6node1alt" mcast=239.240.3.11" port="5015 />
<fence>
<method name="1">
<device domain="rh6node1" name="fenceVirt"/>
</method>
</fence>
</clusternode>
....
</clusternodes>
<cman>
<multicast addr="229.6.1.1"/>
</cman>
....
</cluster>
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.