Nmstate

A Declarative API for Host Network Management

View on GitHub

MultiPath TCP

MultiPath TCP (MPTCP) support is introduced by nmstate 2.2.0 and requires NetworkManager 1.40 or greater.

By assigning MPTCP flags to IP addresses, MPTCP-enabled TCP connections can benefit from extra TCP subflows.

Nmstate can query out the MPTCP flags of each IP address found on a specific interface but only supports assigning the same MPTCP flags to all the IP addresses of this interface.

To effectively enable MPTCP, besides using nmstate to configure MPTCP flags on IP addresses, depending on your Linux distribution kernel configuration, you might also need to perform these actions before using nmstate, and persist these changes by yourself:

These commands are only for testing purpose, please check with MPTCP documents and technical support for details.

Example to add ‘subflow’ and ‘signal’ MPTCP flags to all IP addresses of eth1.

---
interfaces:
  - name: eth1
    type: ethernet
    state: up
    mptcp:
      address-flags:
        - subflow
        - signal
    ipv4:
      enabled: true
      dhcp: false
      address:
        - ip: 192.0.2.2
          prefix-length: 24

Example of querying MPTCP of eth1:

---
interfaces:
  - name: eth1
    type: ethernet
    state: up
    mptcp:
      address-flags:
        - subflow
        - signal
    ipv4:
      enabled: true
      dhcp: false
      address:
        - ip: 192.0.2.2
          prefix-length: 24
          mptcp-flags:
            - subflow
            - signal

Limitations

How to tell MPTCP is working.