IP Multipathing (IPMP) in Sun Solaris enables the load balancing capabilities and resilience for Network connections with multple Network Interface Cards (NIC).
IPMP is mostly used to provide resilience with network connections wherein a Sun Solaris Server with multiple NICs can be configured such that if the primary NIC fails it automatically failover to the secondary NIC on the system. Also, if it is a multi-switch environment then each Network Interface participating in IPMP can be connection to two different switches such that a network connection failure due to a NIC failure or a switch failure can be avoided.
To configure IPMP for resiliency we need to have
1. Virtual IP Address
2. Test IP Address for each NIC.
The Virtual IP is the actual Data IP and the test IPs are the ones used by IPMP to probe a remote target system to check connectivity. The test IP interfaces are marked as “deprecated” which indicates that this IP should be used by applications for any network data transfer. The NICs doesn’t have to be of the same make or have to be the same speed (10/100/1000Mbps). However, they should be of the same kind (Ethernet here)
In our configuration,
192.168.1.100 – Virtual IP
192.168.1.101 – Test IP for ce0 (NIC1)
192.168.1.102 – Test IP for ce1 (NIC2)
appserver – Hostname
appserver-ce0 – Hostname for IP on ce0 interface
appserver-ce1 – Hostname for IP on ce1 interface
Add Host Entries in /etc/hosts
Let’s start with adding the hosts entries for the IP addresses in the /etc/hosts file.
# IPMP group appserver-ipmp
192.168.1.100 appserver loghost
192.168.1.101 appserver-ce0 loghost
192.168.1.102 appserver-ce1 loghost
Create hostname.ce* files
For every interface on the system create a hostname.ce* file. For us, create the files
hostname.ce0 & hostname.ce1
Add the following on the hostname.ce0 file. This is the primary or master interface of the IPMP Pair
appserver-ce0 netmask + broadcast + group appserver-ipmp deprecated -failover up\
addif appserver netmask + broadcast + failover up
Add the following on the hostname.ce1 file. This is the secondary or slave interface of the IPMP Pair
appserver-ce1 netmask + broadcast + group appserver-ipmp deprecated \
-failover standby up
netmask – sets default netmask values
broadcast – sets default broadcast address
-failover – indicates that the test IPs should not be failed over
deprecated – indicates that the interface should not be used for data transfer
Now, the configuration is complete and an ifconfig output should look like as follows:
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 2
inet 192.168.1.101 netmask ffffff00 broadcast 192.168.1.255
ce0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.100 netmask ffffff00 broadcast 192.168.1.255
ce1: flags=69040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY,INACTIVE> mtu 1500 index 3
inet 192.168.1.102 netmask ffffff00 broadcast 192.168.1.255
You can see a new virtual interface for “ce0” is being created as “ce0:1” and the “ce1” interface status is UP but INACTIVE. Indicating it is up and participating in the IPMP but is as a standby. Test by pinging the device continously from a remote PC and unplugging the active NIC and you should see no packets drop. Reverse the tests and check if it works OK. Also, if you are on the console, you can see the live link messages (check later from /var/adm/messages)
3 thoughts on “Configure IPMP network resilience with Multiple NICs in Solaris”
So with the other device being in standby up mode does it still load balance outbound traffic across both nics?
I have implented similiar configuration in our server. Its like there are 4 NIC interfaces, out of which 2( a pair) is a part of ipmp group. The remaining 2 interfaces are not part of ipmp, hence they have one ip assigned each.
But to my surprise, when i rebooted, one of interfaces which is no part of ipmp is down(its like its ip is 0.0.0.0 and subnet is 0.0.0.0)
All the interfaces have unique mac adress, as i changed the obp variable local-mac-address?=true
Hi, will this configuration work with 2 nodes, I mean, I understand this will help me do a failover on the same server with 2 NICs. What about failover on a NIC on a different server?