[ndnSIM] Control a producer in sending content by itself and neighbor router

Amin Karami amin at ac.upc.edu
Tue Oct 1 11:48:43 PDT 2013


I just copied the code of producer side.
Before producer declaration, I declared a consumer for sending interest 
packets as follows:
// Consumer
         ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
         consumerHelper.SetAttribute ("Frequency", StringValue ("500"));
         consumerHelper.SetAttribute ("Randomize", StringValue ("uniform"));
         consumerHelper.SetPrefix ("/dst1");
         apps = consumerHelper.Install ("Src1");
         apps.Start (Seconds (1.0));
         apps.Stop  (Seconds (10.0));

         consumerHelper.SetAttribute ("Frequency", StringValue ("1000"));
         consumerHelper.SetAttribute ("Randomize", StringValue ("uniform"));
         consumerHelper.SetPrefix ("/dst1");
         apps = consumerHelper.Install ("Src1");
         apps.Start (Seconds (15.0));
         apps.Stop  (Seconds (20.0));


As declared, consumer sends interest packets in two different times [1 
10) and [15 20). When i ran the code, producer responses in any time but 
i want to just respond in time between [2 5)


Best Regards,
Amin

On 10/01/2013 08:35 ب.ظ, Alex Afanasyev wrote:
> I'm a little bit confused.  Your code does not send any interests, but just installs the producer app that responds to Interests.   Who exactly is sending Interests?
>
> ---
> Alex
>
> On Oct 1, 2013, at 11:32 AM, Amin Karami <amin at ac.upc.edu> wrote:
>
>> Hi Alex,
>> About second question, I want a router just forward Interest packets to a specific Producer in a predefined time, e.g., between [2 5). When i ran the code, the interest forwarding continue after second 5. When you check my code, Does it work? I mean, after second 5, does router send any interest packet to producer or not send?
>>
>>
>> Best Regards,
>> Amin
>>
>> On 10/01/2013 07:40 ب.ظ, Alex Afanasyev wrote:
>>> Hi Amin!
>>>
>>> On Sep 29, 2013, at 12:03 PM, Amin Karami <amin at ac.upc.edu> wrote:
>>>
>>>> Hi friends,
>>>> In ndnSIM,
>>>> (1) How a neighbor router connected to a producer can control the InData rate from a producer? How a router can decrease or increase the rate?
>>> Router should control the number of Interests it is sending out towards the producer.  This should be done somewhere in the forwarding strategy (custom forwarding strategy) on that router.
>>>
>>>> (2) Also, I am going to declare an application with start and stop time for a producer. I mean, controlling a OutData rate by a producer itself. I wrote a below code, but App does not work in defined starting/finishing time.
>>>>
>>>>       ndn::AppHelper producerHelper ("ns3::ndn::Producer");
>>>>       producerHelper.SetAttribute ("PayloadSize", StringValue("1024"));
>>>>       producerHelper.SetAttribute ("Signature", StringValue("2"));
>>>>       ccnxGlobalRoutingHelper.AddOrigins ("/dst1");
>>>>       producerHelper.SetPrefix ("/dst1");
>>>>       producerHelper.Install ("P1");
>>>>       ApplicationContainer App = producerHelper.Install ("P1");
>>>>       App.Start(Seconds (2.0));
>>>>       App.Stop(Seconds (5.0));
>>> These code defined that producer app would respond to any incoming Interests under /dst1 prefix from [2,5) seconds of simulation time.  I checked the code and it should work as expected.
>>> This code, however, does not control what is cached in the content stores on the producer node and other routers.  Could it be the case that you're observing effect of caching?
>>>
>>> ---
>>> Alex
>>>
>>>> I looking forward to hear soon.
>>>>
>>>> Best Regards,
>>>> Amin
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim



More information about the ndnSIM mailing list