tcp congestion control variants comparison

36 views
Skip to first unread message

Kushal Srivastava

unread,
Apr 14, 2015, 2:11:46 AM4/14/15
to ns-3-...@googlegroups.com
I am trying to compare the various tcp congestion control variants successively by attaching a socket binded to three different
host each connected to a distict sink via two routers. However the application is not passing packets through the topology as is depicted in the generated traces.I am using the following code for creating and binding the socket to the host.Address sinkAddress2 (InetSocketAddress (i4i7.GetAddress (0), sinkPort)); // interface of n4
// Create and bind the socket...

TypeId tid2 = TypeId::LookupByName ("ns3::TcpNewReno");
nodeId << c.Get (1)->GetId ();
std::string specificNode2 = "/NodeList/" + nodeId.str () + "/$ns3::TcpL4Protocol/SocketType";
Config::Set (specificNode2, TypeIdValue (tid2));
Ptr<Socket> ns3TcpSocket2 =
  Socket::CreateSocket (c.Get (1), TcpSocketFactory::GetTypeId ());
ns3TcpSocket2->BindToNetDevice(d1d6.Get(0));
 ns3TcpSocket2->TraceConnectWithoutContext ("CongestionWindow", MakeCallback (&CwndChange2));
  Ptr<MyApp> app2 = CreateObject<MyApp> ();
  app2->Setup (ns3TcpSocket2, sinkAddress2, 1536, 1000, DataRate ("250Kbps"));
  c.Get (1)->AddApplication (app2);
  app2->SetStartTime (Seconds (10.));
  app2->SetStopTime (Seconds (100.));

Here app is an instance of custom app as a normal on off application would not be useful since we need to attach them to sources before packets are sent out.
I have attached a copy of the code.
routing2.cc
Reply all
Reply to author
Forward
0 new messages