<div dir="ltr">Dear HADIBI and ndnSIM team<br>you have just 4 entries in PIT of internal nodes between consumer and producer even though you have two attackers in the same subtree which expose 485 requests per seconds? <br>just increase the number of requests  step by step to achieve your objective, firstly adjust it to 600 and try. <br>you can also increase the number of attackers  by  building your topology. Also, you can increase the payload size which the  producer sent  as a response.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 26, 2021 at 5:14 PM HADIBI ABDENNOUR <<a href="mailto:emp.ifd.009.hadibi.abdennour@gmail.com">emp.ifd.009.hadibi.abdennour@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Mohammad and ndnSim community<div><br></div><div>I wanna thank you for helping me I've tried the code that you gave me but it still didn't work for me </div><div>The PIT size didn't exceed 4 entries.</div><div>The objective of my work  is to perform an Interest Flooding Attack</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 25 sept. 2021 à 13:29, Mohammad Nkrash Fhda <<a href="mailto:mohammadnkrashfhda@gmail.com" target="_blank">mohammadnkrashfhda@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear HADIBI ABDENNOUR and NDNSIM Team<br><br>in this example the network is very simple, you have one producer and two subtree,  aech of them consist of gateway (border) router and two consumer<br>So to have more than 4 entries in PIT in the same topology you must to increase number of the attacker in the same subtree, also increas the number of the request that attraker must send every second <br><br><br>like this<br>for (int i = 0; i < 4; i++) {<br>  <br>      ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");<br>  if(i==0||  i==1){<br><br>    consumerHelper.SetAttribute("Frequency", StringValue("585"));<br>    }<br>    else {<br>    <br>    consumerHelper.SetAttribute("Frequency", StringValue("200")); <br>    }<br><br>   <br>    consumerHelper.SetPrefix("/root/" + Names::FindName(consumers[i]));<br>    consumerHelper.Install(consumers[i]);<br>  }<br><br><br>i adjust the number of request to 585 because after that the producer will collapses and becomes unable to respond to requests<br>show the attached photo <br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 24, 2021 at 4:24 PM HADIBI ABDENNOUR via ndnSIM <<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi everyone,<div>I'm trying to perform an Interest flooding attack by sending a large number of Interest packets to a data producer in order to flood PIT tables of  intermediate router using the code bellow, but the PIT size didnt exceed 4 entries, could please help me on that.</div><div><br></div><div>Best regards</div><div><br></div>// IFA.cpp based on ndn-tree-cs-tracers.cpp <br>// using topo-small-binary-tree.txt Topology<br>//<br>#include "ns3/core-module.h"<br>#include "ns3/network-module.h"<br>#include "ns3/ndnSIM-module.h"<br>//#include "ndn/L3RateTracer.h"<br>namespace ns3 {<br><br>/**<br> * This scenario simulates an Interest flooding attack on a tree topology (using topology reader module)<br> *<br> *    /------\      /------\      /------\      /------\<br> *    |rtr-1|      |rtr-2|      |lrtr-3|      |rtr-4|<br> *    \------/      \------/      \------/      \------/<br> *         ^          ^                ^           ^<br> *         |          |                |           |<br> *          \        /                  \         /<br> *           \      /                    \       /    10Mbps / 1ms<br> *            \    /                      \     /<br> *             |  |                        |   |<br> *             v  v                        v   v<br> *          /-------\                    /-------\<br> *          | rtr-1 |                    | rtr-2 |<br> *          \-------/                    \-------/<br> *                ^                        ^<br> *                |                        |<br> *                 \                      /  10 Mpbs / 1ms<br> *                  +--------+  +--------+<br> *                           |  |<br> *                           v  v<br> *                        /--------\<br> *                        |  root  |<br> *                        \--------/<br> *<br> *<br> * To run scenario and see what is happening, use the following command:<br> *<br> *     ./waf --run=IFA<br> */<br><br>int<br>main(int argc, char* argv[])<br>{<br>  CommandLine cmd;<br>  cmd.Parse(argc, argv);<br><br>  AnnotatedTopologyReader topologyReader("", 1);<br>  topologyReader.SetFileName("src/ndnSIM/examples/topologies/topo-small-binary-tree.txt");<br>  topologyReader.Read();<br><br>  // Install NDN stack on all nodes<br>  ndn::StackHelper ndnHelper;<br>  ndnHelper.setPolicy("nfd::cs::lru");<br>  ndnHelper.setCsSize(100);<br>  ndnHelper.InstallAll();<br><br>  // Choosing forwarding strategy<br>  ndn::StrategyChoiceHelper::InstallAll("/prefix", "/localhost/nfd/strategy/best-route");<br><br>  // Installing global routing interface on all nodes<br>  ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;<br>  ndnGlobalRoutingHelper.InstallAll();<br><br>  // Getting containers for the consumer/producer<br>  Ptr<Node> consumers[4] = {Names::Find<Node>("NodeC1"), Names::Find<Node>("NodeC2"),<br>                            Names::Find<Node>("NodeC3"), Names::Find<Node>("NodeC4")};<br>  Ptr<Node> producer = Names::Find<Node>("NodeP1");<br><br>  for (int i = 0; i < 4; i++) {<br>    ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");<br>       // Each consumer will express the same data /root/<seq-no><br>    if(i==0){<br>      consumerHelper.SetAttribute("Frequency", StringValue("200")); // Attacker sends 200 interests a second <br>      consumerHelper.SetPrefix("/prefix/rand()");<br>    }else{<br>      consumerHelper.SetAttribute("Frequency", StringValue("10")); // each Ligitimate user sends 10 interests a second<br>      consumerHelper.SetPrefix("/prefix");<br>    }<br>    ApplicationContainer app = consumerHelper.Install(consumers[i]);<br>    app.Start(Seconds(0.01 * i));<br>  }<br><br>  ndn::AppHelper producerHelper("ns3::ndn::Producer");<br>  producerHelper.SetAttribute("PayloadSize", StringValue("1024"));<br><br>  // Register /root prefix with global routing controller and<br>  // install producer that will satisfy Interests in /root namespace<br>  ndnGlobalRoutingHelper.AddOrigins("/prefix", producer);<br>  producerHelper.SetPrefix("/prefix");<br>  producerHelper.Install(producer);<br>  // Calculate and install FIBs<br>  ndn::GlobalRoutingHelper::CalculateRoutes();<br><br>  Simulator::Stop(Seconds(20.0));<br>  ndn::L3RateTracer::InstallAll("rate-trace-IFA.txt", Seconds(19.0));<br>  Simulator::Run();<br>  Simulator::Destroy();<br>  return 0;<br>}<br>} // namespace ns3<br>int<br>main(int argc, char* argv[])<br>{  return ns3::main(argc, argv);}<br><div> </div></div>
_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>