Thursday, 1 December 2011

Solaris - Configure IPMP


  • On Solaris machine check which interfaces currently have IP address configured. In this example we assume that e1000g0 has current IP address. To verify:

#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.75.109.50 netmask ffffff00 broadcast 192.75.109.255 ether 0:14:4f:a7:1c:3c

To check what other interfaces you have:

#dladm show-dev
e1000g0 link: up speed: 1000 Mbps duplex: full
e1000g1 link: down speed: 1000 Mbps duplex: full
e1000g2 link: down speed: 0 Mbps duplex: half
e1000g3 link: down speed: 0 Mbps duplex: half

If any of the interfaces has cable connected it will show the speed and duplex.

Add existing interface in IPMP group:

# ifconfig e1000g0 group ipmpgrp

Bring up second interface:

# ifconfig e1000g1 plumb
# ifconfig e1000g1 group ipmpgrp

To make it persistent across reboots:

vi /etc/hostname.e1000g0 and add the following:
<hostname> netmask + broadcast + group ipmpgrp up

NOTE: Please replace <hostname> with actual machine name.

Updated other interface, hostname.e1000g1 file

vi /etc/hostname.e1000g1
group ipmpgrp standby up

To verify that IPMP has been setup, please do the following
[NOT recommended for production servers]

# if_mpadm -d e1000g0 [Detach interface and force failover]

IP address should attach with e1000g1 interface.

# if_mpadm -r e1000g0 [Reattach interface and failback]

IP address should be back on e1000g0 interface