[ndnSIM] Obtaining the number of Interest packets

Zakaria SABIR zakaria.sabir at uit.ac.ma
Fri Oct 8 02:44:40 PDT 2021


Hi Sonia,

Yesterday, I found the error. To use two different Interests, I had to
create another app like this:

  ndn::AppHelper *consumerHelper*("ns3::ndn::ConsumerCbr");
  consumerHelper.SetAttribute("Frequency", DoubleValue(10.0));
  consumerHelper.SetPrefix("*/Interest1*");
  consumerHelper.Install(nodes.Get(0));
  consumerHelper.Install(nodes.Get(3));
  consumerHelper.Install(nodes.Get(4));
  consumerHelper.Install(nodes.Get(5));

  ndn::AppHelper *consumerHelper2*("ns3::ndn::ConsumerCbr");
  consumerHelper2.SetAttribute("Frequency", DoubleValue(10.0));
  consumerHelper2.SetPrefix("*/Interest2*");
  consumerHelper2.Install(nodes.Get(6));
  consumerHelper2.Install(nodes.Get(8));
  consumerHelper2.Install(nodes.Get(5));

I did it that way and I used the command that you indicated before
(NS_LOG=ndn.Producer:ndn.Consumer ./waf --run="scenario"). The "Interest2"
appeared in the consumer log file as well. :)

Now I have another question: In the "ConsumerZipfMandelbrot" application,
what is the difference between these two attributes: "NumberOfContents" and
"Frequency"? I know that the frequency is the number of Interests per
second, but what about the number of contents? Is it the maximum number of
contents that producers can generate? or the maximum number of Interests
that consumers can generate?

My best regards,
Zakaria
ᐧ

On Fri, Oct 8, 2021 at 3:39 AM sonia sabir <zohanoor67 at gmail.com> wrote:

> Hi Zakaria,[image: image.gif]
> It seems like Interest for /Interest2 has not been sent. Try this
>
> consumerHelper.SetPrefix("/interest1");
> ApplicationContainer App1 = consumerHelper.Install(nodes.Get(6));
> App1.Start (Seconds (10.0));
> App1.Stop (Seconds (100.0));
> Do the same for "/Interest1".
>
> Hope it works for you.
>
>
>
> On Wed, Oct 6, 2021 at 11:52 PM Zakaria SABIR <zakaria.sabir at uit.ac.ma>
> wrote:
>
>> Thank you Sangita and Sonia,
>>
>> I'm using "ConsumerCbr", son do I have to change in the file
>> "ndn-consumer-cbr.cpp"?
>>
>> For the commander: NS_LOG=ndn.Producer:ndn.Consumer ./waf
>> --run="scenario", it gives me just one type of Interest packet like this:
>>
>> 0s 5 ndn.Consumer:SendPacket(): [INFO ] > Interest for 0
>> 0s 5 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 0 with
>> +0.0ns. already 0 items
>> 0s 6 ndn.Consumer:SendPacket()
>> 0s 6 ndn.Consumer:SendPacket(): [INFO ] > Interest for 0
>> 0s 6 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 0 with
>> +0.0ns. already 0 items
>> 0s 8 ndn.Consumer:SendPacket()
>> 0s 8 ndn.Consumer:SendPacket(): [INFO ] > Interest for 0
>> 0s 8 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 0 with
>> +0.0ns. already 0 items
>> 0.000127315s 9 ndn.Producer:OnInterest(0x19f49d0, 0x1a64910)
>> 0.000127315s 9 ndn.Producer:OnInterest(): [INFO ] node(9) responding with
>> Data: /*Interest1*/%FE%00
>> 0.000324162s 1 ndn.Producer:OnInterest(0x19f3f10, 0x1a587b0)
>> 0.000324162s 1 ndn.Producer:OnInterest(): [INFO ] node(1) responding with
>> Data: /*Interest1*/%FE%00
>> 0.000810172s 4 ndn.Consumer:OnData(0x19f1060, 0x1a4d0b0)
>> 0.000810172s 4 ndn.Consumer:OnData(): [INFO ] < DATA for 0
>> 0.000810172s 4 ndn.Consumer:OnData(): [DEBUG] Hop count: 1
>> 0.00102885s 2 ndn.Producer:OnInterest(0x19f4270, 0x1a40620)
>> 0.00102885s 2 ndn.Producer:OnInterest(): [INFO ] node(2) responding with
>> Data: /*Interest1*/%FE%00
>> 0.1s 0 ndn.Consumer:SendPacket()
>> 0.1s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 1
>> 0.1s 0 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 1 with
>> +100000000.0ns. already 1 items
>> 0.1s 3 ndn.Consumer:SendPacket()
>>
>> I don't know if I have an error in specifying two names of Interest
>> packets. Here is a part of my code:
>>
>>   ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");
>>
>>   consumerHelper.SetPrefix("/Interest1");
>>   consumerHelper.SetAttribute("Frequency", DoubleValue(10.0));
>>   consumerHelper.Install(nodes.Get(0));
>>   consumerHelper.Install(nodes.Get(3));
>>   consumerHelper.Install(nodes.Get(4));
>>   consumerHelper.Install(nodes.Get(5))
>>
>>   consumerHelper.SetPrefix("/Interest2");
>>   consumerHelper.Install(nodes.Get(6));
>>   consumerHelper.Install(nodes.Get(8));
>>
>>   ndn::AppHelper producerHelper("ns3::ndn::Producer");
>>   producerHelper.SetPrefix("/");
>>   producerHelper.SetAttribute("PayloadSize", StringValue("1200"));
>>   producerHelper.Install(nodes.Get(1));
>>   producerHelper.Install(nodes.Get(2));
>>   producerHelper.Install(nodes.Get(7));
>>   producerHelper.Install(nodes.Get(9));
>>
>> My best regards,
>> Zakaria
>>>>
>> On Wed, Oct 6, 2021 at 2:40 AM sonia sabir <zohanoor67 at gmail.com> wrote:
>>
>>> [image: image.gif]You can see it in the consumer log file.
>>>
>>> run your scenario with consumer and producer log enabled
>>>
>>> NS_LOG=ndn.Producer:ndn.Consumer ./waf --run="scenario"
>>>
>>> Regards
>>>
>>> Sonia
>>>
>>> On Tue, Oct 5, 2021 at 7:29 PM Zakaria SABIR <zakaria.sabir at uit.ac.ma>
>>> wrote:
>>>
>>>> Hi everyone, I hope you are well.
>>>>
>>>> I have created two names of Interest packets in my scenario, and I want
>>>> to know how many times each Interest packet has been forwarded. I tried to
>>>> use the "L3RateTracer", but it just gives the number of all
>>>> the Interest packets.
>>>>
>>>> Could you help me, please?
>>>> My best regards.
>>>>
>>>> Zakaria
>>>>>>>> _______________________________________________
>>>> ndnSIM mailing list
>>>> ndnSIM at lists.cs.ucla.edu
>>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20211008/a00de0bb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.gif
Type: image/gif
Size: 42 bytes
Desc: not available
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20211008/a00de0bb/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.gif
Type: image/gif
Size: 42 bytes
Desc: not available
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20211008/a00de0bb/attachment-0003.gif>


More information about the ndnSIM mailing list