IP multipathing on Solaris 10 with Hanic (NIC Redundancy with one IP)

Hanic ?
Do you know what's that.
Yes, Hanic is NIC Redundancy with one IP, hanic was made by "Partha Subramanian", and based on perl, hanic more simply and powerfull than IPMP, the default solaris IP multipathing. Why hanic was simply, in hanic we unnecessary to defined all requirement for respective NIC , just install, run and ready to failover.

Bellow, this is the step by step for hanic used.

1. First of all, we must got the hanic source as usually

bash> wget http://www.sun.com/bigadmin/scripts/submittedScripts/hanic.tar.gz

2. Show your NIC for me

bash> ifconfig e1000g0 plumb
bash> ifconifg e1000g1 plumb
bash> vi /etc/hosts
192.168.85.3    training.bascomp.org    training

3. Install hanic on your system

bash> gunzip hanic.tar.gz|tar xvf -
bash> cd hanic
bash> chmod +x *
bash> ./hanic.install

As usually software installation you must follow the guide, something like this.
Define your primary and secondary NIC, type your IP Address, your netmask and then reboot your system, for completed the installation.

bash> init 6

4. Failover IP Address

bash> hanic -monitor;hanic -cleanup
bash> hanic -status
 
STATUS - HA NIC Monitoring
-------------------------------------------------
State       Active(Passive)    PID
-------------------------------------------------
Running     e1000g1(e1000g0)   1081
-------------------------------------------------

Oke. seem to be hanic work as predictable, furthermore we test the fail over with "switch" command, whereabout "switch" do the switch ip address from primary NIC to secondary NIC.

bash> ifconfig -a
e1000g1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 6
inet 192.168.85.3 netmask ffffff00 broadcast 192.168.85.255
ether 8:0:27:86:2e:c4
bash> hanic -status
 
STATUS - HA NIC Monitoring
-------------------------------------------------
State       Active(Passive)    PID
-------------------------------------------------
Running     e1000g1(e1000g0)   1081
-------------------------------------------------
bash> hanic -switch
 
bash> hanic -status
 
STATUS - HA NIC Monitoring
-------------------------------------------------
State       Active(Passive)    PID
-------------------------------------------------
Running     e1000g0(e1000g1)   1081
-------------------------------------------------
 
bash> ifconfig -a
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 7
inet 192.168.85.3 netmask ffffff00 broadcast 192.168.85.255
ether 8:0:27:82:21:80

5. Failover offline interface
Oke works perfect ha, now lets start second trial, for this situation try to offline the active network interface, and see what's going, for monitoring this trial, you can see wheter the connection drop or not with ping command.

bash> ifconfig -a
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.85.3 netmask ffffff00 broadcast 192.168.85.255
ether 8:0:27:82:21:80
 
bash> hanic -offline
 
bash> ifconfig -a
e1000g1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
inet 192.168.85.3 netmask ffffff00 broadcast 192.168.85.255
ether 8:0:27:86:2e:c4
 
bash> hanic -status
 
STATUS - HA NIC Monitoring
-------------------------------------------------
State       Active(Passive)    PID
-------------------------------------------------
Running     e1000g1(e1000g0)   1081
-------------------------------------------------

Source from: http://dot.choosen.net/2009/04/06/ip-multipathing-on-solaris-10-with-hanic-nic-redundancy-with-one-ip/

Printed from: http://sysinfo.bascomp.org/2009/04/ip-multipathing-on-solaris-10-with-hanic-nic-redundancy-with-one-ip/ .
© 2010.

Leave a Reply