I. Introduction of IPMP
IP network multipath (IP networks multipathing, IPMP) provides physical interface fault detection and transparent network access failover capabilities for systems with multiple interfaces on the same IP link. IPMP also provides package load allocation for systems with multiple interfaces.
With IPMP, you can configure one or more physical interfaces into an IP multipath group (IPMP), and after you configure IPMP, the failover capability of IPMP can remain connected and prevent any existing connections from being disconnected.
second, the noun explanation
IPMP Group: consists of one or more physical interfaces that are configured with the same IPMP group name in the same system. All interfaces in an IPMP group must be connected to the same IP link, and the IPMP group name of the same string is used to identify all the interfaces in the group.
Data Address : The general address of the interface that directs the specified or manually assigned to the NIC via the Ifconfig command (which can be understood as the IP address of the external service)
Test Address : The IPMP-specific address used by the IN.MPATHD daemon, at least one Test address must be configured for an interface to use probe-based fault and repair detection. (Can be understood as the address of the physical NIC itself)
After an interface failure, the test address remains on the failed interface so that IN.MPATHD can continue sending probes to check for subsequent fixes. Test addresses must be specifically configured so that applications do not accidentally use them, and the test address needs to be marked as deprecated.
Iii. Basic requirements of IPMP
1. All interfaces in an IPMP group must have a unique MAC address;
2. All interfaces in an IPMP group must have the same media type
Iv. two ways to implement IPMP
IPMP is implemented in two ways:
L link-based IPMP: Link class-based, no test IP required
L probe-based IPMP: Based on IP tracing, we often use this, need to test IP, and must be able to ping the gateway
Five, the experimental environment
Operating system: Oracle Solaris ten 1/13 s10s_u11wos_24a SPARC
Network card: IXGBE0 and Ixgbe1
Ixgbe0:192.168.0.101
ixgbe1:192.168.0.102
Foreign Service ip:192.168.0.100
This article is only a configuration for Solaris 10, and if it is Solaris 11 there are a number of different
Vi. steps of Implementation
1. Identify components of IPMP
The IPMP group can be configured as a single-interface IPMP group, or it can be configured as a two-interface IPMP group, in this case, IXGBE0 and IXGBE1 are configured as IPMP groups.
2. Verify the MAC address
All interfaces in an IPMP group must have a unique MAC address, so you should first check the
Each interface has a unique MAC address.
On SPARC platforms, each SPARC-based system has a system-wide MAC address that is used by default for all interfaces, so the MAC address is the same for each interface by default, but to use IPMP, each interface in the group must have a unique MAC address. These addresses must use the factory-installed MAC address. can use "EEPROM local-mac-address?" command to detect whether the system-wide MAC address is used by all interfaces of the current system:
# EEPROM local-mac-address?
Local-mac-address?=flase
If the corresponding value of the eeprpm command is false, it means that all interfaces use a system-wide MAC address and must change the value to True
# EEPROM Local-mac-address?=true
# EEPROM local-mac-address?
Local-mac-address?=true
3. Select a name for the IPMP group
Any non-empty name can be used as the name of the group, where the name of the set group is "Ipmp0"
4.
ensure that the streams module
All interfaces in the same group must have the same streams module configured in the same order, and a list of streams modules can be output via the ifconfig ixgbe0 modlist command
# ifconfig IXGBE0 modlist
0 ARP
1 IP
2 Ixgbe
Interface is typically located directly below the IP module as a network driver, no additional settings are required.
5. Configure an IPMP group
1) probe-based IPMP
a) Configure the/etc/hosts file
# vi/etc/hosts
:: 1 localhost
127.0.0.1 localhost
192.168.0.101 TEST-IXGBE0
192.168.0.102 TEST-IXGBE1
192.168.0.100 Test Loghost
Here is the relationship for setting up DNS
192.168.0.101 corresponding TEST-IXGBE0 (test IP for NIC IXGBE0)
192.168.0.102 corresponding TEST-IXGBE1 (test IP for NIC Ixgbe1)
192.168.0.100 corresponding to test (the data ip,test for the IPMP group is the hostname of the external service)
b) Configure the/etc/hostname.interface file
# VI/ETC/HOSTNAME.IXGBE0
Test netmask + broadcast + group ipmp0 up \
AddIf TEST-IXGBE0 deprecated-failover netmask + broadcast + up
test: Set the host name of the external server, has been set in the/etc/hosts file, where the IP address can be replaced (192.169.0.100);
netmask+: set subnet mask, according to/etc/netmask file;
broadcast+: corresponds to/etc/netmask to calculate the broadcast address of a network,
For the broadcast address of the network, it is generally the largest address in this network segment;
group Ipmp0: set the IPMP group name to Ipmp0;
up : Similar to the Enable function of the network card;
addif TEST-IXGBE0 : A sub-interface is added to the IPMP group, where it can be an IP address, and the name can be used directly because it has been defined in the Hosts file;
deprecated : Mark this address as the test address;
-failover : inform the system that this address represents the connection if it fails, do not switch (test address)
# VI/ETC/HOSTNAME.IXGBE1
TEST-IXGBE1 netmask + broadcast + group Ipmp0 deprecated-failover up
The setting here is the same as the previous meaning, because the IPMP0 group has been established, so there is no need to build it again, add the group name Ipmp0 directly
c) View results
# ifconfig-a
Lo0:flags=2001000849<up,loopback,running,multicast,ipv4,virtual> MTU 8232 Index 1
inet 127.0.0.1 netmask ff000000
IXGBE0: flags=1000843<up,broadcast,running,multicast,ipv4> MTU index 2
inet 192.168.0.100 netmask ffffff80 broadcast 192.168.0.254
GroupName IPMP
Ether 0:1B:21:6F:8D:DC
ixgbe0:1: flags=9040843<up,broadcast,running,multicast,deprecated,ipv4,nofailover> MTU index 2
inet 192.168.0.101 netmask ffffff80 broadcast 192.168.0.254
ixgbe1: flags=9040843<up,broadcast,running,multicast,deprecated,ipv4,nofailover> MTU Index 3
inet 192.168.0.102 netmask ffffff80 broadcast 192.168.0.254
GroupName IPMP
Ether 0:1b:21:6f:8d:de
Sppp0:flags=10010008d1<up,pointopoint,running,noarp,multicast,ipv4,fixedmtu> MTU Index 4
inet 192.168.3.3-192.168.3.1 netmask ffffff00
Ether 0:0:0:0:0:0
With the Ifconfig–a command, you can see
The group name for IPMP is "IPMP",
"IXGBE0" Assigned data address 192.168.0.100 (external service address)
"Ixgbe0:1" The test address of this NIC (192.168.0.101) in its logical interface;
"IXGBE1": Assigned the test address 192.168.0.102.
d) Testing
Select Deactivate "IXGBE0" to test if IPMP is working properly
bash-3.2# if_mpadm-d IXGBE0
bash-3.2# ifconfig-a
Lo0:flags=2001000849<up,loopback,running,multicast,ipv4,virtual> MTU 8232 Index 1
inet 127.0.0.1 netmask ff000000
IXGBE0: flags=89000842<broadcast,running,multicast,ipv4,nofailover,offline> MTU 0 index 2
inet 0.0.0.0 netmask 0
GroupName IPMP
Ether 0:1B:21:6F:8D:DC
ixgbe0:1: flags=89040842<broadcast,running,multicast,deprecated,ipv4,nofailover,offline> MTU 1500 Index 2
inet 192.168.0.101 netmask ffffff80 broadcast 192.168.0.254
ixgbe1: flags=9040843<up,broadcast,running,multicast,deprecated,ipv4,nofailover> MTU Index 3
inet 192.168.0.102 netmask ffffff80 broadcast 192.168.0.254
GroupName IPMP
Ether 0:1b:21:6f:8d:de
ixgbe1:1: flags=1000843<up,broadcast,running,multicast,ipv4> MTU Index 3
inet 192.168.0.100 netmask ffffff80 broadcast 192.168.0.254
Sppp0:flags=10010008d1<up,pointopoint,running,noarp,multicast,ipv4,fixedmtu> MTU Index 4
inet 192.168.3.3-192.168.3.1 netmask ffffff00
Ether 0:0:0:0:0:0
# ping 192.168.0.101
No answer from 192.168.0.101
# ping 192.168.0.100
192.168.0.100 is alive
With the Ifconfig–a command, you can see
"If_mpadm": if_mpadm–d stop a network card, if_mpadm–r restore a network card.
"IXGBE0": Previously assigned the data address, because the network card is deactivated, so the IP has been migrated to other network cards.
"Ixgbe0:1" The test address of this NIC (192.168.0.101) in its logical interface;
"IXGBE1": Assigned the test address 192.168.0.102.
"Ixgbe1:1": Because the "IXGBE0" network card is deactivated, the data IP is migrated to the logical interface of the network card, continue to provide services
Restore the deactivated IXGBE0 with the following results:
# If_mpadm-r IXGBE0
# ifconfig-a
Lo0:flags=2001000849<up,loopback,running,multicast,ipv4,virtual> MTU 8232 Index 1
inet 127.0.0.1 netmask ff000000
IXGBE0: flags=1000843<up,broadcast,running,multicast,ipv4> MTU index 2
inet 192.168.0.100 netmask ffffff80 broadcast 192.168.0.254
GroupName IPMP
Ether 0:1B:21:6F:8D:DC
ixgbe0:1: flags=9040843<up,broadcast,running,multicast,deprecated,ipv4,nofailover> MTU index 2
inet 192.168.0.101 netmask ffffff80 broadcast 192.168.0.254
Ixgbe1:flags=9040843<up,broadcast,running,multicast,deprecated,ipv4,nofailover> MTU Index 3
inet 192.168.0.102 netmask ffffff80 broadcast 192.168.0.254
GroupName IPMP
Ether 0:1b:21:6f:8d:de
Sppp0:flags=10010008d1<up,pointopoint,running,noarp,multicast,ipv4,fixedmtu> MTU Index 4
inet 192.168.3.3-192.168.3.1 netmask ffffff00
Ether 0:0:0:0:0:0
# ping 192.168.0.101
192.168.0.101 is alive
# ping 192.168.0.102
192.168.0.102 is alive
# ping 192.168.0.100
192.168.0.100 is alive
Results IPMP works correctly
2) link-based IPMP
The configuration method and the IP-based test method are basically the same, but the required IP address is less, mainly modify the following several files.
a) Configure the/etc/hosts file
# vi/etc/hosts
:: 1 localhost
192.168.0.100 Test Loghost
b) Configure the/etc/hostname.interface file
# CAT/ETC/HOSTNAME.IXGBE0
192.168.0.100 netmask + broadcast + group IPMP up \
# CAT/ETC/HOSTNAME.IXGBE1
Group IPMP Up
c) View results
bash-3.2# ifconfig-a
Lo0:flags=2001000849<up,loopback,running,multicast,ipv4,virtual> MTU 8232 Index 1
inet 127.0.0.1 netmask ff000000
IXGBE0: flags=1000843<up,broadcast,running,multicast,ipv4> MTU index 2
inet 192.168.0.100 netmask ffffff80 broadcast 192.168.0.254
GroupName IPMP
Ether 0:1B:21:6F:8D:DC
ixgbe1: flags=1000843<up,broadcast,running,multicast,ipv4> MTU Index 3
inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
GroupName IPMP
Ether 0:1b:21:6f:8d:de
Sppp0:flags=10010008d1<up,pointopoint,running,noarp,multicast,ipv4,fixedmtu> MTU Index 4
inet 192.168.3.3-192.168.3.1 netmask ffffff00
Ether 0:0:0:0:0:0
As can be seen through the Ifconfig–a command, the IPMP group is named "IPMP", the IP of the external server is 192.168.0.100, and two ports do not have to configure the test IP, saving the IP resources.
d) Testing
Disable a IXGBE0 NIC to check if IP is healthy
bash-3.2# if_mpadm-d IXGBE0
Dec 4 10:28:09 test-ixgbe0 in.mpathd[228]: Successfully failed over from Nic Ixgbe0 to Nic Ixgbe1 //Prompt IP has been successful Switch from IXGBE0 to Ixgbe1
bash-3.2# ifconfig-a
Lo0:flags=2001000849<up,loopback,running,multicast,ipv4,virtual> MTU 8232 Index 1
inet 127.0.0.1 netmask ff000000
IXGBE0: flags=89000842<broadcast,running,multicast,ipv4,nofailover,offline> MTU 0 index 2
inet 0.0.0.0 netmask 0
GroupName IPMP
Ether 0:1B:21:6F:8D:DC
ixgbe1: flags=1000843<up,broadcast,running,multicast,ipv4> MTU Index 3
inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
GroupName IPMP
Ether 0:1b:21:6f:8d:de
ixgbe1:1: flags=1000843<up,broadcast,running,multicast,ipv4> MTU Index 3
inet 192.168.0.100 netmask ffffff80 broadcast 192.168.0.254
Sppp0:flags=10010008d1<up,pointopoint,running,noarp,multicast,ipv4,fixedmtu> MTU Index 4
inet 192.168.3.3-192.168.3.1 netmask ffffff00
Ether 0:0:0:0:0:0
bash-3.2# Ping 192.168.0.100
192.168.0.100 is alive
vii. Off-topicTypes of IPMP interface configurations
IPMP can be configured in the following two modes:
activity-Activity configuration : A two-interface IPMP group, where two interfaces are "active", that is, they can always transmit both probe traffic and data traffic (the way this article is used)
Active-Standby configuration: A two-interface IPMP group with one interface configured as "standby" (standby)
Official website definition: The Standby interface in this group is not used for data communication unless one of the other interfaces in the IPMP group fails. In the event of a failure, the data address on the failed interface is migrated to the standby interface. The standby interface will then be treated like any other active interface until the failed interface is repaired. Some failovers may not select the standby interface. Instead, these failovers may choose an active interface that has fewer data addresses configured to up than the standby interface.
Only test addresses should be configured on the standby interface. IPMP does not allow data addresses to be added to interfaces configured with the Ifconfig command as standby. Any attempts to create this type of configuration will fail. Similarly, if you configure an interface that already has a data address as standby, those addresses will automatically fail over to the other interfaces in the IPMP group. Because of these limitations, you must use the Ifconfig command to mark all test addresses as-deprecated and failover before you set the interface to standby. about how to configure the standby interface.
In the example of this article, the line is configured:
# VI/ETC/HOSTNAME.IXGBE1
TEST-IXGBE1 netmask + broadcast + group Ipmp0 deprecated-failover standby up
# ifconfig IXGBE1
ixgbe1: flags=69040843<up,broadcast,running,multicast,deprecated,ipv4,nofailover,standby, INACTIVE> MTU Index 3
inet 192.168.0.101 netmask ffffff80 broadcast 192.168.0.254
GroupName IPMP
Ether 0:1b:21:6f:8d:de
The standby interface can only have an IP address, which means that the-failover must be set before the test address setting standby up is selected.
INACTIVE: Flag This interface is not used for any outgoing packets, the INACTIVE flag is cleared when this standby interface fails over.
This article from the "Linux Growth Record" blog, reproduced please contact the author!
Solaris System Configuration IPMP (IP addressing and link based)