Configure IPoIB
IP over InfiniBand (IPoIB) provides an IP network emulation layer on top of InfiniBand remote direct memory access (RDMA) networks. Unmodified applications can use IPoIB to transmit data over InfiniBand networks.
Note that the IPoIB performance is lower than if the application used RDMA natively.
The Mellanox devices, starting from ConnectX-4 and above, on RHEL 8 and later use Enhanced IPoIB mode by default (datagram only). Connected mode is not supported on these devices.
The IPoIB communication modes Copy linkLink copied!
An IPoIB device is configurable in either Datagram or Connected mode.
The difference is the type of queue pair the IPoIB layer attempts to open with the machine at the other end of the communication:
- In the
Datagrammode, the system opens an unreliable, disconnected queue pair.This mode does not support packages larger than Maximum Transmission Unit (MTU) of the InfiniBand link layer. During transmission of data, the IPoIB layer adds a 4-byte IPoIB header on top of the IP packet. As a result, the IPoIB MTU is 4 bytes less than the InfiniBand link-layer MTU. As
2048is a common InfiniBand link-layer MTU, the common IPoIB device MTU inDatagrammode is2044. - In the
Connectedmode, the system opens a reliable, connected queue pair.This mode allows messages larger than the InfiniBand link-layer MTU. The host adapter handles packet segmentation and reassembly. As a result, in the
Connectedmode, the messages sent from Infiniband adapters have no size limits. However, there are limited IP packets due to thedatafield and TCP/IPheaderfield. For this reason, the IPoIB MTU in theConnectedmode is65520bytes.The
Connectedmode has a higher performance but consumes more kernel memory.
Though a system is configured to use the Connected mode, a system still sends multicast traffic by using the Datagram mode because InfiniBand switches and fabric cannot pass multicast traffic in the Connected mode. Also, when the host is not configured to use the Connected mode, the system falls back to the Datagram mode.
While running an application that sends multicast data up to the MTU on the interface, configure the interface in Datagram mode or configure the application to cap the send size of a packet that will fit in datagram-sized packets.
IPoIB hardware address format and structure Copy linkLink copied!
InfiniBand hardware addresses, often referred to as Globally Unique Identifiers (GUIDs), are unique identifiers assigned to each InfiniBand device, such as Host Channel Adapters (HCAs). These addresses are essential for routing, device identification, and network management.
IPoIB devices have a 20 byte hardware address that consists of the following parts:
- The first 4 bytes are flags and queue pair numbers
- The next 8 bytes are the subnet prefix
The default subnet prefix is
0xfe:80:00:00:00:00:00:00. After the device connects to the subnet manager, the device changes this prefix to match with the configured subnet manager. - The last 8 bytes are the Globally Unique Identifier (GUID) of the InfiniBand port that attaches to the IPoIB device
As the first 12 bytes can change, do not use them in the udev device manager rules.
Rename IPoIB devices by using systemd link file Copy linkLink copied!
By default, the kernel names Internet Protocol over InfiniBand (IPoIB) devices, for example, ib0, ib1, and so on. To avoid conflicts, create a systemd link file to create persistent and meaningful names such as mlx5_ib0.
Before you begin Copy linkLink copied!
- You have installed an InfiniBand device.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- Reboot the host:
# reboot - Verify that the device with the MAC address you specified in the link file has been assigned to
mlx5_ib0:# ip addr show mlx5_ib03: mlx5_ib0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2044 qdisc mq state UP group default qlen 1000 link/infiniband 00:00:00:8c:fe:80:00:00:00:00:00:00:94:6d:ae:03:00:41:80:02 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff altname ibp196s0f0 altname ibs2f0 inet 172.31.0.40/24 brd 172.31.0.255 scope global dynamic noprefixroute mlx5_ib0 valid_lft 2497sec preferred_lft 2497sec inet6 fe80::6a6d:6879:7ccf:34c7/64 scope link noprefixroute valid_lft forever preferred_lft forever
Configure an IPoIB connection by using nmcli Copy linkLink copied!
You can use the nmcli utility to create an IP over InfiniBand connection on the command line.
Before you begin Copy linkLink copied!
- An InfiniBand device is installed on the server
- The corresponding kernel module is loaded
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- Use the
pingutility to send ICMP packets to the remote host’s InfiniBand adapter, for example:# ping -c5 192.0.2.2
Configure an IPoIB connection by using the network RHEL system role Copy linkLink copied!
To configure IP over InfiniBand (IPoIB), create a NetworkManager connection profile. You can automate this process by using the network RHEL system role and remotely configure connection profiles on hosts defined in a playbook.
Before you begin Copy linkLink copied!
- You have prepared the control node and the managed nodes.
- You are logged in to the control node as a user who can run playbooks on the managed nodes.
- The account you use to connect to the managed nodes has
sudopermissions for these nodes. - An InfiniBand device named
mlx5_ib0is installed in the managed nodes. - The managed nodes use NetworkManager to configure the network.
About this task Copy linkLink copied!
You can use the network RHEL system role to configure IPoIB and, if a connection profile for the InfiniBand’s parent device does not exist, the role can create it as well.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- Display the IP settings of the
mlx5_ib0.8002device:# ansible managed-node-01.example.com -m command -a 'ip address show mlx5_ib0.8002'managed-node-01.example.com | CHANGED | rc=0 >> ... inet 192.0.2.1/24 brd 192.0.2.255 scope global noprefixroute ib0.8002 valid_lft forever preferred_lft forever inet6 2001:db8:1::1/64 scope link tentative noprefixroute valid_lft forever preferred_lft forever - Display the partition key (P_Key) of the
mlx5_ib0.8002device:# ansible managed-node-01.example.com -m command -a 'cat /sys/class/net/mlx5_ib0.8002/pkey'managed-node-01.example.com | CHANGED | rc=0 >> 0x8002 - Display the mode of the
mlx5_ib0.8002device:# ansible managed-node-01.example.com -m command -a 'cat /sys/class/net/mlx5_ib0.8002/mode'managed-node-01.example.com | CHANGED | rc=0 >> datagram
Configure an IPoIB connection by using nmstatectl Copy linkLink copied!
You can use the declarative Nmstate API to configure an IP over InfiniBand (IPoIB). Nmstate ensures that the result matches the configuration file or rolls back the changes.
Before you begin Copy linkLink copied!
- An InfiniBand device is installed on the server.
- The kernel module for the InfiniBand device is loaded.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- Display the IP settings of the
mlx5_ib0.8002device:# ip address show mlx5_ib0.8002... inet 192.0.2.1/24 brd 192.0.2.255 scope global noprefixroute ib0.8002 valid_lft forever preferred_lft forever inet6 2001:db8:1::1/64 scope link tentative noprefixroute valid_lft forever preferred_lft forever - Display the partition key (P_Key) of the
mlx5_ib0.8002device:# cat /sys/class/net/mlx5_ib0.8002/pkey0x8002 - Display the mode of the
mlx5_ib0.8002device:# cat /sys/class/net/mlx5_ib0.8002/modedatagram
Test an RDMA network by using iperf3 after IPoIB is configured Copy linkLink copied!
The iperf3 utility measures RDMA and IP performance between two nodes.
Before you begin Copy linkLink copied!
- You have configured IPoIB on both hosts.
About this task Copy linkLink copied!
In the following example, the large buffer size is used to perform a 60 seconds test to measure maximum throughput and fully use the bandwidth and latency between two hosts by using the iperf3 utility.