Wednesday, August 24, 2011

IPMP failover

IPMP failover



(From the man page)
NAME
     if_mpadm - change operational status of interfaces within  a
     multipathing group

SYNOPSIS
     /usr/sbin/if_mpadm -d interface_name

     /usr/sbin/if_mpadm -r interface_name



If the interface is operational, you can use if_mpadm -d to  detach or  off-line  the  interface. If the interface is off-lined, use if_mpadm -r to revert it to its original state. When a network interface is off-lined,  all  network  access fails  over  to a different interface in the IP multipathing group. Any addresses that do not failover are brought  down. Addresses marked  with IFF_NOFAILOVER do not failover. They are marked down. After an interface is off-lined, the system  will  not use  the  interface for any outbound or inbound traffic, and the interface can be safely removed from the system  without any loss of network access.

The if_mpadm utility can be applied only to interfaces  that are part of an IP multipathing group.

Here the backup ip 174.48.22.36 is in IPMP group backup-lan


(SolarisHost1:/root)# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb2: flags=69000842 mtu 0 index 2
        inet 0.0.0.0 netmask 0
        groupname backup-lan
        ether 3d:4a:97:76:8d:00
igb722000: flags=269000842 mtu 0 index 3
        inet 0.0.0.0 netmask 0
        groupname main-lan
        ether 3d:4a:97:76:8d:01
igb1: flags=1000843 mtu 1500 index 4
        inet 174.48.22.36 netmask fffffe00 broadcast 10.48.233.255
        groupname backup-lan
        ether 3d:4a:97:76:8d:0e
igb1:1: flags=1000843 mtu 1496 index 4
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
igb722000: flags=201000843 mtu 1500 index 5
        inet 174.10.11.201 netmask ffffff00 broadcast 10.120.10.255
        groupname main-lan
        ether 3d:4a:97:76:8d:0f
igb722000:1: flags=201000843 mtu 1496 index 5
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
(SolarisHost1:/root)#


We use if_mpadm to do a manual failover between an IPMP group.



The failover is performed now

(SolarisHost1:/root)# if_mpadm -d igb

Here the ip is now failed over to the other interface igb2.

(SolarisHost1:/root)# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb2: flags=21000843 mtu 1496 index 2
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname backup-lan
        ether 3d:4a:97:76:8d:00
igb2:1: flags=21000843 mtu 1496 index 2
        inet 174.48.22.36 netmask fffffe00 broadcast 10.48.233.255
igb722000: flags=269000842 mtu 0 index 3
        inet 0.0.0.0 netmask 0
        groupname main-lan
        ether 3d:4a:97:76:8d:01
igb1: flags=89000842 mtu 0 index 4
        inet 0.0.0.0 netmask 0
        groupname backup-lan
        ether 3d:4a:97:76:8d:0e
igb722000: flags=201000843 mtu 1500 index 5
        inet 174.10.11.201 netmask ffffff00 broadcast 10.120.10.255
        groupname main-lan
        ether 3d:4a:97:76:8d:0f
igb722000:1: flags=201000843 mtu 1496 index 5
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
(SolarisHost1:/root)#



Reattaching the ip back to its original interface

(SolarisHost1:/root)# if_mpadm -r igb


(SolarisHost1:/root)# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
igb2: flags=69000842 mtu 0 index 2
        inet 0.0.0.0 netmask 0
        groupname backup-lan
        ether 3d:4a:97:76:8d:00
igb722000: flags=269000842 mtu 0 index 3
        inet 0.0.0.0 netmask 0
        groupname main-lan
        ether 3d:4a:97:76:8d:01
igb1: flags=1000843 mtu 1500 index 4
        inet 174.48.22.36 netmask fffffe00 broadcast 10.48.233.255
        groupname backup-lan
        ether 3d:4a:97:76:8d:0e
igb1:1: flags=1000843 mtu 1496 index 4
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
igb722000: flags=201000843 mtu 1500 index 5
        inet 174.10.11.201 netmask ffffff00 broadcast 10.120.10.255
        groupname main-lan
        ether 3d:4a:97:76:8d:0f
igb722000:1: flags=201000843 mtu 1496 index 5
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
(SolarisHost1:/root)#





No comments:

Post a Comment