Simple Solaris IP Multipathing

Posted March 15, 2006 by mcdsco in Solaris networking

IP multipathing consists of grouping two identical network cards together and having a live IP address be able to automatically fail over from one card to the other with no loss or degredation of service.


The steps to accomplish this are as follows:

1. Ensure that both cards are seen by the system and have different MAC addresses.
2. Group the cards together.
3. Add a test IP address to the first card.
4. Add a test IP address to the second card.
5. Change the hostname.* files to keep these settings after a reboot.

Before going into each of these steps in detail, a few points should be kept in mind in regards to assigning IP addresses. When activating IP multipathing on a server, a total of three IP addresses will be used. The private address space that you have typically uses a Class C address space, with only 254 usable addresses, so it is advised that only production servers get multipathed. Also, to keep the IP address space “clean,” the standard that has been adopted for IP assignments is that the main failover IP for production servers should be in the range of 192.168.2.1 to 54, the first test address should be 100 higher than the main address, and the second test address should be 200 higher than the main address. This will put the final octet of the first test address in the range 101 to 154, and the final octet of the second test address in the range of 20 1 to 254. DNS entries for the test addresses should also be created, even though the addresses are not used. The dns name for the first test address should be hostname of the server with “-test1” concatenated to the end, and the dns name for the done likewise with “-test2” appended.

For this exercise, we will use a hostname of server1, a main IP address of 192.168.2.9, and gigaswift ethernet cards ce0 and ce1.

Ensure that both cards are seen by the system and have different MAC addresses.
By default, Sun servers have the PROM setting ‘local-mac-address?’ set to false, which causes all ethernet cards to assume the MAC address of the primary (built in) ethernet card. This can be checked by using the following command:

eeprom local-mac-address?

If the result is false, then issue this command:

eeprom local-mac-address?=true

Next, run ‘ifconfig -a’ to ensure that both cards are seen by the system. Most likely, only ce0 will be seen and be in use. If this is the case, then run ‘ifconfig ce1 plumb’ to plumb the second card. If the local-mac-address? eeprom variable had to be set to true, then the results of ‘ifconfig -a’ will reveal that both cards have identical MAC addresses. If this is the case, then manually set the MAC address of the second card to some unique address with the following command:

ifconfig ce1 ether de:ad:be:ef:f0:0d

The next time the server reboots, both ethernet cards will take on new mac addresses.

Group the cards together.
Both ethernet cards need to be assigned to the same group to allow multipathing to know to which cards an IP address can fail over. This is accomplished with the following commands:

ifconfig ce1 server-int
ifconfig ce0 server-int

In this case, “server-int” is the groupname. The groupname can be any arbitrary string.

Add a test IP address to the first card.
Each ethernet card will have a “test” IP address assigned to it that will only be used by the system to verify that the card is functioning correctly. To set this address for the first card, issue the following command (This is all one command to be typed on one line, regardless of how word-wrapping handles it in this document.):

ifconfig ce0 addif 192.168.2.109 netmask + broadcast + deprecated -failover up

Add a test ip address to the second card.
To add the second ethernet card’s test IP, issue the following (This is all one command to be typed on one line, regardless of how word-wrapping handles it in this document.):

ifconfig ce1 192.168.2.209 netmask + broadcast + deprecated -failover standby up

Change the hostname.* files to keep these settings after a reboot.
The current /etc/hostname.ce0 contains just the hostname of the server. This will need to be replaced with the following:

group server-int
set 192.168.2.9/24 broadcast + up
addif 192.168.2.109/24 broadcast + deprecated -failover up

Create the /etc/hostname.ce1 file with the following text in it:

group server-int
set 192.168.2.209/24 broadcast + -failover deprecated standby up

The Conversation

Follow the reactions below and share your own thoughts.