RHEL 8.x/7.x
This package is supported on RHEL, and the RHEL-based distributions such as CentOS Linux, Rocky Linux, and Alma Linux.
NOTE: On RHEL 7.x-based kernels the package only provides multipath on NFSv3 mounts.
Here we demonstrate multipath with two local interfaces on the same subnet.
First we need to install NetworkManager-config-routing-rules
.
yum install NetworkManager-config-routing-rules
We configure new source routing tables:
echo '101 101' >> /etc/iproute2/rt_tables
echo '102 102' >> /etc/iproute2/rt_tables
For this example we assume two interfaces are configured via ifcfg-
scripts:
$ grep IPADDR /etc/sysconfig/network-scripts/ifcfg-ib0
IPADDR=192.168.40.1
$ grep IPADDR /etc/sysconfig/network-scripts/ifcfg-ib1
IPADDR=192.168.40.2
For each interface we need to add a route-
and rule-
files:
$ cat /etc/sysconfig/network-scripts/route-ib0
192.168.40.0/24 via 192.168.40.1 table 101
$ cat /etc/sysconfig/network-scripts/rule-ib0
from 192.168.40.1/32 table 101
NOTE: This is only an example. The IP addresses you pick depend on your network configuration.
After reloading with nmcli connection reload
, the ip
command with regard to routing
should look like this (notice the two added lookup
lines):
$ ip rule
0: from all lookup local
32764: from 192.168.40.1 lookup 101
32765: from 192.168.40.2 lookup 102
32766: from all lookup main
32767: from all lookup default
$ ip route show table 101
192.168.40.0/24 via 192.168.40.1 dev ib0
$ ip route show table 102
192.168.40.0/24 via 192.168.40.2 dev ib1
Verify that the IPs and routing tables appear correctly. Below are examples which will vary based on environment:
IP addresses:
$ ip a s | grep 192.168.40
inet 192.168.40.1/24 brd 192.168.40.255 scope global ib0
inet 192.168.40.2/24 brd 192.168.40.255 scope global ib1
Document generated on 2022.05.17 09:13 for v4.0-pre6, branch dev