The following procedure describes how to configure an IPMP group in which one interface is kept as a standby interface. This interface is deployed only when an active interface in the group fails.
For overview information about standby interfaces, see Types of IPMP Interface Configurations.
# ipadm create-ipmp ipmp-interface
ipmp-interface specifies the name of the IPMP interface.
# ipadm add-ipmp -i under-interface1 [-i underinterface2 ...] ipmp-interface
under-interface refers to the underlying interface of the IPMP group. You can add as many IP interfaces as are available on the system.
# ipadm create-addr -a address ipmp-interface
address can be in CIDR notation.
# ipadm create-addr -a address under-interface
address can be in CIDR notation. All test IP addresses in an IPMP group must belong to a single IP subnet and therefore using same network prefix.
# ipadm set-ifprop -p standby=on -m ip under-interface
The following example shows how to create an active-standby IPMP configuration.
First, the IPMP interface is created.
# ipadm create-ipmp ipmp0
The underlying IP interfaces are then created and added to the IPMP interface.
# ipadm create-ip net0 # ipadm create-ip net1 # ipadm create-ip net2 # ipadm add-ipmp -i net0 -i net1 -i net2 ipmp0
Next, IP addresses are assigned to the IPMP interface. IP addresses that are assigned to the IPMP interface are data addresses. In this example, the IPMP interface has two data addresses.
# ipadm create-addr -a 192.0.2.5/24 ipmp0 ipadm: ipmp0/v4 # ipadm create-addr -a 192.0.2.10/24 ipmp0 ipadm: ipmp0/v4a
The IP address in this example includes the prefixlen property, which is expressed as a decimal number. The prefixlen portion of the IP address specifies the number of left-most contiguous bits of the address that comprise the IPv4 netmask or the IPv6 prefix of the address. The remaining low-order bits define the host part of the address. When the prefixlen property is converted to a text representation of the address, the address contains 1's for the bit positions that are to be used for the network part and 0's for the host part. This property is not supported on the dhcp address object type. For more information, see the ipadm(1M) man page.
IP addresses are then assigned to the underlying IP interfaces of the IPMP group. IP addresses that are assigned to the underlying interfaces are test addresses to be used for probe-based failure detection.
# ipadm create-addr -a 192.0.2.15/27 net0 ipadm: net0/v4 # ipadm create-addr -a 192.0.2.20/27 net1 ipadm: net1/v4 # ipadm create-addr -a 192.0.2.25/27 net2 ipadm: net2/v4
Lastly, the net2 interface is configured as a standby interface.
# ipadm set-ifprop -p standby=on -m ip net2
The administrator can view the IPMP configuration by using the ipmpstat command.
# ipmpstat -g GROUP GROUPNAME STATE FDT INTERFACES ipmp0 ipmp0 ok 10.00s net0 net1 (net2) # ipmpstat -t INTERFACE MODE TESTADDR TARGETS net0 routes 192.0.2.15/27 192.0.2.2/27 net1 routes 192.0.2.20/27 192.0.2.2/17 net2 routes 192.0.2.25/27 192.0.2.5/27