3 Testing MPTCP Subflows Using mptcpize
The mptcpize
utility can be used to confirm that MPTCP is working and using different subflows between hosts. The mptcpize
utility lets existing network-aware programs use MPTCP by loading a special library before executing the program.
Installing mptcpize
On Oracle Linux release 10, mptcpize
is provided by the mptcpd
package. To install mptcpd
, run the following command:
sudo dnf install mptcpd
Verify installation by running the following command and reviewing the help:
mptcpize --help
Using mptcpize to Test MPTCP
This example shows how to test an HTTP connection between two systems (System A and System B).
On System B, start an HTTP server. Use any available server, for example, using Python:
python3 -m http.server 80
The output is similar to the following:
Serving HTTP on 0.0.0.0 port 80
On System A, use curl
to connect to System B using mptcpize
. For example:
mptcpize run curl http://192.0.2.20/
The response is an HTML page containing a directory listing:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Directory listing for /</title>
</head>
<body>
<h2>Directory listing for /</h2>
<hr>
...
Note:
You can use mptcpize
with many other network tools, such as wget
and iperf3
.
Checking Subflow Usage
After running the test connection, you can verify that different subflows are active by running the following command on either host and receiving results similar to those shown:
ss --mptcp
In the following command output, the field mptcp_subflows:2
indicates that two subflows are established:
State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB 0 0 192.0.2.10:50412 192.0.2.20:80 users:(("curl",pid=20748,fd=3)) mptcp_subflows:2