Tuesday, October 21, 2014

SOLARIS 11 IPMP

IPMP
******
IPMP (IP multipathing) is a grouping of the network interface into single logical interface. The IPMP can be configured in two types of failure detection Link based (layer 2) & probe based (layer 3)
The IPMP feature enable us to achieve the distribution of data address (active-active) & transparent access failover (active-passive). These feature enable us for achieve high availability on our network interface when there is a failure or failover the interface when we are doing any maintenance.

A. Link-Based IPMP
===========
Active/Active
===========
1. Check if the network automatic configuration is disbaled and the default is enabled.
root:~# netadm list
TYPE        PROFILE        STATE
ncp         Automatic      disabled
ncp         DefaultFixed   online
2. list all the physical interfaces available.
root:~# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net1              Ethernet             up         1000   full      e1000g1
net0              Ethernet             up         1000   full      e1000g0
3. Add the ip in the /etc/hosts so that it remains persistent across the reboot
root:~# echo "192.168.75.25 testipmp0" >> /etc/hosts
4. Create the ipmp group & add the interface to the group
root:~# ipadm create-ipmp ipmp0
root:~# ipadm create-ip net0
root:~# ipadm create-ip net1
root:~# ipadm add-ipmp -i net0 -i net1 ipmp0
5. Assign the ip address for the ipmp interface which is configured.
root:~# ipadm create-addr -T static -a 192.168.75.21/24 ipmp0/v4
6. Review the configurtion.
root:~# ipmpstat -g
GROUP       GROUPNAME   STATE     FDT       INTERFACES
ipmp0       ipmp0       ok        --        net1 net0
root:~# ipmpstat -a
ADDRESS                   STATE  GROUP       INBOUND     OUTBOUND
suntest                   up     ipmp0       net1        net1 net0
root:~# ipmpstat -i
INTERFACE   ACTIVE  GROUP       FLAGS     LINK      PROBE     STATE
net0        yes     ipmp0       -------   up        disabled  ok
net1        yes     ipmp0       --mbM--   up        disabled  ok
As you can see both the network interfaces are active here and part of ipmp group
===============
Active/Passive
===============
For configuring the Active/Passive link based ipmp group perform the same step from 1 to 4 and then
5. Make one of the interface as standby from the ipmp group and then assign the ip
root:~# ipadm set-ifprop -p standby=on -m ip net1
root:~# ipadm create-addr -T static -a 192.168.75.21/24 ipmp0/v4
6. Review the configurtion.
root:~# ipmpstat -g
GROUP       GROUPNAME   STATE     FDT       INTERFACES
ipmp0       ipmp0       ok        --        net0 (net1)
root:~# ipmpstat -a
ADDRESS                   STATE  GROUP       INBOUND     OUTBOUND
suntest                   up     ipmp0       net0        net0
root:~# ipmpstat -in
INTERFACE   ACTIVE  GROUP       FLAGS     LINK      PROBE     STATE
net1        no      ipmp0       is-----   up        disabled  ok
net0        yes     ipmp0       --mbM--   up        disabled  ok

B. Probe-base IPMP
The probe-based IPMP that is supported in Solaris 11 are two kind with Test ip on interfaces & Transitive probing.
*** Configuring Probe-based with Test addresses (Active/Active) ***
1. Confirm if the transitive probling is not started, which by default is set to test address
root:~# svccfg -s svc:/network/ipmp listprop config/transitive-probing
config/transitive-probing boolean     false
2. Create the ipmp group and add the interface
root:~# ipadm create-ipmp ipmp0
root:~# ipadm create-ip net0
root:~# ipadm create-ip net1
root:~# ipadm add-ipmp -i net0 -i net1 ipmp0
3. Assign the ip for the ipmp interface and test address for the physical interfaces/
root:~# ipadm create-addr -T static -a 192.168.75.21/24 ipmp0/v4
root:~# ipadm create-addr -T static -a 192.168.75.2/24 net0/test1
root:~# ipadm create-addr -T static -a 192.168.75.3/24 net1/test2
4. Add a target to which the interfaces will probe.
root:~# route add default 192.168.75.1
5. Review if everything is working as you wanted.
root:~# ipmpstat -an
ADDRESS                   STATE  GROUP       INBOUND     OUTBOUND
192.168.75.21             up     ipmp0       net0        net1 net0
root:~# ipmpstat -tn
INTERFACE   MODE       TESTADDR            TARGETS
net1        routes     192.168.75.3        192.168.75.1
net0        routes     192.168.75.2        192.168.75.1
root:~# ipmpstat -in
INTERFACE   ACTIVE  GROUP       FLAGS     LINK      PROBE     STATE
net1        yes     ipmp0       -------   up        ok        ok
net0        yes     ipmp0       --mbM--   up        ok        ok

For configuring Probe-based with Test adresses (Active/passive) just do one step after 3
root:~# ipadm set-ifprop -p standby=on -m ip net1
and the difference you will see as below
root:~# ipmpstat -in
INTERFACE   ACTIVE  GROUP       FLAGS     LINK      PROBE     STATE
net1        no      ipmp0       is-----   up        ok        ok
net0        yes     ipmp0       --mbM--   up        ok        ok
root:~# ipmpstat -an
ADDRESS                   STATE  GROUP       INBOUND     OUTBOUND
192.168.75.21             up     ipmp0       net0        net0

*** Configuring Transtive probing using Active/Active method ***
1. Enable the transitive probing
root:~# svccfg -s svc:/network/ipmp setprop config/transitive-probing=true
root:~# svcadm refresh ipmp
2. Create the ipmp group and add the interface
root:~# ipadm create-ipmp ipmp0
root:~# ipadm create-ip net0
root:~# ipadm create-ip net1
root:~# ipadm add-ipmp -i net0 -i net1 ipmp0
3. Assign the ip for the ipmp interface
root:~# ipadm create-addr -T static -a 192.168.75.21/24 ipmp0/v4
4. Review the configuration
root:~# ipmpstat -tn
INTERFACE   MODE       TESTADDR            TARGETS
net1        transitive <net1>              <net0>
net0        routes     192.168.75.21       192.168.75.1
root:~# ipmpstat -pn
TIME      INTERFACE   PROBE  NETRTT    RTT       RTTAVG    TARGET
0.77s     net1        t247   1.92ms    1.93ms    1.70ms    <net0>
0.77s     net0        i244   0.86ms    1.15ms    1.09ms    192.168.75.1
1.88s     net1        t248   1.68ms    1.69ms    1.70ms    <net0>
1.88s     net0        i245   0.73ms    1.21ms    1.11ms    192.168.75.1

No comments:

Post a Comment