Thursday 14 July 2011

LINK BASED IPMP CONFIGURATION ON SOLARIS

IPMP is nothing but just an abbreviation  of IP multipathing.Chances are there that if a network card fails in a server,for redundancy we need to keep something.In Solaris we have got two types of IPMP
1)Probe based IPMP &
2)Link based IPMP

In Probe based IPMP,we will have to asssign two ip address per NIC card and a virtual ip will play between these cards based on the availability.These are supported by some old NIC cards like ce0 etc..
In Link based IPMP,we need to assign only one IP provided the 2nd NIC card should be plumbed and up end running.Most of the modern NIC cards like igb0,e000g0 etc. support this type of IPMP

Below i have mentioned how to configure IPMP both in Probe based and :Link based fashion.

LINK BASED IPMP

1)first of all plumb 2 n/w cards , make it running and assign one IP address to one card.

  bash-3.00#  ifconfig igb0 plumb
 bash-3.00#  ifconfig igb1 plumb
  bash-3.00# ifconfig igb0 10.1.18.249 netmask 255.255.255.0 up
bash-3.00#ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb0: flags=19000802<BROADCAST,MULTICAST,IPv4,NOFAILOVER,FAILED> mtu 0 index 2
        inet 10.1.18.249 netmask 0
ether 0:21:28:b1:52:7c
igb1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        ether 0:21:28:b1:52:7d


--------------------------------------------------------------------------
2)Now in the files /etc/hostname.igb0 and /etc/hostname.igb1 insert the following entries which will create a group ipmp0 that will get changed according to scenarios.



bash-3.00# more /etc/hostname.igb0
PSBLTEST netmask + broadcast + group ipmp0 up
bash-3.00# more /etc/hostname.igb1
group ipmp0 up


--------------------------------------------------------------------------


3) After that restart the network service

bash-3.00#/etc/init.d/network stop
 bash-3.00#/etc/init.d/network start
bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.1.18.249 netmask ffffff00 broadcast 10.1.18.255
        groupname ipmp0
        ether 0:21:28:b1:52:7c
igb0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
igb1: flags=19000802<BROADCAST,MULTICAST,IPv4,NOFAILOVER,FAILED> mtu 0 index 3
        inet 0.0.0.0 netmask 0
        groupname ipmp0
        ether 0:21:28:b1:52:7d


--------------------------------------------------------------------------
4)Check for IPMP is working or not with the logs that we obtain


bash-3.00# if_mpathd -d igb0


May 5 21:31:52 PSBLTEST in.mpathd[244]: The link has come up on igb0
May  5 21:31:52 PSBLTEST in.mpathd[244]: NIC repair detected on igb0 of group ipmp0
May  5 21:31:52 PSBLTEST in.mpathd[244]: Successfully failed back to NIC igb0

 bash-3.00# ifconfig -a
bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb0: flags=19000802<BROADCAST,MULTICAST,IPv4,NOFAILOVER,FAILED> mtu 0 index 2
        inet 0.0.0.0 netmask 0
        groupname ipmp0
        ether 0:21:28:b1:52:7c
igb1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname ipmp0
        ether 0:21:28:b1:52:7d
igb1:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 10.1.18.249 netmask ffffff00 broadcast 10.1.18.255

-----------------------------------------------------------------------



bash-3.00# if_mpathd -r igb0


May  5 21:31:59 PSBLTEST in.mpathd[244]: The link has gone down on igb1
May  5 21:31:59 PSBLTEST in.mpathd[244]: NIC failure detected on igb1 of group ipmp0
May  5 21:31:59 PSBLTEST in.mpathd[244]: Successfully failed over from NIC igb1 to NIC igb0



We can see that the IP got switched between the virtual n/w intefaces when either of the one goes down.


--------------------------------------------------------------------



1 comment: