1OCF_HEARTBEAT_IPADDR(7) OCF resource agents OCF_HEARTBEAT_IPADDR(7)
2
3
4
6 ocf_heartbeat_IPaddr2 - Manages virtual IPv4 and IPv6 addresses (Linux
7 specific version)
8
10 IPaddr2 [start | stop | status | monitor | meta-data | validate-all]
11
13 This Linux-specific resource manages IP alias IP addresses. It can add
14 an IP alias, or remove one. In addition, it can implement Cluster Alias
15 IP functionality if invoked as a clone resource.
16
17 If used as a clone, "shared address with a trivial, stateless
18 (autonomous) load-balancing/mutual exclusion on ingress" mode gets
19 applied (as opposed to "assume resource uniqueness" mode otherwise).
20 For that, Linux firewall (kernel and userspace) is assumed, and since
21 recent distributions are ambivalent in plain "iptables" command to
22 particular back-end resolution, "iptables-legacy" (when present) gets
23 prioritized so as to avoid incompatibilities (note that respective
24 ipt_CLUSTERIP firewall extension in use here is, at the same time,
25 marked deprecated, yet said "legacy" layer can make it workable,
26 literally, to this day) with "netfilter" one (as in "iptables-nft"). In
27 that case, you should explicitly set clone-node-max >= 2, and/or
28 clone-max < number of nodes. In case of node failure, clone instances
29 need to be re-allocated on surviving nodes. This would not be possible
30 if there is already an instance on those nodes, and clone-node-max=1
31 (which is the default).
32
33 When the specified IP address gets assigned to a respective interface,
34 the resource agent sends unsolicited ARP (Address Resolution Protocol,
35 IPv4) or NA (Neighbor Advertisement, IPv6) packets to inform
36 neighboring machines about the change. This functionality is controlled
37 for both IPv4 and IPv6 by shared 'arp_*' parameters.
38
40 ip
41 The IPv4 (dotted quad notation) or IPv6 address (colon hexadecimal
42 notation) example IPv4 "192.168.1.1". example IPv6
43 "2001:db8:DC28:0:0:FC57:D4C8:1FFF".
44
45 (unique, required, string, no default)
46
47 nic
48 The base network interface on which the IP address will be brought
49 online. If left empty, the script will try and determine this from
50 the routing table.
51
52 Do NOT specify an alias interface in the form eth0:1 or anything
53 here; rather, specify the base interface only. If you want a label,
54 see the iflabel parameter.
55
56 Prerequisite:
57
58 There must be at least one static IP address, which is not managed
59 by the cluster, assigned to the network interface. If you can not
60 assign any static IP address on the interface, modify this kernel
61 parameter:
62
63 sysctl -w net.ipv4.conf.all.promote_secondaries=1 # (or per device)
64
65 (optional, string, no default)
66
67 cidr_netmask
68 The netmask for the interface in CIDR format (e.g., 24 and not
69 255.255.255.0)
70
71 If unspecified, the script will also try to determine this from the
72 routing table.
73
74 (optional, string, no default)
75
76 broadcast
77 Broadcast address associated with the IP. It is possible to use the
78 special symbols '+' and '-' instead of the broadcast address. In
79 this case, the broadcast address is derived by setting/resetting
80 the host bits of the interface prefix.
81
82 (optional, string, no default)
83
84 iflabel
85 You can specify an additional label for your IP address here. This
86 label is appended to your interface name.
87
88 The kernel allows alphanumeric labels up to a maximum length of 15
89 characters including the interface name and colon (e.g.
90 eth0:foobar1234)
91
92 A label can be specified in nic parameter but it is deprecated. If
93 a label is specified in nic name, this parameter has no effect.
94
95 (optional, string, no default)
96
97 lvs_support
98 Enable support for LVS Direct Routing configurations. In case a IP
99 address is stopped, only move it to the loopback device to allow
100 the local node to continue to service requests, but no longer
101 advertise it on the network.
102
103 Notes for IPv6: It is not necessary to enable this option on IPv6.
104 Instead, enable 'lvs_ipv6_addrlabel' option for LVS-DR usage on
105 IPv6.
106
107 (optional, boolean, default false)
108
109 lvs_ipv6_addrlabel
110 Enable adding IPv6 address label so IPv6 traffic originating from
111 the address's interface does not use this address as the source.
112 This is necessary for LVS-DR health checks to realservers to work.
113 Without it, the most recently added IPv6 address (probably the
114 address added by IPaddr2) will be used as the source address for
115 IPv6 traffic from that interface and since that address exists on
116 loopback on the realservers, the realserver response to
117 pings/connections will never leave its loopback. See RFC3484 for
118 the detail of the source address selection.
119
120 See also 'lvs_ipv6_addrlabel_value' parameter.
121
122 (optional, boolean, default false)
123
124 lvs_ipv6_addrlabel_value
125 Specify IPv6 address label value used when 'lvs_ipv6_addrlabel' is
126 enabled. The value should be an unused label in the policy table
127 which is shown by 'ip addrlabel list' command. You would rarely
128 need to change this parameter.
129
130 (optional, integer, default 99)
131
132 mac
133 Set the interface MAC address explicitly. Currently only used in
134 case of the Cluster IP Alias. Leave empty to chose automatically.
135
136 (optional, string, no default)
137
138 clusterip_hash
139 Specify the hashing algorithm used for the Cluster IP
140 functionality.
141
142 (optional, string, default "sourceip-sourceport")
143
144 unique_clone_address
145 If true, add the clone ID to the supplied value of IP to create a
146 unique address to manage
147
148 (optional, boolean, default false)
149
150 arp_interval
151 Specify the interval between unsolicited ARP (IPv4) or NA (IPv6)
152 packets in milliseconds.
153
154 This parameter is deprecated and used for the backward
155 compatibility only. It is effective only for the send_arp binary
156 which is built with libnet, and send_ua for IPv6. It has no effect
157 for other arp_sender.
158
159 (optional, integer, default 200)
160
161 arp_count
162 Number of unsolicited ARP (IPv4) or NA (IPv6) packets to send at
163 resource initialization.
164
165 (optional, integer, default 5)
166
167 arp_count_refresh
168 For IPv4, number of unsolicited ARP packets to send during resource
169 monitoring. Doing so helps mitigate issues of stuck ARP caches
170 resulting from split-brain situations.
171
172 (optional, integer, default 0)
173
174 arp_bg
175 Whether or not to send the ARP (IPv4) or NA (IPv6) packets in the
176 background. The default is true for IPv4 and false for IPv6.
177
178 (optional, string, no default)
179
180 arp_sender
181 For IPv4, the program to send ARP packets with on start. Available
182 options are: - send_arp: default - ipoibarping: default for
183 infiniband interfaces if ipoibarping is available - iputils_arping:
184 use arping in iputils package - libnet_arping: use another variant
185 of arping based on libnet
186
187 (optional, string, no default)
188
189 send_arp_opts
190 For IPv4, extra options to pass to the arp_sender program.
191 Available options are vary depending on which arp_sender is used.
192
193 A typical use case is specifying '-A' for iputils_arping to use ARP
194 REPLY instead of ARP REQUEST as Gratuitous ARPs.
195
196 (optional, string, no default)
197
198 flush_routes
199 Flush the routing table on stop. This is for applications which use
200 the cluster IP address and which run on the same physical host that
201 the IP address lives on. The Linux kernel may force that
202 application to take a shortcut to the local loopback interface,
203 instead of the interface the address is really bound to. Under
204 those circumstances, an application may, somewhat unexpectedly,
205 continue to use connections for some time even after the IP address
206 is deconfigured. Set this parameter in order to immediately disable
207 said shortcut when the IP address goes away.
208
209 (optional, boolean, default false)
210
211 run_arping
212 For IPv4, whether or not to run arping for collision detection
213 check.
214
215 (optional, string, default "false")
216
217 nodad
218 For IPv6, do not perform Duplicate Address Detection when adding
219 the address.
220
221 (optional, string, default "false")
222
223 noprefixroute
224 Use noprefixroute flag (see 'man ip-address').
225
226 (optional, string, default "false")
227
228 preferred_lft
229 For IPv6, set the preferred lifetime of the IP address. This can be
230 used to ensure that the created IP address will not be used as a
231 source address for routing. Expects a value as specified in section
232 5.5.4 of RFC 4862.
233
234 (optional, string, default "forever")
235
236 network_namespace
237 Specifies the network namespace to operate within. The namespace
238 must already exist, and the interface to be used must be within the
239 namespace.
240
241 (optional, string, no default)
242
244 This resource agent supports the following actions (operations):
245
246 start
247 Starts the resource. Suggested minimum timeout: 20s.
248
249 stop
250 Stops the resource. Suggested minimum timeout: 20s.
251
252 status
253 Performs a status check. Suggested minimum timeout: 20s. Suggested
254 interval: 10s.
255
256 monitor
257 Performs a detailed status check. Suggested minimum timeout: 20s.
258 Suggested interval: 10s.
259
260 meta-data
261 Retrieves resource agent metadata (internal use only). Suggested
262 minimum timeout: 5s.
263
264 validate-all
265 Performs a validation of the resource configuration. Suggested
266 minimum timeout: 20s.
267
269 The following is an example configuration for a IPaddr2 resource using
270 the crm(8) shell:
271
272 primitive p_IPaddr2 ocf:heartbeat:IPaddr2 \
273 params \
274 ip=string \
275 op monitor depth="0" timeout="20s" interval="10s"
276
278 The following is an example configuration for a IPaddr2 resource using
279 pcs(8)
280
281 pcs resource create p_IPaddr2 ocf:heartbeat:IPaddr2 \
282 ip=string \
283 op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="10s"
284
286 http://clusterlabs.org/
287
289 ClusterLabs contributors (see the resource agent source for information
290 about individual authors)
291
292
293
294resource-agents UNKNOWN 10/11/2023 OCF_HEARTBEAT_IPADDR(7)