May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

IPMP – Solaris

 
IPMP, or IP Multipathing, is used to provide redundant network connections for your Solaris servers.  When IPMP was first release it used a probe based method for failure detection.  This required an IP address to be placed on all NIC’s in the IPMP group, even if the NIC was just being used a test interface.  Also, the probe based methodology for failure detection would send pings out every 2 seconds and would wait for 5 failures before failing over the IP addresses to another NIC in the IPMP group.  This means that a network connection would be down for 10 seconds
before the failover occurred.

Starting with Solaris 9 link-based IPMP was released. This uses the interfaces link state to determine the status of the network connection for failover/failback purposes.  With link-based IPMP the failover will occur instantly when a link goes down. Since the failover is instantaneous and no extra IP addresses are required to build test interfaces, link-based IPMP is the preferred way to build redundant network interfaces on Solaris.

IPMP requires that each NIC has a unique MAC address. Before configuring IPMP verify that the local-mac-address? Setting on the system PROM is set to true.

# eeprom local-mac-address?
local-mac-address?=true

If it’s not set to true then run the following command to change the setting and then reboot the system

# eeprom local-mac-address?=true

Link based IPMP can be configured as active/active or active/passive.  Examples of both are provided below.

Active/Passive:

If your server is only using 1 IP address you will have to configure your IPMP as Active/ Passive. Here is a sample configuration.

krishbe$ /etc/hostname.e1000g0
192.168.3.32 group IPMP-1

krishbe$/etc/hostname.e1000g1
group IPMP-1 standby

The standby keyword is used on the passive interfaces. No hostname or IP address should be assigned to this NIC.This configuration will result in the following after a system reboot.

krishbe$ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.3.32 netmask ffffff00 broadcast 192.168.3.255
groupname IPMP-1
ether 0:21:28:27:bc:84
e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
e1000g1: flags=69000842<BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,STANDBY,INACTIVE> mtu 0 index 4
inet 0.0.0.0 netmask 0
groupname IPMP-1
ether 0:21:28:27:bc:85

An attempt to assign an IP address to a standby interface will cause that IP to be configured on another NIC in the IPMP group. Notice in the following example an attempt to assign an IP address to e1000g1 will result in a new logical interface being configured on e1000g0. As long as the link status of one NIC in the IPMP group is good, then the standby interface will not allow any IP addresses to be configured on it.

krishbe$ ifconfig e1000g1 addif 192.168.3.33 up
Created new logical interface e1000g0:2

In an active/passive configuration you can setup as many virtual IP address on the active NIC as you want.  However, if multiple IP addresses are to be used then it would probably make sense to use an active/active configuration for load balancing purposes.

Active/Active:

If your server uses multiple IP address on the same network you can spread your network load across all NIC’s in your IPMP group.  The following example shows 2 IP address on 2 NIC’s.

krishbe$ cat /etc/e1000g0
192.168.3.32 group IPMP-1

krishbe$ cat /etc/e1000g1
192.168.3.33 group IPMP-1

This configuration will result in the following after a system reboot.

krishbe$ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.3.32 netmask ffffff00 broadcast 192.168.3.255
groupname IPMP-1
ether 0:21:28:27:bc:84
e1000g1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.3.33 netmask ffffff00 broadcast 192.168.3.255
groupname IPMP-1
ether 0:21:28:27:bc:85

To test failover, you can do the hard way of pulling the cables  or use if_mpadm command as follows:

To failover:
krishbe$ if_mpadm -d bge0
To failback
krishbe$ if_mpadm -r bge0

LAB:

krishbe$ cat /etc/hostname.bge0
sinss00070 group sinss00070-ipmp up

krishbe$ cat /etc/hostname.nxge0
group sinss00070-ipmp standby up
krishbe$

krishbe$ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 11.168.34.90 netmask ffffff00 broadcast 11.168.34.255
        groupname sinss00070-ipmp
        ether 0:14:4f:3a:6f:ff
bge0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
nxge0: flags=69000842<BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,STANDBY,INACTIVE> mtu 0 index 3
        inet 0.0.0.0 netmask 0
        groupname sinss00070-ipmp
        ether 0:21:28:41:76:3a
krishbe$

krishbe$ if_mpadm -d bge0
sinss00070:krishbe$ Nov 30 16:17:10 sinss00070 in.mpathd[416]: Successfully failed over from NIC bge0 to NIC nxge0

krishbe$ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
bge0: flags=89000842<BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,OFFLINE> mtu 0 index 2
        inet 0.0.0.0 netmask 0
        groupname sinss00070-ipmp
        ether 0:14:4f:3a:6f:ff
nxge0: flags=21000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY> mtu 1500 index 3
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname sinss00070-ipmp
        ether 0:21:28:41:76:3a
nxge0:1: flags=21000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY> mtu 1500 index 3
        inet 11.168.34.90 netmask ffffff00 broadcast 11.168.34.255
krishbe$

krishbe$ if_mpadm -r bge0
Nov 30 16:17:58 sinss00070 in.mpathd[416]: Successfully failed back to NIC bge0

krishbe$ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 11.168.34.90 netmask ffffff00 broadcast 11.168.34.255
        groupname sinss00070-ipmp
        ether 0:14:4f:3a:6f:ff
bge0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
nxge0: flags=69000842<BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,STANDBY,INACTIVE> mtu 0 index 3
        inet 0.0.0.0 netmask 0
        groupname sinss00070-ipmp
        ether 0:21:28:41:76:3a
krishbe$

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>