IP multipathing (IPMP) is delivered as part of the Solaris 9 operating environment and provides a failover mechanism for network interfaces, allowing an alternate network interface to dynamically assume the address of a failed interface and handle the network traffic until the failed interface is restored to operational status. IPMP also delivers increased throughput by balancing the load across the interfaces. IPMP has the following features:
A number of requirements need to be satisfied before IPMP can be used:
The in.mpathd DaemonThe in.mpathd daemon process detects both interface failures and when failed interfaces have been repaired. It does this in two ways:
If either of these two methods reports a failure, then the interface can be considered failed. Conversely, both methods have to report the interface as operational before it is marked as repaired. When the in.mpathd daemon starts up, it reads default information from the file /etc/default/mpathd . This file contains three variables that are used to determine the standard behavior of the daemon. The standard /etc/default/mpathd file that is delivered with Solaris 9 is as follows : # #pragma ident "@(#)mpathd.dfl 1.2 00/07/17 SMI" # # Time taken by mpathd to detect a NIC failure in ms. The minimum time # that can be specified is 100 ms. # FAILURE_DETECTION_TIME=10000 # # Failback is enabled by default. To disable failback turn off this option # FAILBACK=yes # # By default only interfaces configured as part of multipathing groups # are tracked. Turn off this option to track all network interfaces # on the system # TRACK_INTERFACES_ONLY_WITH_GROUPS=yes The three variables in the above file are
As part of the repair detection mechanism, in.mpathd continues to send ICMP echo requests to a failed network interface, so that it can determine if it becomes operational again. A group failure is said to have occurred if it appears that all the interfaces in a multipath group fail at the same time, or if none of the hosts respond to the ICMP messages. In this instance, in.mpathd flushes its list of hosts to probe and tries to find new targets instead.
Using Configuration FilesConfiguration files can be used to configure IPMP, which can then be activated on the next system reboot. The /etc/hostname.< interface > file needs to be edited for each network interface participating in IP multipathing. /etc/inet/hosts should also contain meaningful names so that the interfaces do not have to be referred to by IP addresses. Each network interface must have a unique address, so if necessary, you will have to assign local addresses to each interface. This was described in Chapter 1 "Local Area Networks" in the section, "Assigning a Port-Based Ethernet Address." For this example, assume a system with two network interfaces, hme0 (hostname ultra10 , IP address 192.168.28.28 ) and hme1 (hostname ultra10_1 , IP address 192.168.28.30 ), and the multicast group is called ultra . The first thing to do is to make note of the current configuration by using the ifconfig -a command as shown in the following example. Do this before making any changes in case you need to restore it. # ifconfig -a lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.28.28 netmask ffffff00 broadcast 192.168.28.255 ether 8:0:20:b3:41:53 hme1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 192.168.28.30 netmask ffffff00 broadcast 192.168.28.255 ether 8:0:20:b1:40:55 To make life easier, add the IP addresses and hostname details to /etc/inet/hosts for each of the logical interfaces that will be used as test addresses. In this example, use ultra10_mp and 192.168.28.29 for hme0 , and ultra10_1_mp and 192.168.28.31 for hme1 . To configure IPMP, you need to edit both of the interface configuration files, /etc/hostname.hme0 and /etc/hostname.hme1 , so that they look like the following: # cat /etc/hostname.hme0 ultra10 netmask + broadcast + group ultra up \ addif ultra10_mp deprecated netmask + broadcast + -failover up # # cat /etc/hostname.hme1 ultra10_1 netmask + broadcast + group ultra up \ addif ultra10_1_mp deprecated netmask + broadcast + -failover up
Reboot the system and then run ifconfig -a again to verify that the configuration has been successful: [View full width]
Using the Command LineIPMP can also be configured via the command line, but you should note that, using this method, your changes exist only until the next reboot. To make permanent changes that are persistent across system reboots, edit the configuration files as in the preceding section. Configuring IPMP from the command line is the same as using the configuration files, except that you don't edit the /etc/hostname.< interface > files. To configure, for example, the hme0 interface, using the same details as in the preceding section, start by making the hme0 interface a member of the multicast group ultra , as follows: # ifconfig hme0 group ultra Now, configure the next logical interface to be the test address. # ifconfig hme0 addif ultra10_mp deprecated netmask + broadcast + \ -failover up Created new logical interface hme0:1 Setting netmask of hme0:1 to 255.255.255.0 Again, verify the configuration has been successful by running the ifconfig -a command. The results should be identical to the output produced in the previous example. |