[ndnSIM] Obtaining the number of Interest packets

sonia sabir zohanoor67 at gmail.com
Thu Oct 7 19:39:38 PDT 2021


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/e3db3cb6/attachment.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/e3db3cb6/attachment.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/e3db3cb6/attachment-0001.gif>


More information about the ndnSIM mailing list