multipath-tcp / mptcpd

mptcpd is a daemon for Linux that performs Multipath TCP path management related operations in the user space 😈
https://mptcpd.mptcp.dev/
BSD 3-Clause "New" or "Revised" License
169 stars 36 forks source link

Subflows won't be used when there's a more specific route to the host with different interface than the default route's #293

Closed arinc9 closed 1 week ago

arinc9 commented 1 week ago

I want to avoid using the path the default route points to. It is default via 192.168.1.1 dev enp2s0.

I've set up the subflows I want to use:

$ sudo ip mp e
192.168.13.2 id 1 subflow fullmesh dev enp3s0.3 
192.168.14.2 id 2 subflow fullmesh dev enp3s0.4 

Then added a route to the host I want to connect to which points to one of the paths I want to use as a subflow:

hostIPv4 via 192.168.13.1 dev enp3s0.3

The gateway for both paths are already described:

sudo ip rule add from 192.168.13.2 table 100
sudo ip rule add from 192.168.14.2 table 101
sudo ip route add default via 192.168.13.1 table 100
sudo ip route add default via 192.168.14.1 table 101

In this case, the second subflow won't be used:

$ mptcpize run iperf3 -c hostIPv4
[       CREATED] token=20b1293a remid=0 locid=0 saddr4=192.168.13.2 daddr4=hostIPv4 sport=58362 dport=5201
Connecting to host hostIPv4, port 5201
[       CREATED] token=973e67fc remid=0 locid=0 saddr4=192.168.13.2 daddr4=hostIPv4 sport=58366 dport=5201
[  5] local 192.168.13.2 port 58366 connected to hostIPv4 port 5201
arinc9 commented 1 week ago

I suppose it would make more sense to open this issue on the mptcp_net-next repository.