The first subsection below describes network interface and IP address issues that must be considered when planning a Linux FailSafe system. The second subsection gives an example of the configuration of network interfaces and IP addresses on a Linux FailSafe system. The third subsection explains the aspects of the configuration that must be specified for a Linux FailSafe configuration.
Follow these guidelines when planning the configuration of the interfaces to the private network between nodes in a cluster that can be used as a control network between nodes (this information is used when you define the nodes):
Each interface has one IP address.
The IP addresses used on each node for the interfaces to the private network are on a different subnet from the IP addresses used for public networks.
An IP name can be specified for each IP address in /etc/hosts.
Choosing a naming convention for these IP addresses that identifies them with the private network can be helpful. For example, precede the hostname with priv- (for private), as in priv-xfs-ha1 and priv-xfs-ha2.
Follow these guidelines when planning the configuration of the node interfaces in a cluster to one or more public networks:
If re-MACing is required, each interface to be failed over requires a dedicated backup interface on the other node (an interface that does not have a highly available IP address). Thus, for each IP address on an interface that requires re-MACing, there should be one interface in each node in the failover domain dedicated for the interface.
Each interface has a primary IP address. The primary IP address does not fail over.
The hostname of a node cannot be a highly available IP address.
All IP addresses used by clients to access highly available services must be part of the resource group to which the HA service belongs.
If re-MACing is required, all of the highly available IP addresses must have the same backup interface.
Making good choices for highly available IP addresses is important; these are the “hostnames” that will be used by users of the highly available services, not the true hostnames of the nodes.
Make a plan for publicizing the highly available IP addresses to the user community, since users of highly available services must use highly available IP addresses instead of the output of the hostname command.
Do not configure highly available IP addresses in static Linux configuration files.
Follow the procedure below to determine whether re-MACing is required (see Section 1.8.2, for information about re-MACing). It requires the use of three nodes: node1, node2, and node3. node1 and node2 can be nodes of a Linux FailSafe cluster, but they need not be. They must be on the same subnet. node3 is a third node. If you need to verify that a router accepts gratuitous ARP packets (which means that re-MACing is not required), node3 must be on the other side of the router from node1 and node2.
Configure an IP address on one of the interfaces of node1:
# /sbin/ifconfig interface inet ip_address netmask netmask up |
interface is the interface to be used access the node. ip_address is an IP address for node1. This IP address is used throughout this procedure. netmask is the netmask of the IP address.
From node3, ping the IP address used in Step 1 :
# ping -c 2 ip_address PING 190.0.2.1 (190.0.2.1): 56 data bytes 64 bytes from 190.0.2.1: icmp_seq=0 ttl=255 time=29 ms 64 bytes from 190.0.2.1: icmp_seq=1 ttl=255 time=1 ms ----190.0.2.1 PING Statistics---- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 1/1/1 ms |
Enter this command on node1 to shut down the interface you configured in Step1 :
# /sbin/ifconfig interface down |
On node2, enter this command to move the IP address to node2:
# /sbin/ifconfig interface inet ip_address netmask netmask up |
From node3, ping the IP address:
# ping -c 2 ip_address |
If the ping command fails, gratuitous ARP packets are not being accepted and re-MACing is needed to fail over the IP address.
For this example, you are configuring an IP address of 192.26.50.1. This address has a network mask of 255.255.255.0, a broadcast address of 192.26.50.255, and it is configured on interface eth0.
In this example, you are also configuring an IP address of 192.26.50.2. This address also has a network mask of 255.255.255.0, a broadcast address of 192.26.50.255, and it is configured on interface eth1.
Table 2-3, shows the Linux FailSafe configuration parameters you specify for these IP addresses.
You can configure your system so that an IP address will fail over to a second interface within the same host, for example from eth0 to eth1 on a single node. A configuration example that shows the steps you must follow for this configuration is provided in Section 6.3