Friday, March 27, 2009

Solaris IP Multipathing

I've setup lots of machines for IPMP (IP Multipathing), so I thought I would share a simpler step by step approach.
  • Get 2 NIC's in your machine (most of sun servers have multiple NIC's built-in). Not compulsory to have same type of NIC, but it's important that they have the same speed capability.
  • Obtain 3 IP addresses in the same local LAN or (VLAN) segment. In IPMP there are 2 fixed (or private) addresses and 1 floating (or public) address. The 2 fixed addresses I refer to as internal. The 1 floating addresses is the external one. If one of the NICs detects link failure, the address tied to that NIC fails over to the working NIC. When the NIC comes back up, the address fails back to its original home. Determine right now which will be your internal IPs and which will be your external. I recommend keeping the same convention for all Multipath machines, no matter what convention you choose. Here are two typical conventions
  1. The 1st IP is floating
  2. Next 2 IPs are fixed
  • Edit /etc/hosts with your 3IPs. Example:
192.168.200.11 host loghost #External IP
192.168.200.12 host-e1000g0 # Internal IP for NIC 1
192.168.200.13 host-nxge0 # Internal IP for NIC 2
  • Configure network interfaces.
You need to configure the secondary interface and make it have a unique ether address that is persistent across reboots.
# eeprom 'local-mac-address?=true'
  • Setup hostname.* files.
You can pretty much copy these two files as is and just modify them slightly to fit your naming conventions in the same way that you setup the /etc/hosts file above.

/etc/hostname.e1000g0
host-e1000g0 netmask + broadcast + group ipmp0 deprecated –failover up \
addif host netmask + broadcast + failover up

/etc/hostname.nxge0
host-nxge0 netmask + broadcast + group ipmp0 deprecated –failover up
  • make it active
# ifconfig –a unplumb; ifconfig lo0 plumb; svcadm restart physical