IPMP Configuration
Introduction
IP Network Multipathing (IPMP) enables you to detect interface failures and transparently switch network access for a system with multiple interfaces on the same IP link. IPMP also allows load balancing of packets for systems with multiple interfaces.
The equivalent on Linux is called bonding and on BSD, it's called trunking.
IPMP improves the reliability, availability, and network performance of systems with multiple physical interfaces. Sometimes a physical interface or the networking hardware connected to that interface fails or requires maintenance. Traditionally, it is then impossible to contact the system through any of the IP addresses associated with the failed interface. Additionally, any existing connections to the system using those IP addresses are disrupted.
By using IPMP, you can configure one or more physical interfaces into an IPMP group. After IPMP configuration, the system automatically monitors the interfaces in the group for failure. If an interface in the group fails or is removed for maintenance, IPMP automatically migrates, or fails over, the failed interface's IP addresses. The recipient of these addresses is a functioning interface in the failed interface's IPMP group. The failover feature of IPMP preserves connectivity and prevents disruption of any existing connections. Additionally, IPMP improves overall network performance by spreading outbound network traffic across all interfaces in the IPMP group. This process is called load spreading.
Configuration
Prerequisites
IPMP is built into the Solaris operating system and does not require any special hardware. Any interface supported by Solaris can be used with IPMP. However, your network configuration and topology must meet the following IPMP-related requirements:
- All interfaces in an IPMP group must have unique MAC addresses. Note that by default, network interfaces of SPARC-based systems share the same MAC address. Therefore, you need to explicitly change the default address to use IPMP on SPARC-based systems.
- All interfaces in an IPMP group must be of the same media type (e.g., Ethernet with Ethernet, Fiber with Fiber, but not mixed).
- All interfaces in an IPMP group must be on the same IP link (same subnet).
- Depending on your requirements for failure detection, you'll either need to use specific types of network interfaces or configure additional IP addresses on each network interface.
/etc/hosts
You'll need to configure the hosts file to specify the IPs of the machines, test IPs, and virtual IPs:
/etc/netmasks
Now you'll need to set the network and subnet in the /etc/netmasks file:
Creating an IPMP Group
You'll need to create an IPMP group and add network cards to it. If you want fault tolerance, you'll need to activate a test IP. This IP will not be part of the VIPs (Virtual Private Interface). Configure as follows:
Here are the meanings:
- deprecated: Indicates that the test address is not used for outgoing packets.
- failover: Indicates that the test address does not failover when the interface fails.
- standby: Marks the interface as the standby interface.
Restart afterward to apply the configuration and check that it's properly taken into account at reboot.
Modifying the Probing Time
If you want to change the interval at which the system will detect a disconnection of an interface, edit the following file:
Testing
To test now, it's quite simple. Look at the current configurations:
Here you can clearly see the IPMP interfaces as well as the interface that is in standby and inactive. Now, if we disconnect the first interface, the failover will happen automatically :-)
Now the interface has gone into failed state. And there was no interruption during this period. The interface that was in standby is now no longer inactive. So now it's functional, and if we reconnect the interface, we return to the previous configuration.