Solaris IP Multipathing Configuration
Version 0.0.1
Supported IP version:IPv4
Copyright 2003 Vladimir Collak
Overview
The IP multipathing script will configure IP multipathing for the
Solaris operating system. The technology is supported starting
with Solaris 8 and enables network interfaces to failover to their
backup counterparts. For more information about Solaris
multipathing, access the following URL:
http://wwws.sun.com/software/solaris/ds/ds-netmultipath/index.html
Basics
The script will first check the version of the Solaris OS. If greater or
equal to Solaris 8, the script to ask a series of questions.
It will first ask for the primary NIC interface. By default it knows
of "hme0" interface, but this is merely hard coded. The script does
not
extract the NIC information nor does it check whether the particular
interface exists on the system. Next, it will ask for the secondary
NIC, and group name. Further, it extracts the hostname from the system
and uses it as a baseline for secondary and test hostname. For example,
of the hostname was "server" the secondary data host name will become
"
server-1". Likewise, the test hostnames will be "server-hme0"
and "server-hme1". The last series of questions relate to secondary
data and test IPs.
Once activated the script will first set the "local-mac-address" EEPROM
variable to "true". This insures that each NIC has its own MAC address.
Next, the script will touch /etc/notrouter file to make sure the server
does not route between interfaces. Further, the script will plumb the
secondary interface, add the appropriate entries to /etc/hosts, place
the group onto both NICs, as well as insures that both primary and
secondary interfaces have appropriate netmask, broadcast, and failover
entries. Lastly, the script will add all specified sub interfaces.
Interfaces and IPs
Primary NIC (read-only)
Primary network interface. This is the interface that will failover
to its secondary counterpart. Although the script asks for the primary
interface, it never changes its configuration. It does not plumb it.
It does not change/update its IP address. This will insure that the
multipathing script can be executed over the network. The user therefore does
not
have to run this script over the console.
Secondary NIC
This is the secondary interface. It will take over for the primary NIC.
The script plumbs this interface and assigns IP an address to it.
Primary DATA Host (read-only)
This is the system's hostname. It also is not changed, although it is used
for generation of failover hostnames
Secondary DATA Host
Hostname representing secondary DATA interface
Primary Test Host
Hostname representing primary TEST interface
Secondary Test Host
Hostname representing secondary TEST interface
Primary DATA IP(read-only)
IP address of the primary interface. The script extracts this IP automatically
from system's configuration, but does not change it.
Secondary DATA IP
IP of the secondary interface. This is the failover interface and needs
an IP address
Primary TEST IP
IP used to test connection between the NICs
Secondary TEST IP
IP used to test connection between the NICs
Group
All interfaces are placed into this group. Only interfaces in a specific group
will failover.
Subinterface IP
List of all subinterface IP addresses. These will also failover.
Assumptions
The script assumes that this is the first time multipathing is configured
on the
given host. As such, it will simply append multipath hostnames to /etc/hosts
and
does not try to figure out whether these already exist or not.
Further, the script has the ability to add subinterfaces. If so, it will leave
the existing sub interfaces intact but when failover occurs, two interfaces
with
the same IP address will exist for any subinterface already in existence when
running multipath script. It is therefore recommended that all subinterfaces
are unplumbed before running the script and re-created using the script.
IPv6 addresses are not supported. Further, if they do exist, the in.mpathd
will not failover interfaces properly because the multipath script did not
add test IPs for IPv6.