Chapter 5. Configuring Clunster Nodes manually

All ATMs must have Turbolinux Cluster LoadBalancer 10 installed and running on Turbolinux 10 Server. Cluster nodes may be installed on alternate operating systems, however, Turbolinux 10 Server is the only operating systems that are fully supported.

There are three different forwarding methods that can be used to forward packets from the traffic manager to the cluster node. The NAT method is the simplest method -- you do not need any special configuration of the cluster nodes at all, beyond setting the correct IP address, network mask, and default gateway. Direct forwarding and tunneling do require some special setup of the cluster nodes. Since NAT does not require any special setup, this chapter will only cover configuring cluster nodes using direct forwarding and tunneling.

In addition to the steps covered in this chapter, you will also need to set up the particular network services that you intend to cluster. We will not cover that in this manual, as it varies depending on which services you are clustering and what products you are using. However, the configuration is not any different than it would be if you were to run that service in a stand-alone non-clustered environment. Just remember to configure it to accept service requests on the cluster's virtual IP address.

We will cover this operating system:

There are two different ways to configure a Linux system as a cluster node: manual and automatic. The easiest way is to install and run Turbolinux Cluster LoadBalancer 10 on the machine, which will automatically configure the system as a server node. Using this method, you can easily synchronize the configuration with the rest of the cluster. The cluster server daemon will perform all the configuration that is required on the cluster node. This method is the only way that you can have a system act as both an ATM (primary or backup) and a cluster node.

5.1. Direct Forwording Cluster Nodes

In order to get a cluster node to respond to requests addressed to the cluster's virtual IP address, you will need to set up a network interface alias. To do this, you will have to have IP Aliasing configured into the kernel. Most Linux distributions will already have this compiled into the default kernel. An alias is simply an additional IP address attached to the same network interface. What we want to do here is to trick the network interface into responding when it receives a packet forwarded from the primary ATM. Since the ATM does not modify the destination address of packets as they are forwarded to cluster nodes, we must set the alias IP address of the cluster node to the IP address of the cluster itself. (This is also referred to as the virtual IP address of the cluster.)

To create the alias, use the ifconfig program. Let's assume that your real IP address is 10.0.0.3, and the virtual IP address of the cluster is 10.0.0.99. If you display the settings for the eth0 network interface, it will look something like this:

# ifconfig eth0
eth0      Link encap:Ethernet        HWaddr 00:AB:CD:12:12:3F
          IPaddr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:608 errors:0 dropped:0 overruns:0 frame:0
          TX packets:992 errors:1 dropped:0 overruns:0 carrier:0
          collisions:15 txqueuelen:100
          Interrupt:10 Base address:0x210

To add the alias, use the following command:

# ifconfig eth0:1 10.0.0.99 up

The `:1' tacked on to the end of the `eth0' is the syntax that UNIX and Linux use to denote alias addresses on the same physical network card. You can use any set of up to four characters in the alias portion. The characters have no real meaning.

Creating an alias has one problem: when another system on the network wants to send a packet to the IP address 10.0.0.99 on the same subnet, it sends an ARP broadcast to determine which computer has that IP address. The machine with that IP address is supposed to answer back with its IP address and corresponding MAC (hardware) address. But if all the nodes in the cluster have the same IP address, they are all going to answer this broadcast ARP message. So we have to tell all of the systems except for the primary ATM not to reply to those ARP requests. We want all traffic destined for the cluster to go through the primary ATM first.

Part of the solution to this is to create the alias on the loopback interface instead of the Ethernet interface. The loopback interface is a network interface that has no hardware or physical network associated with it. So instead of creating the alias on eth0:1, you would add the alias to the loopback interface (lo) using the following command:

# ifconfig lo:1 10.0.0.99 netmask 255.255.255.255 up

Next you have to turn off ARP replies on the interface. You will have to use the /proc filesystem to turn off ARP replies. To do this, echo a 1 to the hidden file in /proc/sys/net/ipv4/conf/all and the hidden file for the interface you are using. Here is an example that will turn off ARP replies on the loopback interface:

# echo 1 > /proc/sys/net/ipv4/conf/all/hidden

# echo 1 > /proc/sys/net/ipv4/conf/lo/hidden

Caution

Keeping ARP replies turned off on the service node's loopback interface is recommended even after service nodes are restarted. For example, you may want to put these lines into /etc/rc.d/rc.local script to make it effective every time after system booted. You may also use turbonetcfg tool to configure your alias.