.\" Title: ctdbd
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\" Date: 03/19/2009
+.\" Date: 03/25/2009
.\" Manual:
.\" Source:
.\"
-.TH "CTDBD" "1" "03/19/2009" "" ""
+.TH "CTDBD" "1" "03/25/2009" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
There are two ways to solve this problem\. The first is by assigning a static ip address for one public interface on every node which will allow every node to be able to route traffic to the public network even if there are no public addresses assigned to the node\. This is the simplest way but it uses up a lot of ip addresses since you have to assign both static and also public addresses to each node\.
.SS "NAT\-GW"
.PP
-A second way is to use the built in NAT\-GW feature in CTDB\. With NAT\-GW only one extra address is required for the entire cluster instead of one address per node\. This extra address is dedicated to traffic that originates from the cluster and is destined for the external network\.
+A second way is to use the built in NAT\-GW feature in CTDB\. With NAT\-GW you assign one public NATGW address for each natgw group\. Each NATGW group is a set of nodes in the cluster that shares the same NATGW address to talk to the outside world\. Normally there would only be one NATGW group spanning the entire cluster, but in situations where one ctdb cluster spans multiple physical sites it is useful to have one NATGW group for each of the two sites\.
.PP
-In NAT\-GW one of the nodes in the cluster is designated the NAT Gateway through which all traffic that is originated in the cluster will be routed through if the public addresses are not available\.
+There can be multiple NATGW groups in one cluster but each node can only be member of one NATGW group\.
+.PP
+In each NATGW group, one of the nodes is designated the NAT Gateway through which all traffic that is originated by nodes in this group will be routed through if a public addresses are not available\.
.SS "Configuration"
.PP
-NAT\-GW is configured in /etc/sysconfig/ctdb by setting the following variables:
+NAT\-GW is configured in /etc/sysconfigctdb by setting the following variables:
.sp
.RS 4
.nf
# and thus no proper routes to the external world it will instead
# route all packets through the nat\-gw node\.
#
+# NATGW_NODES is the list of nodes that belong to this natgw group\.
+# You can have multiple natgw groups in one cluster but each node
+# can only belong to one single natgw group\.
+#
# NATGW_PUBLIC_IP=10\.0\.0\.227/24
# NATGW_PUBLIC_IFACE=eth0
# NATGW_DEFAULT_GATEWAY=10\.0\.0\.1
# NATGW_PRIVATE_IFACE=eth1
# NATGW_PRIVATE_NETWORK=10\.1\.1\.0/24
+# NATGW_NODES=/etc/ctdb/natgw_nodes
.fi
.RE
This is the network/netmask used for the interal private network\.
.PP
Format of this parameter is IPADDRESS/NETMASK
+.SS "NATGW_NODES"
+.PP
+This is the list of all nodes that belong to the same NATGW group as this node\. The default is /etc/ctdb/natgw_nodes\.
.SS "Operation"
.PP
-When the NAT\-GW fiunctionality is used, one of the nodes is elected to act as a NAT router for all the other nodes in the cluster when they need to originate traffic to the external public network\.
+When the NAT\-GW fiunctionality is used, one of the nodes is elected to act as a NAT router for all the other nodes in the group when they need to originate traffic to the external public network\.
.PP
The NAT\-GW node is assigned the NATGW_PUBLIC_IP to the designated interface and the provided default route\. The NAT\-GW is configured to act as a router and to masquerade all traffic it receives from the internal private network and which is destined to the external network(s)\.
.PP
-All other nodes are configured with a default route of metric 10 pointing to the designated NAT GW node\.
+All other nodes in the group are configured with a default route of metric 10 pointing to the designated NAT GW node\.
.PP
This is implemented in the 11\.natgw eventscript\. Please see the eventscript for further information\.
.SH "SEE ALSO"
have to assign both static and also public addresses to each node.
</p><div class="refsect2" lang="en"><a name="id2529493"></a><h3>NAT-GW</h3><p>
A second way is to use the built in NAT-GW feature in CTDB.
- With NAT-GW only one extra address is required for the entire cluster
- instead of one address per node. This extra address is dedicated
- to traffic that originates from the cluster and is destined for the
- external network.
- </p><p>
- In NAT-GW one of the nodes in the cluster is designated the NAT Gateway
- through which all traffic that is originated in the cluster will be
- routed through if the public addresses are not available.
- </p></div><div class="refsect2" lang="en"><a name="id2529514"></a><h3>Configuration</h3><p>
- NAT-GW is configured in /etc/sysconfig/ctdb by setting the following
+ With NAT-GW you assign one public NATGW address for each natgw group.
+ Each NATGW group is a set of nodes in the cluster that shares the same
+ NATGW address to talk to the outside world. Normally there would only be
+ one NATGW group spanning the entire cluster, but in situations where one
+ ctdb cluster spans multiple physical sites it is useful to have one
+ NATGW group for each of the two sites.
+ </p><p>
+ There can be multiple NATGW groups in one cluster but each node can only
+ be member of one NATGW group.
+ </p><p>
+ In each NATGW group, one of the nodes is designated the NAT Gateway
+ through which all traffic that is originated by nodes in this group
+ will be routed through if a public addresses are not available.
+ </p></div><div class="refsect2" lang="en"><a name="id2529523"></a><h3>Configuration</h3><p>
+ NAT-GW is configured in /etc/sysconfigctdb by setting the following
variables:
</p><pre class="screen">
# NAT-GW configuration
# and thus no proper routes to the external world it will instead
# route all packets through the nat-gw node.
#
+# NATGW_NODES is the list of nodes that belong to this natgw group.
+# You can have multiple natgw groups in one cluster but each node
+# can only belong to one single natgw group.
+#
# NATGW_PUBLIC_IP=10.0.0.227/24
# NATGW_PUBLIC_IFACE=eth0
# NATGW_DEFAULT_GATEWAY=10.0.0.1
# NATGW_PRIVATE_IFACE=eth1
# NATGW_PRIVATE_NETWORK=10.1.1.0/24
- </pre></div><div class="refsect2" lang="en"><a name="id2529555"></a><h3>NATGW_PUBLIC_IP</h3><p>
+# NATGW_NODES=/etc/ctdb/natgw_nodes
+ </pre></div><div class="refsect2" lang="en"><a name="id2476123"></a><h3>NATGW_PUBLIC_IP</h3><p>
This is an ip address in the public network that is used for all outgoing
traffic when the public addresses are not assigned.
This address will be assigned to one of the nodes in the cluster which
will masquerade all traffic for the other nodes.
</p><p>
Format of this parameter is IPADDRESS/NETMASK
- </p></div><div class="refsect2" lang="en"><a name="id2476128"></a><h3>NATGW_PUBLIC_IFACE</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2476141"></a><h3>NATGW_PUBLIC_IFACE</h3><p>
This is the physical interface where the NATGW_PUBLIC_IP will be
assigned to. This should be an interface connected to the public network.
</p><p>
Format of this parameter is INTERFACE
- </p></div><div class="refsect2" lang="en"><a name="id2476144"></a><h3>NATGW_DEFAULT_GATEWAY</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2476157"></a><h3>NATGW_DEFAULT_GATEWAY</h3><p>
This is the default gateway to use on the node that is elected to host
the NATGW_PUBLIC_IP. This is the default gateway on the public network.
</p><p>
Format of this parameter is IPADDRESS
- </p></div><div class="refsect2" lang="en"><a name="id2476160"></a><h3>NATGW_PRIVATE_IFACE</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2476172"></a><h3>NATGW_PRIVATE_IFACE</h3><p>
This is the interface used for the interal private network.
</p><p>
Format of this parameter is INTERFACE
- </p></div><div class="refsect2" lang="en"><a name="id2476174"></a><h3>NATGW_PRIVATE_NETWORK</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2476187"></a><h3>NATGW_PRIVATE_NETWORK</h3><p>
This is the network/netmask used for the interal private network.
</p><p>
Format of this parameter is IPADDRESS/NETMASK
- </p></div><div class="refsect2" lang="en"><a name="id2476188"></a><h3>Operation</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2476201"></a><h3>NATGW_NODES</h3><p>
+ This is the list of all nodes that belong to the same NATGW group
+ as this node. The default is /etc/ctdb/natgw_nodes.
+ </p></div><div class="refsect2" lang="en"><a name="id2476212"></a><h3>Operation</h3><p>
When the NAT-GW fiunctionality is used, one of the nodes is elected
- to act as a NAT router for all the other nodes in the cluster when
+ to act as a NAT router for all the other nodes in the group when
they need to originate traffic to the external public network.
</p><p>
The NAT-GW node is assigned the NATGW_PUBLIC_IP to the designated
to act as a router and to masquerade all traffic it receives from the
internal private network and which is destined to the external network(s).
</p><p>
- All other nodes are configured with a default route of metric 10 pointing
- to the designated NAT GW node.
+ All other nodes in the group are configured with a default route of
+ metric 10 pointing to the designated NAT GW node.
</p><p>
This is implemented in the 11.natgw eventscript. Please see the
eventscript for further information.
- </p></div></div><div class="refsect1" lang="en"><a name="id2476221"></a><h2>SEE ALSO</h2><p>
+ </p></div></div><div class="refsect1" lang="en"><a name="id2476245"></a><h2>SEE ALSO</h2><p>
ctdb(1), onnode(1)
<a class="ulink" href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
- </p></div><div class="refsect1" lang="en"><a name="id2476234"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
+ </p></div><div class="refsect1" lang="en"><a name="id2476258"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
Copyright (C) Andrew Tridgell 2007<br>
Copyright (C) Ronnie sahlberg 2007<br>
<br>
<refsect2><title>NAT-GW</title>
<para>
A second way is to use the built in NAT-GW feature in CTDB.
- With NAT-GW only one extra address is required for the entire cluster
- instead of one address per node. This extra address is dedicated
- to traffic that originates from the cluster and is destined for the
- external network.
+ With NAT-GW you assign one public NATGW address for each natgw group.
+ Each NATGW group is a set of nodes in the cluster that shares the same
+ NATGW address to talk to the outside world. Normally there would only be
+ one NATGW group spanning the entire cluster, but in situations where one
+ ctdb cluster spans multiple physical sites it is useful to have one
+ NATGW group for each of the two sites.
</para>
<para>
- In NAT-GW one of the nodes in the cluster is designated the NAT Gateway
- through which all traffic that is originated in the cluster will be
- routed through if the public addresses are not available.
+ There can be multiple NATGW groups in one cluster but each node can only
+ be member of one NATGW group.
+ </para>
+ <para>
+ In each NATGW group, one of the nodes is designated the NAT Gateway
+ through which all traffic that is originated by nodes in this group
+ will be routed through if a public addresses are not available.
</para>
</refsect2>
<refsect2><title>Configuration</title>
<para>
- NAT-GW is configured in /etc/sysconfig/ctdb by setting the following
+ NAT-GW is configured in /etc/sysconfigctdb by setting the following
variables:
</para>
<screen format="linespecific">
# and thus no proper routes to the external world it will instead
# route all packets through the nat-gw node.
#
+# NATGW_NODES is the list of nodes that belong to this natgw group.
+# You can have multiple natgw groups in one cluster but each node
+# can only belong to one single natgw group.
+#
# NATGW_PUBLIC_IP=10.0.0.227/24
# NATGW_PUBLIC_IFACE=eth0
# NATGW_DEFAULT_GATEWAY=10.0.0.1
# NATGW_PRIVATE_IFACE=eth1
# NATGW_PRIVATE_NETWORK=10.1.1.0/24
+# NATGW_NODES=/etc/ctdb/natgw_nodes
</screen>
</refsect2>
</para>
</refsect2>
+ <refsect2><title>NATGW_NODES</title>
+ <para>
+ This is the list of all nodes that belong to the same NATGW group
+ as this node. The default is /etc/ctdb/natgw_nodes.
+ </para>
+ </refsect2>
+
<refsect2><title>Operation</title>
<para>
When the NAT-GW fiunctionality is used, one of the nodes is elected
- to act as a NAT router for all the other nodes in the cluster when
+ to act as a NAT router for all the other nodes in the group when
they need to originate traffic to the external public network.
</para>
<para>
internal private network and which is destined to the external network(s).
</para>
<para>
- All other nodes are configured with a default route of metric 10 pointing
- to the designated NAT GW node.
+ All other nodes in the group are configured with a default route of
+ metric 10 pointing to the designated NAT GW node.
</para>
<para>
This is implemented in the 11.natgw eventscript. Please see the