Re: Shared Link Topology

51 views
Skip to first unread message

Vikas Raunak

unread,
Jan 14, 2016, 4:56:54 PM1/14/16
to ns-3-...@googlegroups.com
Hi, Please the question again, now that the ns-3 implementation (GSoC) has been finished.

On Wed, Nov 4, 2015 at 3:52 PM, Vikas Raunak <cse12...@iiti.ac.in> wrote:
The version of MPTCP I am using is also being developed by ns-3 group:

Matthieu Coudron has an implementation of MP-TCP pending; see this post. This is based on work done also by Morteza Kheirkhah, which was published in a recent paper, Multipath-TCP in ns3, which was presented at WNS3 2014.


On Wednesday, November 4, 2015 at 3:49:47 PM UTC+5:30, Vikas Raunak wrote:
Hi

I am trying to create the topology below:

                          n4 
           _______   |          _______ 
         /               \  |         /              \ 
      n0              n1------n2              n3 
         \_______/          |  \_______/ 
                                   | 
                                 n5 

I have to use it to test a Congestion control algorithm in Multipath TCP.

I have attached the code (the relevant part is enclosed between \\\\\\\\\\\\ lines).

I don't know why it is not working, is there anything wrong with the topology code ?

Thanking you
Regards
Vikas

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/CJWEXlR2PWM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Vikas Raunak

unread,
Jan 15, 2016, 2:42:13 AM1/15/16
to ns-3-users
The code is attached, I get the error: 

*** [0] HandlePeerError is called -> connection is false
*** [0] HandlePeerError is called -> connection is false
100 [0] Application STOP

The code (the file wasn't getting attached):

#include <string>
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/internet-module.h"
#include "ns3/applications-module.h"
#include "ns3/network-module.h"
#include "ns3/packet-sink.h"

int sf = 2;

using namespace ns3;

int main(int argc, char *argv[])
{
  Config::SetDefault("ns3::Ipv4GlobalRouting::FlowEcmpRouting", BooleanValue(true));
  Config::SetDefault("ns3::TcpSocket::SegmentSize", UintegerValue(1400));
  Config::SetDefault("ns3::TcpSocket::DelAckCount", UintegerValue(3));
  Config::SetDefault("ns3::DropTailQueue::Mode", StringValue("QUEUE_MODE_PACKETS"));
  Config::SetDefault("ns3::DropTailQueue::MaxPackets", UintegerValue(100));
  Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue(MpTcpSocketBase::GetTypeId()));
  Config::SetDefault("ns3::MpTcpSocketBase::MaxSubflows", UintegerValue(8)); // Sink
  Config::SetDefault("ns3::MpTcpSocketBase::CongestionControl", StringValue("Linked_Increases"));  // Fully_Coupled  Linked_Increases
  Config::SetDefault("ns3::MpTcpSocketBase::SchedulingAlgorithm", StringValue("Round_Robin")); 
  Config::SetDefault("ns3::MpTcpSocketBase::PathManagement", StringValue("FullMesh"));

    NodeContainer nodes; 
    nodes.Create(6); 

    InternetStackHelper internet;
    internet.Install(nodes);

    PointToPointHelper p2plink; 
    p2plink.SetDeviceAttribute ("DataRate", StringValue("5Mbps")); 
    p2plink.SetChannelAttribute("Delay", StringValue("10ms")); 
   
    PointToPointHelper p2plinkb; 
    p2plinkb.SetDeviceAttribute ("DataRate", StringValue("0.5Mbps")); 
    p2plinkb.SetChannelAttribute("Delay", StringValue("100ms"));
    p2plinkb.SetQueue ("ns3::DropTailQueue","MaxPackets", StringValue ("100"));

    NodeContainer n0n2 = NodeContainer(nodes.Get(0),nodes.Get(2)); 
    NodeContainer n1n2 = NodeContainer(nodes.Get(1),nodes.Get(2)); 
    NodeContainer n2n3 = NodeContainer(nodes.Get(2),nodes.Get(3)); 
    NodeContainer n3n4 = NodeContainer(nodes.Get(3),nodes.Get(4)); 
    NodeContainer n3n5 = NodeContainer(nodes.Get(3),nodes.Get(5));
    NodeContainer n0n4 = NodeContainer(nodes.Get(0),nodes.Get(4));
 
    Ipv4AddressHelper ipv4addr; 

    NetDeviceContainer dn0n2; 
    dn0n2 = p2plink.Install(n0n2); 

    NetDeviceContainer dn1n2; 
    dn1n2 = p2plink.Install(n1n2);
 
    NetDeviceContainer dn2n3; 
    dn2n3 = p2plinkb.Install(n2n3);

    NetDeviceContainer dn3n4; 
    dn3n4 = p2plink.Install(n3n4);

    NetDeviceContainer dn3n5; 
    dn3n5 = p2plink.Install(n3n5);

    NetDeviceContainer dn0n4; 
    dn0n4 = p2plink.Install(n0n4);

    ipv4addr.SetBase("10.1.1.0", "255.255.255.0"); 
    Ipv4InterfaceContainer in0n2 = ipv4addr.Assign(dn0n2);

    ipv4addr.SetBase("10.1.2.0", "255.255.255.0"); 
    Ipv4InterfaceContainer in1n2 = ipv4addr.Assign(dn1n2);

    ipv4addr.SetBase("10.1.3.0", "255.255.255.0"); 
    Ipv4InterfaceContainer in2n3 = ipv4addr.Assign(dn2n3);

    ipv4addr.SetBase("10.1.4.0", "255.255.255.0"); 
    Ipv4InterfaceContainer in3n4 = ipv4addr.Assign(dn3n4);

    ipv4addr.SetBase("10.1.5.0", "255.255.255.0"); 
    Ipv4InterfaceContainer in3n5 = ipv4addr.Assign(dn3n5);

    ipv4addr.SetBase("10.1.6.0", "255.255.255.0"); 
    Ipv4InterfaceContainer in0n4 = ipv4addr.Assign(dn0n4);

    Ipv4GlobalRoutingHelper::PopulateRoutingTables();

  uint16_t port = 9;
  MpTcpPacketSinkHelper sink("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port));
  ApplicationContainer sinkApps = sink.Install(nodes.Get(4));
  sinkApps.Start(Seconds(0.0));
  sinkApps.Stop(Seconds(1000.0));

  MpTcpBulkSendHelper source("ns3::TcpSocketFactory", InetSocketAddress("10.1.4.1", port));
  source.SetAttribute("MaxBytes", UintegerValue(1000000));
  ApplicationContainer sourceApps = source.Install(nodes.Get(0));
  sourceApps.Start(Seconds(0.0));
  sourceApps.Stop(Seconds(100.0));

  Simulator::Stop(Seconds(2000.0));
  Simulator::Run();
  Simulator::Destroy();
}

Handle peer error means the connection isn't even established, no SYN sent, no addresses advertised.

Please help in this.





On Friday, January 15, 2016 at 3:26:54 AM UTC+5:30, Vikas Raunak wrote:
Hi, Please the question again, now that the ns-3 implementation (GSoC) has been finished.
On Wed, Nov 4, 2015 at 3:52 PM, Vikas Raunak <cse12...@iiti.ac.in> wrote:
The version of MPTCP I am using is also being developed by ns-3 group:

Matthieu Coudron has an implementation of MP-TCP pending; see this post. This is based on work done also by Morteza Kheirkhah, which was published in a recent paper, Multipath-TCP in ns3, which was presented at WNS3 2014.


On Wednesday, November 4, 2015 at 3:49:47 PM UTC+5:30, Vikas Raunak wrote:
Hi

I am trying to create the topology below:

                          n4 
           _______   |          _______ 
         /               \  |         /              \ 
      n0              n1------n2              n3 
         \_______/          |  \_______/ 
                                   | 
                                 n5 

I have to use it to test a Congestion control algorithm in Multipath TCP.

I have attached the code (the relevant part is enclosed between \\\\\\\\\\\\ lines).

I don't know why it is not working, is there anything wrong with the topology code ?

Thanking you
Regards
Vikas

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/CJWEXlR2PWM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Vikas Raunak

unread,
Jan 15, 2016, 6:49:37 AM1/15/16
to ns-3-users
Is the addressing wrong ?

The typical flow of a MPTCP connection is:

1. SYN SENT from Subflow 0, connc. established
2. Address advertised
3. SYN Sent on advertised address, subflow established

I can't see the connection getting established in this case.
Reply all
Reply to author
Forward
0 new messages