MPTCP patch is on codereview for Review process

863 views
Skip to first unread message

kashif nadeem

unread,
Aug 13, 2018, 5:18:27 PM8/13/18
to ns-3-reviews
Dear ns-developers,

I have forked the code of Matthieu Coudron available here https://github.com/lip6-mptcp/ns3mptcp. I upstreamed the code into ns-3-dev and implemented path managers such as ndiffports and fullmesh. The code is upadated to work with latest ns-3 versions such as ns-3.28 and ns-3.27 etc. The patch is available now on codereview for review process. I have created my issue on codereview here https://codereview.appspot.com/369810043/ . My github forked respository is here https://github.com/Kashif-Nadeem/ns-3-dev-git/commit/3c6ec272e55c4798bfde48514f5f141257fe9099

Please give reviews to improve the code.

Best, 
Kashif

Choukri Jermouni

unread,
Sep 20, 2018, 7:05:43 AM9/20/18
to ns-3-reviews
Thank you so much, I have to implement the vertical handover scenario between LTE and Wi-Fi and the problem is that LTE doesn't support dynamic routing like the Wi-Fi. With this improvement you did, it's going to work or not?

with my best Regards, CHoukri

kashif nadeem

unread,
Sep 20, 2018, 11:55:08 AM9/20/18
to ns-3-r...@googlegroups.com

I didn’t try this. But I guess, it should work. You can download the patch and apply it to your work (ns-3 code)and see if it works or not.

 

Sent from Mail for Windows 10

--
You received this message because you are subscribed to the Google Groups "ns-3-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-reviews...@googlegroups.com.
To post to this group, send email to ns-3-r...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-reviews.
For more options, visit https://groups.google.com/d/optout.

 

Choukri Jermouni

unread,
Sep 20, 2018, 12:17:48 PM9/20/18
to ns-3-reviews
Thank you so much, i appreciate the work you did

kashif nadeem

unread,
Sep 20, 2018, 3:35:59 PM9/20/18
to ns-3-r...@googlegroups.com

Thanks

Choukri Jermouni

unread,
Sep 27, 2018, 4:41:26 AM9/27/18
to ns-3-reviews
Kashif please how can i simulate the load balancing in your implementation?

kashif nadeem

unread,
Sep 27, 2018, 7:38:13 AM9/27/18
to ns-3-r...@googlegroups.com

Hello Choukri,

Congestion control classes are missing in this implementation because I wanted to keep it bare minimum to merge into ns-3 main tree. You’ll have to write your own congestion class for load balancing.

Message has been deleted
Message has been deleted

loenzh...@gmail.com

unread,
Oct 9, 2018, 10:35:37 AM10/9/18
to ns-3-reviews
  I followed the MPTCP codes in NS3.29 which you have submitted to Current Development of NS3. I have downloaded the codes in https://github.com/Kashif-Nadeem/ns-3-dev-git and compiled successfully.

    But all the examples of TCP cannot be run successfully. Would you please send me a demo or an example of MPTCP?    
    Thanks, 
    Kevin

kashif nadeem

unread,
Oct 9, 2018, 10:42:18 AM10/9/18
to ns-3-reviews

Hi Kevin,

Please use the script attached (mptcp-example) and it will work normally. To run MPTCP I have disabled TCP Timestamps and SACK options in TcpSocketBase (attributes) coz of limited TCP header option field. You may need them in some tcp examples. So to run TCP examples, you may enable them. But with MPTCP you need to work with my configuration.

Best,
mptcp-example.cc

loenzh...@gmail.com

unread,
Oct 10, 2018, 7:49:11 AM10/10/18
to ns-3-reviews
really appreciate your help! Thank you! 
Kevin

tiany...@gmail.com

unread,
Oct 17, 2018, 4:02:49 AM10/17/18
to ns-3-reviews
yes i download it from github and compiled successful ,then i traced the log to know how it works and which functions used ,so i  didn't found where i could set up the buffer-size and and found the buffer-size and buffer- available both are zero . could you help me? thank you


在 2018年8月14日星期二 UTC+8上午5:18:27,kashif nadeem写道:

kashif nadeem

unread,
Oct 17, 2018, 4:31:39 AM10/17/18
to ns-3-reviews
Hi tiany, 

MPTCP initiates TCP subflows and each TCP subflow has its own buffer. You need to look into TCP buffers and related parameters. Study TcpRxBuffer and TcpTxBuffer classes.

tianyun zhang

unread,
Nov 22, 2018, 3:22:06 AM11/22/18
to ns-3-r...@googlegroups.com
hi kashif ,sorry to bother again,  i have learned you code from GitHub some time and then i want to use TCP model to analyze and i found the TCP didn't work and report error about "mptcp-subflow",
So it 's because the tcp had implemented  the MPTCP -model? thanks

kashif nadeem <kshfn...@gmail.com> 于2018年10月17日周三 下午4:31写道:
--

kashif nadeem

unread,
Dec 4, 2018, 11:09:59 AM12/4/18
to ns-3-reviews
 Hi Tiany,

 If you want to run TCP then you'll have to enable TCP Timestamps and SACK options in TcpSocketBase (attributes) which I disabled because  of limited TCP header option field. When you want to switch back to MPTCP then just disable them. Hope it will solve your problem

tianyun zhang

unread,
Dec 13, 2018, 11:43:05 PM12/13/18
to ns-3-r...@googlegroups.com
    Thanks for your reply, and i'm sorry for  that  back to you so late.
     I have found that 'attributes' need to be modified and now  also have some process , thank you again ^_^

kashif nadeem <kshfn...@gmail.com> 于2018年12月5日周三 上午12:10写道:

rqzh...@gmail.com

unread,
Dec 20, 2018, 8:49:14 AM12/20/18
to ns-3-reviews
I change the attributes in Tcp-Socket-Base.cc, but it is not working for tcp, anyone know how to solve the problem.


在 2018年8月14日星期二 UTC+8上午5:18:27,kashif nadeem写道:
Dear ns-developers,

Best, 
Kashif

rqzh...@gmail.com

unread,
Dec 20, 2018, 8:55:11 AM12/20/18
to ns-3-reviews
What should I do to solve the problem, I try to chnage the attributes of the Tcp-Socket-Base.cc but it is not working, can you help me, and tell me your method, please

在 2018年12月14日星期五 UTC+8下午12:43:05,tianyun zhang写道:

kashif nadeem

unread,
Dec 20, 2018, 9:06:15 AM12/20/18
to ns-3-reviews
Hi ruiqing zhang, 

Which attributes are you trying to change? Can you tell me the attributes name?

ruiqing zhang

unread,
Dec 20, 2018, 10:07:23 AM12/20/18
to ns-3-reviews
Hi Kashif andeem
     Thank you for your replay, I changed the 'Sack' to true, and 'TimeStamps' to true, but the subflow.cc is still not working. And I find, if i use mptcp to run with my .cc file, the desinationPort is changed, why, I don't know the reason.

在 2018年12月20日星期四 UTC+8下午10:06:15,kashif nadeem写道:

kashif nadeem

unread,
Dec 20, 2018, 10:47:59 AM12/20/18
to ns-3-r...@googlegroups.com
If you read my previous replies in this thread you will come to know that Sack and Tcp Timestamps do not work because of limited TCP options space in Tcp header. Secondly, MPTCP code assigns random port numbers to flows and you can't. 

But if you want to use fixed port numbers then you may change it in the code. You will have to figure out it.
Message has been deleted

ruiqing zhang

unread,
Dec 20, 2018, 11:22:03 AM12/20/18
to ns-3-reviews
Dear Kashif Nadeem:

Before this work, I often use FlowMonitor to find out the flow complete time. But today, I find mptcp use too many subflows, for example, if I want to send a flow and the size about 30MB, and we division it in 8 subflows, the FlowMonitor will record 8 flows, and if so, I cannot compare the flow agerage complete time with tcp, (in tcp, the 30MB will send in a flow), are there any good methods, thank you.

在 2018年12月20日星期四 UTC+8下午11:47:59,kashif nadeem写道:

kashif nadeem

unread,
Dec 20, 2018, 11:37:25 AM12/20/18
to ns-3-reviews
I guess there could be multiple ways to get MPTCP flow completion time at connection level.

1)  Use flow monitor and just take the start and end time of the master MPTCP flow (first flow) and ignore the subflows. It will give you the time MPTCP takes to transfer 30MB (FCT). 

2) You should enable log messages of MpTcpSocketBase and dump them in a log file and you will find out the start and end time of the MPTCP connection from Tcp header. You should take the values of time for the MPTCP master flow and ingnore the subflows. 

3) You may get this information from xml file. 

ruiqing zhang

unread,
Dec 20, 2018, 8:09:38 PM12/20/18
to ns-3-r...@googlegroups.com
Thank you very much, you are right, my PacketSinkHelper's port is 5000, Can I distinguish the master flow and subflows by this port, if  the destination prot is 5000, I think this is the master flow.

kashif nadeem <kshfn...@gmail.com> 于2018年12月21日周五 上午12:37写道:

ruiqing zhang

unread,
Dec 20, 2018, 8:57:28 PM12/20/18
to ns-3-r...@googlegroups.com
Actually, I think the fct will beconme small if I use mptcp, but taday, I try to test the fct, the tcp and mptcp is almost same, and I don't know why.

ruiqing zhang <rqzh...@gmail.com> 于2018年12月21日周五 上午9:09写道:

ruiqing zhang

unread,
Dec 25, 2018, 4:57:36 AM12/25/18
to ns-3-r...@googlegroups.com
Hi kashif :
     I am sorry to bother you, I want to know why the onoffapplication DataRate can't beyond 660Kpbs, the error is msg="Could not find mapping associated to ssn", file=../src/internet/model/mptcp-subflow.cc, line=289, I don't know how to solve it. 
                 Thank you.

kashif nadeem <kshfn...@gmail.com> 于2018年12月21日周五 上午12:37写道:
I guess there could be multiple ways to get MPTCP flow completion time at connection level.

kashif nadeem

unread,
Jan 1, 2019, 11:32:18 AM1/1/19
to ns-3-reviews
Hi zhang,

I didn't notice any such problem with MPTCP that data rate of OnOff Application produces such error. Please check your topology or settings to debug this issue. Attached is the screen shot, of simulation experiment I just run and  1Gb/s data rate is working fine.

Screenshot (300).png

data rate 1Gb/s and you see its working fine.

ruiqing zhang

unread,
Jan 1, 2019, 8:36:16 PM1/1/19
to ns-3-r...@googlegroups.com
Hi kashif:
      I   set the onoffapplication's ontime and offtime with these two sentences:
          oo.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
          oo.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
      the error (msg="Could not find mapping associated to ssn", file=../src/internet/model/mptcp-subflow.cc, line=289,) will happen, if  set with your example, the error is not happen.
       I use the  sentences like your example:
          oo.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.02]"));
          oo.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.01]"));
      But the error (terminated with signal SIGSEGV) also happen.
       I just download the file on the https://codereview.appspot.com/369810043, and copy the files in the folder b to the ns3 folders.
       and I also use the ns3-dev in your github, it have the same problems in my pc.

       I appreciate you can answer my questions, and help me test the code, and show me your test result, but I still can't solve my problem, if possible, can I download with the project that you test in 1Gb/s. 

       Thanks you very much.
        Zhang Ruiqing


kashif nadeem <kshfn...@gmail.com> 于2019年1月2日周三 上午12:32写道:

kashif nadeem

unread,
Jan 2, 2019, 3:12:07 PM1/2/19
to ns-3-reviews
Hi zhang, 

I myself noticed this problem that setting OffTime 0 for onoff application, MPTCP gives this error. MPTCP generates this error because it doesn't receive correct mappings for the Sequence Numbers but if you set OffTime to some value like 0.1 second or any other value then you can achieve higher data rate like 1Gbps or even higher. For now, I will recommend you to use value other than zero for OffTime for onoff application. When I get time, I will look into this and will post here.

ruiqing zhang

unread,
Jan 4, 2019, 10:17:05 PM1/4/19
to ns-3-r...@googlegroups.com
Hi  kashif:
   These days, I have to compare the performance of the tcp and mptcp, I find that when several onoffapplications send flows to a same sink application, mptcp have a bug, when I using TCP, the sink application can  receive all the bytes, but, when  I using mptcp, the sink application just receive only one onoffapplication's packets, whenever other applications start or stop, the sink application just recieve the earliest start onoffapplication. I feel happy to discuss the problems with you, thank you.
Best,
Zhang Ruiqing

kashif nadeem <kshfn...@gmail.com> 于2019年1月3日周四 上午4:12写道:

박성진

unread,
Jan 28, 2019, 11:38:05 PM1/28/19
to ns-3-reviews
Hi,

Thank you for implementing MPTCP in NS-3.

I have a problem with your mptcp-example.cc source code,
When I run your example scenario, I get some error like 
*** Error in `/home/parksjin01/mptcp-test/ns3-mmwave/build/scratch/mptcp-example': corrupted size vs. prev_size: 0x0000000001d31d30 ***

and scenario terminated with SIGIOT.
How can I solve this problem?


2018년 8월 14일 화요일 오전 6시 18분 27초 UTC+9, kashif nadeem 님의 말:

Muhammad Faris 'Imaduddin

unread,
Mar 25, 2019, 5:44:53 AM3/25/19
to ns-3-reviews
Hi... Kashif

I have tried this script (mptcp-example.cc) and compile it on ns3-dev but I have some error like this :

Capture.PNG











Would you explain why this happens and how to fix this issue?

Hope you can help me with this

Thank you so much

Best,
Faris

Fab

unread,
Oct 2, 2019, 5:17:32 PM10/2/19
to ns-3-reviews
Dear ns3 developers,
I need some very basic help on how to install MPTCP in ns3.29. Do I copy the files from the "MPTCP patch here" location/url into the src directory and recompile, or do I need to copy the files from the "code location" url and recompile? Any basic/elementary advice would be of great help.
Thanks.

                      Fab

김희광

unread,
Jan 30, 2020, 1:25:01 AM1/30/20
to ns-3-reviews
Hi. did you solve it??
please, contact me by email.

Thanks. 

2019년 1월 29일 화요일 오후 1시 38분 5초 UTC+9, 박성진 님의 말:

yitao xing

unread,
Mar 22, 2020, 11:03:40 PM3/22/20
to ns-3-reviews
Hi,
Is it ok when you set the offtime to not 0? I try to create a topology with wifi and csma as two network interfaces and get the same "mapping" question even if the offtime I set is like 0.1 or 1. How do you solve it?

在 2019年1月5日星期六 UTC+8上午11:17:05,ruiqing zhang写道:
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-r...@googlegroups.com.

yitao xing

unread,
Mar 23, 2020, 12:08:50 AM3/23/20
to ns-3-reviews
Hi 
I am trying to create a new topology as follow:

     
  + csma---r0---p2p---+ 
 /                                 \
h0                              h1---p2p---h2
 \                                 /
  +   wifi----r1---p2p---+

It works well when I replace the csma and wifi channel to p2p, and it also works when the wifi module is replaced by p2p. 
But I get msg="Could not find mapping associated to ssn", file=../src/internet/model/mptcp-subflow.cc" line=289 terminate called without an active exception when I am using wifi.

The code is here, I am using YansWifiHelper to create my AP and STA:

    YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
    YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
    phy.SetChannel (channel.Create ());

    WifiHelper wifi;
    wifi.SetRemoteStationManager ("ns3::AarfWifiManager");

    WifiMacHelper mac;
    Ssid ssid = Ssid ("ns-3-ssid");
    mac.SetType ("ns3::StaWifiMac",
                "Ssid"SsidValue (ssid),
                "ActiveProbing"BooleanValue (false));

    NetDeviceContainer staDevices;
    staDevices = wifi.Install (phy, mac, wifiStah0);

    
    mac.SetType ("ns3::ApWifiMac",
                "Ssid"SsidValue (ssid));

    NetDeviceContainer apDevices;
    apDevices = wifi.Install (phy, mac, wifiApr1);
    l1h0r1 = NetDeviceContainer(staDevices, apDevices);

    MobilityHelper mobility;

    mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
                                  "MinX"DoubleValue (0.0),
                                  "MinY"DoubleValue (0.0),
                                  "DeltaX"DoubleValue (5.0),
                                  "DeltaY"DoubleValue (10.0),
                                  "GridWidth"UintegerValue (3),
                                  "LayoutType"StringValue ("RowFirst"));

    /*mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
                              "Bounds", RectangleValue (Rectangle (-50, 50, -50, 50)));*/
                              // RandomWalk2dMobilityModel
    mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
    mobility.Install (wifiStah0);

    mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
    mobility.Install (wifiApr1);

Do you have any idea why it goes like this? It seems that MPTCP does not work well with the YansWifiHelper?

程志超

unread,
Sep 15, 2021, 7:15:17 AM9/15/21
to ns-3-reviews
Dear kashif nadeem:
I have downloaded and compiled your ns3-mptcp successfully, and I run your mptcp-example.cc successfully, but when I use fastesd-rtt scheduler, It will occur errors, I dont know why.
can you help me? maybe give me a example about the fastest-rtt scheduler example?

fastest-rtt.jpg
Reply all
Reply to author
Forward
0 new messages