For long we used Tracking IP based IPMP wherein we track the availability of a gateway on the network using ICMP Echo request. When the gateway IP fails to respond it is considered link is unavailable and NIC fails over to the standby NIC in the IPMP group.
The biggest disadvantage here is that we use 3 IP addresses:
1 for the Virtual IP
1 for the active NIC
1 for the Standby NIC
and ofcourse the overhead of the ICMP echo requests sent every seconds.
This can be overcome using the Link based IPMP configuration where you only need only IP Address and there is no overhead of ICMP messages and the failover delay is lot lesser than that of the tracking method. And the added advantage of a very simple configuration.
To configure Link based IPMP, create the hostname.<int name> files for the Active NIC and the standby NIC. For instance here, we use the bge0 and bge3 NICs as the IPMP pair where bge0 is active and bge3 is standby and hence the files hostname.bge0 and hostname.bge3.
To configure Link based IPMP, create the hostname.<int name> files for the Active NIC and the standby NIC. For instance here, we use the bge0 and bge3 NICs as the IPMP pair where bge0 is active and bge3 is standby and hence the files hostname.bge0 and hostname.bge3.
root@solaris10:/etc # ls -l hostname*-rw-r–r– 1 root root 55 May 6 11:23 hostname.bge0-rw-r–r– 1 root root 23 May 6 11:23 hostname.bge3
Edit the hostname.bge0 file and enter the following:
root@solaris10:/etc # vi hostname.bge0solaris10 netmask + broadcast + group sol10-ipmp up
where,
“solaris10” is the hostname which should have a corresponding host entry in the /etc/hosts file.
sol10-ipmp is the name of the IPMP group.
Edit the hostname.bge3 and the following
root@solaris10:/etc # vi hostname.bge3group sol10-ipmp up
Here as you can see the standby NIC only has IPMP group configuration. This is all is needed to setup Link based IPMP. When the server is rebooted this configuration should take effect
To do this on the fly, we can use the ifconfig command:
NIC bge0
root@solaris10:/etc # ifconfig bge0 plumbroot@solaris10:/etc # ifconfig bge0 192.168.0.1 netmask 255.255.255.0 group sol10-ipmp up
NIC bge3
root@solaris10:/etc # ifconfig bge3 plumbroot@solaris10:/etc # ifconfig bge3 group sol10-ipmp up
This should do.root@solaris10:/etc # ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1inet 127.0.0.1 netmask ff000000bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2inet 192.168.0.1 netmask ffffff00 broadcast 192.168.0.255groupname sol10-ipmpether 0:a:1d:ee:ab:cdbge3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 5inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255groupname sol10-ipmpether 0:a:1d:ee:ab:d2
To test failover, you can do the hard way of pulling the cables or use if_mpadm command as follows:
To failover:
root@solaris10:/etc # if_mpadm -d bge0
To failback
root@solaris10:/etc # if_mpadm -r bge0
Comments
Post a Comment