Configuring Multipathing


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:

  • Failure detection ” IPMP detects when a network interface has failed and switches the network access to an alternate network interface. This is called failover .

  • Repair detection ” In addition to detecting the failure of a network interface, IPMP also detects when a failed network interface has been repaired and is operational again. The network access is restored to the original network interface. This is called failback .

  • Load balancing ” IPMP provides load balancing of outbound traffic across multiple network interfaces to achieve a higher throughput rate, but network traffic must be going to multiple destinations.

A number of requirements need to be satisfied before IPMP can be used:

  • You must be running Solaris 8, release 10/00 or later. Even though this book is based on Solaris 9, you might have other systems running earlier versions of the Solaris operating environment. Check the contents of the file /etc/release on your system to confirm the version and release that is installed.

  • There must be more than one physical network interface installed to allow IPMP to function in a meaningful way. IPMP can be implemented on a system with a single network interface, but this would normally be done to gain extra status information, or to prepare the system for the addition of a second network interface.

  • A test address must be configured for each network interface that uses IPMP. This address is not used for normal operations, but is used to probe the interface as part of the failure detection facility.

  • Each interface participating in IPMP must be configured to be a member of the same multicast group .

  • Each network interface present in the system must be configured with a unique ethernet address. This includes those interfaces that may not be part of the multipathing group.

The in.mpathd Daemon

The in.mpathd daemon process detects both interface failures and when failed interfaces have been repaired. It does this in two ways:

  • It sends and receives ICMP echo messages (known as probes ) via the IPMP logical interface to other hosts connected to the network. Five failed probes constitutes a failure and ten consecutive responses constitutes a repaired interface.

  • It monitors the internal flag IFF_RUNNING on the interface. This flag is defined as part of IP and can be seen when running the ifconfig -a command.

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

  • FAILURE_DETECTION_TIME=10000 ” This is the time in milliseconds (10 seconds) that it takes in.mpathd to detect an interface failure. It can be tuned as required, higher or lower, but the minimum is 100 milliseconds (0.1 seconds).

  • FAILBACK=yes ” This option is enabled by default and allows the automatic failback of a repaired interface. Change this value to "no" if you do not want automatic failback.

  • TRACK_INTERFACES_ONLY_WITH_GROUPS=yes ” This option is enabled by default and means that in.mpathd monitors only those interfaces that belong to a multicast group. You can change this value to no to monitor all network interfaces on the system, but the interfaces must all have unique ethernet addresses.

graphics/alert_icon.gif

The only method of detection to which the FAILURE_DETECTION_TIME variable in the /etc/default/mpathd file applies is the sending of ICMP messages; it doesn't apply to the monitoring of the IFF_RUNNING flag.


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.

graphics/note_icon.gif

The in.mpathd process determines the hosts to probe dynamically; you cannot configure them. Routers are chosen as targets for probing ”if there are no routers, non-routing hosts are arbitrarily chosen . You should ensure there is at least one other system on the network to allow probing to take place.


Using Configuration Files

Configuration 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 
graphics/alert_icon.gif

The deprecated option means that the interface should not be used for normal operations, and the -failover option means that this address is not to be used as a failover when a failed interface is detected . This is only a test address for in.mpathd to use for failure and repair detection.


Reboot the system and then run ifconfig -a again to verify that the configuration has been successful:

[View full width]
 
[View full width]
# 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 groupname ultra ether 8:0:20:b3:41:53 hme0:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4, NOFAILOVER> mtu graphics/ccc.gif 1500 index 2 inet 192.168.28.29 netmask ffffff00 broadcast 192.168.28.255 hme1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 192.168.28.30 netmask ffffff00 broadcast 192.168.28.255 groupname ultra ether 8:0:20:b1:40:55 hme1:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4, NOFAILOVER> mtu graphics/ccc.gif 1500 index 3 inet 192.168.28.31 netmask ffffff00 broadcast 192.168.28. 255

Using the Command Line

IPMP 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.



Solaris 9 Network Administration Exam Cram 2 (Exam Cram CX-310-044)
Solaris 9 Network Administrator Exam Cram 2 (Exam CX-310-044)
ISBN: 0789728702
EAN: 2147483647
Year: 2003
Pages: 174
Authors: John Philcox

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net