Probe-based failure detection involves the use of target systems, as explained in Probe-Based Failure Detection. For some IPMP groups, the default targets used by in.mpathd is sufficient. However, for some IPMP groups, you might want to configure specific targets for probe-based failure detection. You accomplish probe-based failure detection by setting up host routes in the routing table as probe targets. Any host routes that are configured in the routing table are listed before the default router. Therefore, IPMP uses the explicitly defined host routes for target selection. You can use either of two methods for directly specifying targets: manually setting host routes or creating a shell script that can become a startup script.
Consider the following criteria when evaluating which hosts on your network might make good targets.
Make sure that the prospective targets are available and running. Make a list of their IP addresses.
Ensure that the target interfaces are on the same network as the IPMP group that you are configuring.
The netmask and broadcast address of the target systems must be the same as the addresses in the IPMP group.
The target host must be able to answer ICMP requests from the interface that is using probe-based failure detection.
Log in with your user account to the system where you are configuring probe-based failure detection.
Add a route to a particular host to be used as a target in probe-based failure detection.
$ route add -host destination-IP gateway-IP -static |
Replace the values of destination-IP and gateway-IP with the IPv4 address of the host to be used as a target. For example, you would type the following to specify the target system 192.168.85.137, which is on the same subnet as the interfaces in IPMP group testgroup1.
$ route add -host 192.168.85.137 192.168.85.137 -static |
Add routes to additional hosts on the network to be used as target systems.
On the system where you have configured an IPMP group, assume the Primary Administrator role or become superuser.
The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
Create a shell script that sets up static routes to your proposed targets.
For example, you could create a shell script called ipmp.targets with the following contents:
TARGETS="192.168.85.117 192.168.85.127 192.168.85.137" case "$1" in 'start') /usr/bin/echo "Adding static routes for use as IPMP targets" for target in $TARGETS; do /usr/sbin/route add -host $target $target done ;; 'stop') /usr/bin/echo "Removing static routes for use as IPMP targets" for target in $TARGETS; do /usr/sbin/route delete -host $target $target done ;; esac |
Copy the shell script to the startup script directory.
# cp ipmp.targets /etc/init.d |
Change the permissions on the new startup script.
# chmod 744 /etc/init.d/ipmp.targets |
Change ownership of the new startup script.
# chown root:sys /etc/init.d/ipmp.targets |
Create a link for the startup script in the /etc/init.d directory.
# ln /etc/init.d/ipmp.targets /etc/rc2.d/S70ipmp.targets |
The S70 prefix in the file name S70ipmp.targets orders the new script properly with respect to other startup scripts.