[ndnSIM] Cannot start app at specified time when installed on multiple nodes

Eric Binnendyk eric.binnendyk at student.nmt.edu
Thu Dec 17 22:31:25 PST 2020


Hi,

I am writing a simulation in which a single app, maliciousConsumerHelper,
is installed on two nodes, NodeC3 and NodeC4. I would like to start the app
on both nodes at 25 seconds in the simulation. However, when I run my code,
the app starts at the beginning of the simulation.

In my code, I create a NodeContainer and add both nodes, and then install
the helper on the node container. When I install the app on only one node,
it works fine, starting at 25 seconds as it should. Could anyone help me
understand how to fix this problem?

// default consumer requests a Poisson process
ndn::AppHelper benignConsumerHelper("ns3::ndn::ConsumerCbr");
benignConsumerHelper.SetPrefix("/fine");
benignConsumerHelper.SetAttribute("Frequency", StringValue("100"));
benignConsumerHelper.SetAttribute("LifeTime", StringValue("2s"));
benignConsumerHelper.SetAttribute("Randomize", StringValue("uniform"));

ndn::AppHelper maliciousConsumerHelper("ns3::ndn::ConsumerCbr");
maliciousConsumerHelper.SetPrefix("/forged");
maliciousConsumerHelper.SetAttribute("Frequency", StringValue("1000"));
maliciousConsumerHelper.SetAttribute("LifeTime", StringValue("2s"));
maliciousConsumerHelper.SetAttribute("Randomize", StringValue("uniform"));

// In this simulation, the attacker does request nonexistent contents.
ndn::AppHelper producerHelper1("ns3::ndn::Producer");
producerHelper1.SetPrefix("/fine");
producerHelper1.SetAttribute("PayloadSize", StringValue("1024"));

ns3::NodeContainer badNodes;
badNodes.Add(Names::Find<Node>("NodeC3"));
badNodes.Add(Names::Find<Node>("NodeC4"));

benignConsumerHelper.Install(Names::Find<Node>("NodeC1"));
benignConsumerHelper.Install(Names::Find<Node>("NodeC2"));
auto icnAttack1 = maliciousConsumerHelper.Install(badNodes);

// IFAs run from 25 seconds to 45 seconds
icnAttack1.Start(Seconds(25.0));
icnAttack1.Stop(Seconds(45.0));

Thanks,

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20201217/4a7e3df4/attachment-0001.html>


More information about the ndnSIM mailing list