OCF_HEARTBEAT_IPADDR(7)
π ocf_heartbeat_IPaddr2 β Manages virtual IPv4 and IPv6 addresses (Linux specific version) π
Manual page: OCF_HEARTBEAT_IPADDR(7). Okay bestie, this one is the Linux-specific IP-address resource, and it is lowkey iconic β¨
π NAME π
ocf_heartbeat_IPaddr2 β Manages virtual IPv4 and IPv6 addresses (Linux specific version).
πΈ SYNOPSIS πΈ
IPaddr2 [start | stop | status | monitor | meta-data | validate-all]
Run it with one of those actions, mmkay? π
π¦ DESCRIPTION π¦
This Linux-specific resource manages IP alias IP addresses. It can add an IP alias, or remove one. In addition, it can implement Cluster Alias IP functionality if invoked as a clone resource.
If used as a clone, βshared address with a trivial, stateless (autonomous) load-balancing/mutual exclusion on ingressβ mode gets applied (as opposed to βassume resource uniquenessβ mode otherwise). In that case, you should explicitly set clone-node-max >= 2, and/or clone-max < number of nodes. In case of node failure, clone instances need to be re-allocated on surviving nodes. This would not be possible if there is already an instance on those nodes, and clone-node-max=1 (which is the default).
When the specified IP address gets assigned to a respective interface, the resource agent sends unsolicited ARP (Address Resolution Protocol, IPv4) or NA (Neighbor Advertisement, IPv6) packets to inform neighboring machines about the change. This functionality is controlled for both IPv4 and IPv6 by shared 'arp_*' parameters.
β¨ SUPPORTED PARAMETERS β¨
ipβ The IPv4 (dotted quad notation) or IPv6 address (colon hexadecimal notation). Example IPv4"192.168.1.1". Example IPv6"2001:db8:DC28:0:0:FC57:D4C8:1FFF".
(unique, required, string, no default)
nicβ The base network interface on which the IP address will be brought online. If left empty, the script will try and determine this from the routing table.
Do NOT specify an alias interface in the form eth0:1 or anything here; rather, specify the base interface only. If you want a label, see the iflabel parameter.
Prerequisite: There must be at least one static IP address, which is not managed by the cluster, assigned to the network interface. If you can not assign any static IP address on the interface, modify this kernel parameter:
sysctl -w net.ipv4.conf.all.promote_secondaries=1 # (or per device)
(optional, string, no default)
cidr_netmaskβ The netmask for the interface in CIDR format (e.g.,24and not255.255.255.0).
If unspecified, the script will also try to determine this from the routing table.
(optional, string, no default)
broadcastβ Broadcast address associated with the IP. It is possible to use the special symbols'+'and'-'instead of the broadcast address. In this case, the broadcast address is derived by setting/resetting the host bits of the interface prefix.
(optional, string, no default)
protoβ Proto to match when finding network. E.g."kernel".
(optional, string, no default)
iflabelβ You can specify an additional label for your IP address here. This label is appended to your interface name.
The kernel allows alphanumeric labels up to a maximum length of 15 characters including the interface name and colon (e.g. eth0:foobar1234).
A label can be specified in nic parameter but it is deprecated. If a label is specified in nic name, this parameter has no effect.
(optional, string, no default)
lvs_supportβ Enable support for LVS Direct Routing configurations. In case a IP address is stopped, only move it to the loopback device to allow the local node to continue to service requests, but no longer advertise it on the network.
Notes for IPv6: It is not necessary to enable this option on IPv6. Instead, enable lvs_ipv6_addrlabel option for LVS-DR usage on IPv6.
(optional, boolean, default false)
lvs_ipv6_addrlabelβ Enable adding IPv6 address label so IPv6 traffic originating from the address's interface does not use this address as the source. This is necessary for LVS-DR health checks to realservers to work. Without it, the most recently added IPv6 address (probably the address added by IPaddr2) will be used as the source address for IPv6 traffic from that interface and since that address exists on loopback on the realservers, the realserver response to pings/connections will never leave its loopback. See RFC3484 for the detail of the source address selection.
See also lvs_ipv6_addrlabel_value parameter.
(optional, boolean, default true)
lvs_ipv6_addrlabel_valueβ Specify IPv6 address label value used whenlvs_ipv6_addrlabelis enabled. The value should be an unused label in the policy table which is shown byip addrlabel listcommand. You would rarely need to change this parameter.
(optional, integer, default 99)
macβ Set the interface MAC address explicitly. Currently only used in case of the Cluster IP Alias. Leave empty to chose automatically.
(optional, string, no default)
clusterip_firewallβ Firewall backend to use for cluster match rules:auto(default),nftoriptables. Theclusterip_tableandclusterip_chainparameters apply only toiptables; withnfta dedicated table per cluster IP is created automatically.
(optional, string, default "auto")
clusterip_hash_seedβ Specify the seed value of the hash used for the Cluster IP functionality. If not specified, the value is computed from the IP address, netmask and broadcast address.
(optional, string, no default)
clusterip_tableβ The iptables table to use for the cluster match rules.
(optional, string, default "mangle")
clusterip_chainβ The iptables chain to use for the cluster match rules.
(optional, string, default "PREROUTING")
clusterip_mac_mangleβ If true, use arptables to mangle ARP responses so that the cluster IP address resolves to the multicast MAC address. Not supported for IPv6.
(optional, boolean, default false)
unique_clone_addressβ If true, add the clone ID to the supplied value of IP to create a unique address to manage.
(optional, boolean, default false)
arp_intervalβ Specify the interval between unsolicited ARP (IPv4) or NA (IPv6) packets in milliseconds.
This parameter is deprecated and used for the backward compatibility only. It is effective only for the send_arp binary which is built with libnet, and send_ua for IPv6. It has no effect for other arp_sender.
(optional, integer, default 200)
arp_countβ Number of unsolicited ARP (IPv4) or NA (IPv6) packets to send at resource initialization.
(optional, integer, default 5)
arp_count_refreshβ For IPv4, number of unsolicited ARP packets to send during resource monitoring. Doing so helps mitigate issues of stuck ARP caches resulting from split-brain situations.
(optional, integer, default 0)
arp_bgβ Whether or not to send the ARP (IPv4) or NA (IPv6) packets in the background. The default is true for IPv4 and false for IPv6.
(optional, string, no default)
arp_senderβ For IPv4, the program to send ARP packets with on start. Available options are:send_arp: defaultipoibarping: default for infiniband interfaces ifipoibarpingis availableiputils_arping: use arping in iputils packagelibnet_arping: use another variant of arping based on libnet
(optional, string, no default)
send_arp_optsβ For IPv4, extra options to pass to thearp_senderprogram. Available options are vary depending on whicharp_senderis used.
A typical use case is specifying '-A' for iputils_arping to use ARP REPLY instead of ARP REQUEST as Gratuitous ARPs.
(optional, string, no default)
flush_routesβ Flush the routing table on stop. This is for applications which use the cluster IP address and which run on the same physical host that the IP address lives on. The Linux kernel may force that application to take a shortcut to the local loopback interface, instead of the interface the address is really bound to. Under those circumstances, an application may, somewhat unexpectedly, continue to use connections for some time even after the IP address is deconfigured. Set this parameter in order to immediately disable said shortcut when the IP address goes away.
(optional, boolean, default false)
run_arpingβ For IPv4, whether or not to run arping for collision detection check.
(optional, string, default "false")
nodadβ For IPv6, do not perform Duplicate Address Detection when adding the address.
(optional, string, default "false")
noprefixrouteβ Use noprefixroute flag (seeman ip-address).
(optional, string, default "false")
preferred_lftβ For IPv6, set the preferred lifetime of the IP address. This can be used to ensure that the created IP address will not be used as a source address for routing. Expects a value as specified in section5.5.4of RFC4862.
(optional, string, default "forever")
network_namespaceβ Specifies the network namespace to operate within. The namespace must already exist, and the interface to be used must be within the namespace.
(optional, string, no default)
check_link_statusβ Consider the resource failed if the interface has statusDOWNorLOWERLAYERDOWN.
(optional, string, default "true")
π SUPPORTED ACTIONS π
This resource agent supports the following actions (operations):
startβ Starts the resource. Suggested minimum timeout:20s.stopβ Stops the resource. Suggested minimum timeout:20s.statusβ Performs a status check. Suggested minimum timeout:20s. Suggested interval:10s.monitorβ Performs a detailed status check. Suggested minimum timeout:20s. Suggested interval:10s.meta-dataβ Retrieves resource agent metadata (internal use only). Suggested minimum timeout:5s.validate-allβ Performs a validation of the resource configuration. Suggested minimum timeout:20s.
π EXAMPLE CRM SHELL π
The following is an example configuration for a IPaddr2 resource using the crm(8) shell:
primitive p_IPaddr2 ocf:heartbeat:IPaddr2 \
params \
ip=string \
op monitor depth="0" timeout="20s" interval="10s"
π EXAMPLE PCS π
Okay so same energy, different tool β here's the glow-up version of that config using pcs(8) instead, for an IPaddr2 resource:
pcs resource create p_IPaddr2 ocf:heartbeat:IPaddr2 \
ip=string \
op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="10s"
Name it p_IPaddr2, point it at the ocf:heartbeat:IPaddr2 agent, hand it ip=string, and give it a monitor op with OCF_CHECK_LEVEL="0", timeout="20s" and interval="10s". Copy it, paste it, ship it β that's the whole vibe β¨
π SEE ALSO π
http://clusterlabs.org/β literally the mothership, go say hi π«Ά
π AUTHOR π
The ClusterLabs contributors wrote this, bestie β and fr fr, if you wanna know which human wrote which part, the resource agent source itself has the receipts (the page says to look there for information about individual authors). No single-name credit here, just the whole squad π
And that's a wrap on OCF_HEARTBEAT_IPADDR(7) π β brought to you by the resource-agents package, version UNKNOWN (iconic mystery era honestly π), dated 10/01/2026. Go configure something beautiful, bestie, and remember: monitor your resources or they WILL humble you ππ₯
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms