Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Can TCP MultiPath be used to create multiple TCP Connections over the same Interface? #410

Open
dbaddorf opened this issue Mar 15, 2021 · 6 comments
Labels

Comments

@dbaddorf
Copy link

I am looking to try to take a single TCP connection between two SAN's used for replication, and split that TCP stream into multiple TCP Connections over a WAN. I would like to try to see if I can get more throughput with multiple TCP connections than just a single TCP connection (but only using a single Path between destinations). Can TCP MultiPath be used with a single Ethernet port (creating multiple connections) instead of using multiple interfaces (with different paths)?

SAN --- tcpreen (to redirect TCP endpoint) --- TCP Multipath === TCP Multipath --- tcpreen --- SAN

This may not work at all, but I'd appreciate any thoughts about it.

@matttbe
Copy link
Member

matttbe commented Mar 15, 2021

Hi,

Can TCP MultiPath be used with a single Ethernet port (creating multiple connections) instead of using multiple interfaces (with different paths)?

Yes, you can. The path-manager module is responsible to create and accept subflows, e.g.

  • The "fullmesh" path manager is acting per address: you can have multiple IP addresses per network interface
  • the "ndiffport" PM is creating multiple subflows by creating subflows to different ports: it can use the same network interface

Probably best to look at scientific papers about that.

For your use-case, you might want something with ndiffport or having in the middle -- between the two tcpreen elements -- a TCP to MPTCP proxy.

@dbaddorf
Copy link
Author

Good point about allowing multiple IP's on a single NIC. Thanks for reminding me of that.
I was hoping to use the tcpreen as a sort of "tcp-flow redirector", where I could point SAN1 to the tcpreen server and it would automatically send the TCP traffic to the next tcpreen server, which would then redirect the traffic to the intended destination SAN2. Then I put MPTCP on the two Linux tcpreen servers to multi-path the traffic between these two servers to gain throughput.
I could be entirely misunderstanding both tcpreen and/or MPTCP but I was hoping that I could "insert" the combination of tcpreen and MPTCP in between two devices which I have no control over (other than changing the replication partner IP's).

@matttbe
Copy link
Member

matttbe commented Mar 15, 2021

You need both end-host to "discuss MPTCP" to be able to benefit from MPTCP.
If you have hosts in the middle that can create/accept MPTCP connections but only forward the TCP traffic, this traffic will remain TCP. If these hosts intercept TCP traffic and proxy the data using MPTCP (new connections), then you can benefit from MPTCP.

If tcpreen is proxying the traffic to new TCP connections, these new connections can use MPTCP.

@dbaddorf
Copy link
Author

dbaddorf commented Apr 15, 2021 via email

@matttbe
Copy link
Member

matttbe commented Apr 27, 2021

It sounds like using ndiffport would be great because I could have multiple TCP connections between the two Ubuntu VM's while each VM uses a single IP. (Although I am open to configuring each VM to have multiple IP's on their respective subnets).

Why do you need MPTCP between the two Ubuntu hosts? It makes sense if each path of the MPTCP connections is not sharing the same bottleneck (not taking the same path).

A typical use-case of ndiffport is in data centres where each host can reach others via different paths and each connection is load balanced through different paths. In this case, using the same IPs but not the same ports is enough to have each TCP subflow of an MPTCP connection taking different paths.
Are you in this case?

In many other cases, you have different network interfaces connected to different networks. You then use multiple IPs.
It might be easier to route the traffic differently with multiple IPs but I don't know your setup.

But my confusion is how do you configure the MPTCP on either end to agree to use the same set of ports? In other words, how would I configure Ubuntu1 to send traffic to Ubuntu2 on ports 2000, 2001, and 2002? How would I get tcpreen to send traffic via MPTCP? And how would I configure Ubuntu2 to listen on ports 2000, 2001, and 2002 and then pass that TCP traffic to tcpreen?

With ndiffport, on the client side, you only have to configure the number of subflows you want to have: /sys/module/mptcp_ndiffports/parameters/num_subflows.
The client will create X subflows across the same pair of IP-addresses but only modifying the source-port. No need to bind on different ports.

Can we close the ticket?

@dbaddorf
Copy link
Author

dbaddorf commented Apr 28, 2021 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants