IPMP on Solaris 10
Solaris has built-in IP Multi Pathing. IPMP can be setup with either IP tracking or link based. This is my notes on setting up link based IPMP on a LDOM with two virtual interfaces.
Setup the two interfaces:
# more /etc/hostname.vnet* :::::::::::::: /etc/hostname.vnet0 :::::::::::::: myhostname netmask + broadcast + group sol10-ipmp up :::::::::::::: /etc/hostname.vnet1 :::::::::::::: group sol10-ipmp up
After reboot ifconfig output:
# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 vnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.2.14.53 netmask fffff800 broadcast 10.2.15.255 groupname sol10-ipmp ether 0:14:4f:fa:b5:34 vnet1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255 groupname sol10-ipmp ether 0:14:4f:fa:42:b5
Down the main interface:
# if_mpadm -d vnet0 # tail -1 /var/adm/messages Aug 22 14:46:07 myhostname in.mpathd[285]: [ID 832587 daemon.error] Successfully failed over from NIC vnet0 to NIC vnet1
Ifconfig output:
# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 vnet0: flags=89000842<BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,OFFLINE> mtu 0 index 2 inet 0.0.0.0 netmask 0 groupname sol10-ipmp ether 0:14:4f:fa:b5:34 vnet1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255 groupname sol10-ipmp ether 0:14:4f:fa:42:b5 vnet1:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 10.2.14.53 netmask fffff800 broadcast 10.2.15.255
Recover the main interface:
# if_mpadm -r vnet0 # tail -3 /var/adm/messages Aug 22 14:46:30 myhostname in.mpathd[285]: [ID 620804 daemon.error] Successfully failed back to NIC vnet0 Aug 22 14:46:30 myhostname in.routed[656]: [ID 417587 daemon.error] IP_ADD_MEMBERSHIP ALLHOSTS: Address already in use Aug 22 14:46:30 myhostname in.routed[656]: [ID 537788 daemon.warning] Could not join 224.0.0.9 on interface vnet0: Address already in use # ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 vnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.2.14.53 netmask fffff800 broadcast 10.2.15.255 groupname sol10-ipmp ether 0:14:4f:fa:b5:34 vnet1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255 groupname sol10-ipmp ether 0:14:4f:fa:42:b5