multipath-tcp / mptcp

⚠️⚠️⚠️ Deprecated 🚫 Out-of-tree Linux Kernel implementation of MultiPath TCP. 👉 Use https://github.com/multipath-tcp/mptcp_net-next repo instead ⚠️⚠️⚠️
https://github.com/multipath-tcp/mptcp_net-next
Other
888 stars 335 forks source link

if down the mainflow, all connect (subflow)will be shut down? #383

Open leidemon opened 4 years ago

leidemon commented 4 years ago

hi, mptcp team: I use ubuntu 18.04.3 and mptcp 0.95 to test, and I found that if I down the mainflow, all connect will be shut down,is it normal ?How can I setup that it can switch to subflow,or it can't? the mptcp config of client: mptcp_path_manager fullmesh mptcp_scheduler default

matttbe commented 4 years ago

Hi @leidemon

If the first subflow of a connection is disconnected the transfer can continue on other subflows if any.

if I down the mainflow, all connect will be shut down,is it normal?

How did you do that?

leidemon commented 4 years ago

hi,@matttbe: I use the cmd "ifconfig ens3x down " to shut down the mainflow or subflow,and it behaves differently.

leidemon commented 4 years ago

嗨@leidemon

如果连接的第一个子流断开连接,则传输可以继续进行其他子流(如果有)。 @matttbe So it only can switch to another subflow? I found some cmd in the internet: ip link set dev eth0 multipath backup But I haven't tried.

matttbe commented 4 years ago

Are all subflows going through ens3x?

I found some cmd in the internet: ip link set dev eth0 multipath backup

This would mark all subflows as backup. The default policy for the backup is: you only use these subflows if no other non-backup ones are available.

I guess that's not what you need.

You can also kill a subflow, like any TCP connections, using iptables if you need to do some experiments. Or you put an intermediate router, only used for some subflows, down.

leidemon commented 4 years ago

Are all subflows going through ens3x? no,my env like this:(mptcp_fullmesh->num_subflows=1) ens33 for mainflows ens38 for subflows

You can also kill a subflow, like any TCP connections, using iptables if you need to do some >experiments. Or you put an intermediate router, only used for some subflows, down.

thank you ,I will try the iptables to kill the subflows; rfc6824 2.2 "The exchange of keys in the MP_CAPABLE handshake provides material that can be used to authenticate the endpoints when new subflows will be set up. " rfc6824 3.3 “The subflow handshake mechanism (Section 3.2) will ensure that new subflows only join the correct connection” it means that the subflows build on mainflows? what I care is I shut down the mainflow,the subflow will be closed too,and it does not switch to subflows?

matttbe commented 4 years ago

if you have 1 MPTCP with 2 subflows, 1 per network interface, if you shutdown one interface, any of them, all the traffic should be handled by the remaining subflow.

If it is not the case, you will have to look at traces (e.g. tcpdump on each interface) to understand what happened: how the subflow have been stopped (RST? FIN?) and how the MPTCP connection is stopped (MP FastClose? MP DataFin?)

What you are trying to do is similar to: https://www.youtube.com/watch?v=VWN0ctPi5cw

leidemon commented 4 years ago

if you have 1 MPTCP with 2 subflows, 1 per network interface, if you shutdown one interface, any of them, all the traffic should be handled by the remaining subflow.

If it is not the case, you will have to look at traces (e.g. tcpdump on each interface) to understand what happened: how the subflow have been stopped (RST? FIN?) and how the MPTCP connection is stopped (MP FastClose? MP DataFin?)

What you are trying to do is similar to: https://www.youtube.com/watch?v=VWN0ctPi5cw

Thank you , tomorrow I will check about it ,by the way the config of mptcp need some changes or just by default?

matttbe commented 4 years ago

you still need to configure the routing properly to use 2 different interfaces: http://multipath-tcp.org/pmwiki.php/Users/ConfigureRouting

leidemon commented 4 years ago

您仍然需要正确地配置路由以使用两个不同的接口:http://multipath-tcp.org/pmwiki.php/Users/ConfigureRouting about this,I think it is not the problem, I use the ss-redir and router rule to handle the packets to ss-server.then to connect to internet; but I will check more about it.

leidemon commented 4 years ago

如果您有1个具有2个子流的MPTCP,每个网络接口1个,则如果关闭一个接口(其中的任何一个),则所有流量应由其余子流处理。

如果不是这种情况,则必须查看跟踪(例如每个接口上的tcpdump)以了解发生了什么:子流如何停止(RST?FIN?)以及MPTCP连接如何停止(MP FastClose?MP)。 DataFin?)

您要尝试执行的操作类似于:https : //www.youtube.com/watch?v=VWN0ctPi5cw

If I use the ifconfig to shut down the subflow, it will send the "RST" packet. I see the youtube,it seems mptcp_path_manager is default mode, only one dev works in the same time, I want to test the fullmesh that it create a full-mesh of subflows among all available subflows. and except it can switch to another one once working dev is disable. but on my test it may have some other influences,sometimes it can continue to download, and sometimes it can not.I will test more.

cpaasch commented 4 years ago

What do you have in the sysctl net.ipv4.mptcp_path_manager ? Is it fullmesh?

We need more logs (pcap, system-config, ip link, ip route,...)

openaspace commented 3 years ago

Hello. I'm also interested to this problem that I also have. I start a TCP streaming connection that replicate on two LTE router, if the wan1 go down it remain working on the second, but if wan1 turn on, the connection it's not replicated newly on the wan 1.

Each wan have a static private IP to the LTE router, I need also to set static routing?

cpaasch commented 3 years ago

Yes, you need to make sure that the routing is configured correctly. See https://multipath-tcp.org/pmwiki.php/Users/ConfigureRouting.

openaspace commented 3 years ago

Thank you. I'm using OpenMPTCP router and appear to be that routing is correctly saved. I use Cubic with Redundant , over two ethernet WAN... but I can't get to obtain wan restoration redundancy when it go offline..

OpenMPTCProuter-Routes-LuCI

OpenMPTCProuter-MPTCP-LuCI