From alexander.afanasyev at ucla.edu Tue Oct 1 10:28:14 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Tue, 1 Oct 2013 10:28:14 -0700 Subject: [ndnSIM] Confused by Forwarding Strategies using In-Reply-To: <335259c9.e5.14167cd9dad.Coremail.fzufzu@163.com> References: <335259c9.e5.14167cd9dad.Coremail.fzufzu@163.com> Message-ID: <44A87923-84AF-487C-A6A4-5548D5597803@ucla.edu> Hi! In this particular topology (binary tree), there is absolutely no difference which strategy to use. To see any effect, you need to use a topology that has multiple alternative paths to reach producers. --- Alex On Sep 28, 2013, at 8:40 PM, fzufzu wrote: > I'm confused by learning the forwarding strategies. > I ran ndn-tree-with-12tracer.cc in the Terminal as follows in turn > ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute"); > //ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding"); > //ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::SmartFlooding"); > as you can see, i just changed the Forwardingstragy. Then, i found the trace file (drop-trace.txt) are the same. > > > Then i ran ndn-grid-topo-plugin.cc in the Terminal in the same way. The trace file gather data and sort by the following class. > | [ Time | Node | FaceId | FaceDescr | Type | Packets | Kilobytes | PacketRaw | KilobytesRaw | ] | > And the data was a mess . It takes me a lot of time to analyze but got nothing finally. > > > There comes my question: When the diffferent forwarding strategies make difference ? Does it make no differences in a scenario with few nodes? From alexander.afanasyev at ucla.edu Tue Oct 1 10:33:28 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Tue, 1 Oct 2013 10:33:28 -0700 Subject: [ndnSIM] OutData vs. InSatisfiedInterests and InData vs. OutSatisfiedInterests In-Reply-To: <5247FEF2.6020202@ac.upc.edu> References: <5247FEF2.6020202@ac.upc.edu> Message-ID: Hi Amin, In many of the scenarios, there is no difference. But it is not true in general. For example, if there are two PIT entries that share the same prefix and one Data packet arrives, there will be two events of In/OutSatisfiedInterest but only one In/OutData, since both Interests can be satisfied with the same Data. --- Alex On Sep 29, 2013, at 3:20 AM, Amin Karami wrote: > Hi friends, > > In ndnSIM tracer, is any different between "OutData" and "InSatisfiedInterests", and "InData" and "OutSatisfiedInterests" in an interface? > Because in my scenarios these parameters are same. Is it correct or incorrect? > > Best Regards, > Amin From alexander.afanasyev at ucla.edu Tue Oct 1 10:40:57 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Tue, 1 Oct 2013 10:40:57 -0700 Subject: [ndnSIM] Re: Control a producer in sending content by itself and neighbor router In-Reply-To: <52487980.30707@ac.upc.edu> References: <52487980.30707@ac.upc.edu> Message-ID: <861BCD81-BF0B-4C49-9FB0-56AE3ADE0F88@ucla.edu> Hi Amin! On Sep 29, 2013, at 12:03 PM, Amin Karami 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 From amin at ac.upc.edu Tue Oct 1 11:32:32 2013 From: amin at ac.upc.edu (Amin Karami) Date: Tue, 01 Oct 2013 20:32:32 +0200 Subject: [ndnSIM] Control a producer in sending content by itself and neighbor router In-Reply-To: <861BCD81-BF0B-4C49-9FB0-56AE3ADE0F88@ucla.edu> References: <52487980.30707@ac.upc.edu> <861BCD81-BF0B-4C49-9FB0-56AE3ADE0F88@ucla.edu> Message-ID: <524B1540.3060404@ac.upc.edu> 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 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 From alexander.afanasyev at ucla.edu Tue Oct 1 11:35:49 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Tue, 1 Oct 2013 11:35:49 -0700 Subject: [ndnSIM] Control a producer in sending content by itself and neighbor router In-Reply-To: <524B1540.3060404@ac.upc.edu> References: <52487980.30707@ac.upc.edu> <861BCD81-BF0B-4C49-9FB0-56AE3ADE0F88@ucla.edu> <524B1540.3060404@ac.upc.edu> Message-ID: 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 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 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 From amin at ac.upc.edu Tue Oct 1 11:48:43 2013 From: amin at ac.upc.edu (Amin Karami) Date: Tue, 01 Oct 2013 20:48:43 +0200 Subject: [ndnSIM] Control a producer in sending content by itself and neighbor router In-Reply-To: References: <52487980.30707@ac.upc.edu> <861BCD81-BF0B-4C49-9FB0-56AE3ADE0F88@ucla.edu> <524B1540.3060404@ac.upc.edu> Message-ID: <524B190B.6070404@ac.upc.edu> 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 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 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 From amin at ac.upc.edu Wed Oct 2 03:45:28 2013 From: amin at ac.upc.edu (Amin Karami) Date: Wed, 02 Oct 2013 12:45:28 +0200 Subject: [ndnSIM] a problem in 'ndn-simple-with-pit-operation-stats' Message-ID: <524BF948.6000209@ac.upc.edu> Hi Alex, I ran the ./waf --run=ndn-simple-with-pit-operation-stats by Lru implementation for PIT table. I set PIT Size to 50: ndnHelper.SetPit ("ns3::ndn::pit::Lru::AggregateStats","MaxSize","50"); Interest rate to 1000: consumerHelper.SetAttribute ("Frequency", StringValue ("1000")); Finally, the output is: Time NodeId Updates Inserts Lookups Erases 1 1 0 990 3 940 2 1 0 999 0 999 3 1 0 998 0 998 4 1 0 1000 0 1000 5 1 0 1000 0 1000 6 1 0 1000 0 1000 7 1 0 1000 0 1000 8 1 0 1000 0 1000 9 1 0 1000 0 1000 10 1 0 1000 0 1000 As you see, the number of Insert/Lookup/Erase is based on the rate of the Consumer (1000 interests per second), not based on the PIT maximum size. I think maximum insert/Erase should be fixed to 50 (PIT size) not to 1000 (consumer rate). Is there any problem? Best Regards, Amin From htunhtunu at gmail.com Wed Oct 2 03:55:16 2013 From: htunhtunu at gmail.com (Tun Tun Oo) Date: Wed, 2 Oct 2013 19:55:16 +0900 Subject: [ndnSIM] Fwd: Tracing with ndn-l3-rate-trace In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Tun Tun Oo Date: Wed, Oct 2, 2013 at 5:10 PM Subject: Tracing with ndn-l3-rate-trace To: ndnsim-request at lists.cs.ucla.edu Dear Alex, I am using ndn-l3-rate tracing for my experiment as to your example in the ndn-tree-tracers. But I found that the Interest rate/Data Rate shown in the graph is much lower than it is actually running. As far as I know, the reason for this problem may be in recent version of ndn-l3-rate-tracer files. Could you help me for how should I do with this problem. Regards TUN -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Wed Oct 9 00:47:03 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Wed, 9 Oct 2013 09:47:03 +0200 Subject: [ndnSIM] ndnSIM In-Reply-To: <401eb07c.1717a.141979735d0.Coremail.lakerskb.8@163.com> References: <401eb07c.1717a.141979735d0.Coremail.lakerskb.8@163.com> Message-ID: <56E2F690-33AE-4D00-8E92-64D3B937DEC0@ucla.edu> Hi! 1. You may want to check NS-3 documentation on tracing: http://www.nsnam.org/docs/manual/html/tracing.html You don't need to do anything special with m_receiveDatas, but you would need to implement your own callback and then use one of the forms of TraceConnect to connect callback to the right "trace source". You can use ndn::L3RateTracer (and its base class ndn::L2Tracer) as an example for that. 2. You can definitely can inherit from ndn::Limit class, but the question is where exactly you want to enable this limit. Are you planning to do it as part of the forwarding strategy? 3. I have a similar question as in 2. Where exactly you want to detect? If you implement your own consumer, then you will be able to detect congestion of the whole path. Is it what you're expecting? --- Alex On Oct 8, 2013, at 12:22 PM, "lakerskb.8" wrote: > Dear friend: > Hi?I am a new user of ndnSIM and I want to use it to do some experiment about congestion control. I have read the document file and source code for a few days but I am still not sure where to start. I have some questions, hope you can help me to solve. > 1. I am confused about the trace source of ndnSIM. Take the image below as an example. > If there is a callback function somewhere binds m_receivedDatas, or should I implement it myself? > 2. If I want to control the sending rate of interest packet, can I inherit ns3::ndn::limit class? > 3, If I want to detect the congestion based on interest sending rate?can I inherit ns3::ndn::consumer(just like the ConsumerWindow class)? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wingor944 at gmail.com Sun Oct 13 08:06:46 2013 From: wingor944 at gmail.com (Ruowei GUI) Date: Mon, 14 Oct 2013 00:06:46 +0900 Subject: [ndnSIM] Question about how to modify PIT/FIB entries Message-ID: Hi , I would like help with two tasks: 1. add some specific PIT entries during the simulation time. 2. modify the FIB entries at runtime. Could you give me some hints? Which structures to modify? Thanks in advance! Regards, Ruowei GUO -------------- next part -------------- An HTML attachment was scrubbed... URL: From 137425590 at qq.com Wed Oct 16 02:37:37 2013 From: 137425590 at qq.com (=?gb18030?B?vPfN4sjL?=) Date: Wed, 16 Oct 2013 17:37:37 +0800 Subject: [ndnSIM] confused by how to modify the FIB Message-ID: Hi friends, I want to modify the FIB and add some items in this function: FibImpl::Add (const Ptr &prefix, Ptr face, int32_t metric) 1?How to add items like some details more than name prefix of the recevied data it the entry . 2?How to store them (name prefix,ect.) in FIB . Best Regards, johnny -------------- next part -------------- An HTML attachment was scrubbed... URL: From htunhtunu at gmail.com Fri Oct 18 07:27:19 2013 From: htunhtunu at gmail.com (Tun Tun Oo) Date: Fri, 18 Oct 2013 23:27:19 +0900 Subject: [ndnSIM] Request about ConsumerWindow Message-ID: Dear Alex and all, I would like to request Alex and all, for correcting the following problem in ConsumerWindow and Consumer class. While I am experimenting congestion topology with ConsumerWindow Class. I found that the following behavior from Log for sending Interest and Window Control. Data 0 (Received)-> Window Size (2)-> Sending Interest (1) (2) Data 1 (Received)-> Window Size (4) -> Sending Interest (3) (4) As you mention in your previous mail, it is very simple logic and it is using window = window+1. >From the log I can see window size in even number but I believe it has correctly working for additive increase. But sending Interest might be wrong sequence and it should send only one for each window as below. Data 0 (Received)-> Window Size (1)-> Sending Interest (1) Data 1 (Received)->Window Size (2) -> Sending Interest (2) Data 2 (Received)->Window Size (3) -> Sending Interest (3) Data 3 (Received)->Window Size (4) -> Sending Interest (4) If it is working like this,we probably can see this as a log. Data 0 (Received)-> Window Size (2)-> Sending Interest (1) (2) Data 1 (Received)->Data 1 (Received)-> Window Size (4) -> Sending Interest (3) (4) I would like to request you how should I do to correct it in Consumer Class and ConsumerWindow Class. Thanks you in advance. Regards TUN -------------- next part -------------- An HTML attachment was scrubbed... URL: From leshuyuan at 163.com Sat Oct 26 20:38:41 2013 From: leshuyuan at 163.com (=?GBK?B?wNbK5tSt?=) Date: Sun, 27 Oct 2013 11:38:41 +0800 (CST) Subject: [ndnSIM] A Problem About NS-3 Object Message-ID: <30d1697.2327.141f7fe05ce.Coremail.leshuyuan@163.com> Hello Everybody: I'm a newer in learning ndnSIM adn ns-3.I have a problem about ns-3 object when I programming my own forwarding strategy imitating the PerOutFaceLimits class.The problem are as follow: Firstly, void MyFwStrategy_InterestRate::AddFace(Ptr face){ NS_LOG_DEBUG("in addface"); ObjectFactory factory; NS_LOG_DEBUG("in addface"); const std::string typeId="ns3::ndn::InterestSatisfiedRate"; NS_LOG_DEBUG("in addface"); factory.setTypeId(typeId); NS_LOG_DEBUG("in addface"); Ptr interestSatisfiedRate = factory.Create(); NS_LOG_DEBUG("in addface"); face->AggregateObject( interestSatisfiedRate); } The problem is the fifth Log didn't print.That means the problem happens when Create the InterestSatisfiedRate Object. Secondly, void MyFwStrategy_InterestRate::AddFace(Ptr face){ NS_LOG_DEBUG("in addface"); Ptr interestSatisfiedRate =CreateObject(); NS_LOG_DEBUG("in addface"); face->AggregateObject( interestSatisfiedRate); NS_LOG_DEBUG("in addface"); } The problem is the third Log didn't print.That means the problem happens when the face aggretate the InterestSatisfiedRate Object. Can someone help me solve the trouble? Thanks So Much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.afanasyev at ucla.edu Sun Oct 27 21:32:05 2013 From: alexander.afanasyev at ucla.edu (Alex Afanasyev) Date: Sun, 27 Oct 2013 21:32:05 -0700 Subject: [ndnSIM] A Problem About NS-3 Object In-Reply-To: <30d1697.2327.141f7fe05ce.Coremail.leshuyuan@163.com> References: <30d1697.2327.141f7fe05ce.Coremail.leshuyuan@163.com> Message-ID: <60D3DB37-06CE-4E9D-8536-26EEC7473FD9@ucla.edu> Hi! I'm not sure how your code compiles. "Ptr interestSatisfiedRate = factory.Create();" should fail, since "factory.Create()" creates Ptr which needs to be dynamically casted to be assigned as InterestSatisfiedRate. If the code compiles but it fails at some point, my recommendation would be to use gdb to see what exactly is going wrong. --- Alex On Oct 26, 2013, at 8:38 PM, ??? wrote: > Hello Everybody: > I'm a newer in learning ndnSIM adn ns-3.I have a problem about ns-3 object when I programming my own forwarding strategy imitating the PerOutFaceLimits class.The problem are as follow: > Firstly, > void MyFwStrategy_InterestRate::AddFace(Ptr face){ > NS_LOG_DEBUG("in addface"); > ObjectFactory factory; > NS_LOG_DEBUG("in addface"); > const std::string typeId="ns3::ndn::InterestSat! isfiedRat e"; > NS_LOG_DEBUG("in addface"); > factory.setTypeId(typeId); > NS_LOG_DEBUG("in addface"); > Ptr interestSatisfiedRate = factory.Create(); > NS_LOG_DEBUG("in addface"); > face->AggregateObject( interestSatisfiedRate); > } > The problem is the fifth Log didn't print.That means the problem happens when Create the InterestSatisfiedRate Object. > Secondly, > void MyFwStrategy_InterestRate::AddFace(Ptr face){ > NS_LOG_DEBUG("in addface"); > Ptr interestSatisfiedRate =CreateObject(); > NS_LOG_DEBUG("in addface"); > face->AggregateObject( interestSatisfiedRate); > NS_LOG_DEBUG("in addface"); > } > The problem is the third Log didn't print.That means the problem happens when the face aggretate the InterestSatisfiedRate Object. > Can someone help me solve the trouble? > Thanks So Much! > > > > > > > > _______________________________________________ > 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: From masri.sahri at gmail.com Mon Oct 28 22:58:56 2013 From: masri.sahri at gmail.com (nor masri sahri) Date: Tue, 29 Oct 2013 14:58:56 +0900 Subject: [ndnSIM] simple simulation Message-ID: hi, im new to ndnsim and ns3. i want to simulate 4 nodes, 1 as Consumer, 2 node as internediate router and 1 node as Producer. State of art of NDN is to forward the Interest to every connected node with the Consumer Do I have to set manually route or just concern about forwarding strategy? FYI, i manage to connect Consumer node to the 2 intermediate node but when i run the simulation, the traffic goes to only one node. ndn::StackHelper ndnHelper; ndnHelper.SetDefaultRoutes (false); ndnHelper.InstallAll (); ndnHelper.Install (nodes); thank you (really interested to explore more on ndnsim) -- Regards, masri.sahri Phd Student, Kyushu University, Japan -------------- next part -------------- An HTML attachment was scrubbed... URL: From leshuyuan at 163.com Tue Oct 29 20:53:28 2013 From: leshuyuan at 163.com (=?GBK?B?wNbK5tSt?=) Date: Wed, 30 Oct 2013 11:53:28 +0800 (CST) Subject: [ndnSIM] collapse during simulation Message-ID: <1f744faf.148e9.142077e9fba.Coremail.leshuyuan@163.com> Hi all, I've met a trouble during my simulation.I write my own forwarding strategy and run it in the 11-node 2-bottlenect topology.But,the simulation is collapsed during the first data packet returning.I used gdb to debug it and no exception caught.Here is the log when I run the scenario: Waf: Leaving directory `/home/lok/ndnSIM/scenario/build' 'build' finished successfully (27.229s) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af7418, NodeId:, 0, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af7968, NodeId:, 1, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af7c18, NodeId:, 2, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af7eb8, NodeId:, 3, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8108, NodeId:, 4, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8108, NodeId:, 4, ;FaceId:, 1) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8108, NodeId:, 4, ;FaceId:, 2) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8108, NodeId:, 4, ;FaceId:, 3) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8108, NodeId:, 4, ;FaceId:, 4) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8108, NodeId:, 4, ;FaceId:, 5) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af88e0, NodeId:, 5, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af88e0, NodeId:, 5, ;FaceId:, 1) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8d70, NodeId:, 6, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8d70, NodeId:, 6, ;FaceId:, 1) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8d70, NodeId:, 6, ;FaceId:, 2) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8d70, NodeId:, 6, ;FaceId:, 3) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8d70, NodeId:, 6, ;FaceId:, 4) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af8d70, NodeId:, 6, ;FaceId:, 5) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af9578, NodeId:, 7, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af98e8, NodeId:, 8, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af9c58, NodeId:, 9, ;FaceId:, 0) 0s -1 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9afa028, NodeId:, 10, ;FaceId:, 0) 0s 0 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af7418, NodeId:, 0, ;FaceId:, 1) 0s 7 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af9578, NodeId:, 7, ;FaceId:, 1) 0s 8 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af98e8, NodeId:, 8, ;FaceId:, 1) 0s 9 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9af9c58, NodeId:, 9, ;FaceId:, 1) 0s 10 ndn.fw.MyFwStrategy_InterestRate:AddFace(0x9afa028, NodeId:, 10, ;FaceId:, 1) 0s 0 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(0x9af7418) 0s 0 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(): [DEBUG] Trying dev=net(0)(1,y,1) 0s 0 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(0x9af7418, /data/p1/%00, NodeId:, 0, ;FaceId:, 0) 0s 0 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(): [DEBUG] 0x9af7418Interest Sended Count 1 0.0500264s 4 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(0x9af8108) 0.0500264s 4 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(): [DEBUG] Trying dev=net(4)(1,y,1) 0.0500264s 4 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(0x9af8108, /data/p1/%00, NodeId:, 4, ;FaceId:, 4) 0.0500264s 4 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(): [DEBUG] 0x9af8108Interest Sended Count 1 0.0500264s 4 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(): [DEBUG] Trying dev=net(5)(2,y,1) 0.0500264s 4 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(0x9af8108, /data/p1/%00, NodeId:, 4, ;FaceId:, 5) 0.0500264s 4 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(): [DEBUG] 0x9af8108Interest Sended Count 1 0.0512904s 5 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(0x9af88e0) 0.0512904s 5 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(): [DEBUG] Trying dev=net(1)(1,y,1) 0.0512904s 5 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(0x9af88e0, /data/p1/%00, NodeId:, 5, ;FaceId:, 1) 0.0512904s 5 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(): [DEBUG] 0x9af88e0Interest Sended Count 1 0.0525544s 6 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(0x9af8d70) 0.0525544s 6 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(): [DEBUG] Trying dev=net(2)(1,y,1) 0.0525544s 6 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(0x9af8d70, /data/p1/%00, NodeId:, 6, ;FaceId:, 2) 0.0525544s 6 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(): [DEBUG] 0x9af8d70Interest Sended Count 1 0.0535808s 7 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(0x9af9578) 0.0535808s 7 ndn.fw.MyFwStrategy_InterestRate:DoPropagateInterest(): [DEBUG] Trying dev=local(1)(0,g,0) 0.0535808s 7 ndn.fw.MyFwStrategy_InterestRate:WillSatisfyPendingInterest(0x9af9578, /data/p1/%00, /data/p1/%00, NodeId:, 7, ;FaceId:, 1) 0.0535808s 7 ndn.fw.MyFwStrategy_InterestRate:WillSatisfyPendingInterest(): [DEBUG] 0x9af9578SatisfyInterest Count 1 0.0535808s 7 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(0x9af9578, /data/p1/%00, NodeId:, 7, ;FaceId:, 1) 0.0535808s 7 ndn.fw.MyFwStrategy_InterestRate:DidSendOutInterest(): [DEBUG] 0x9af9578Interest Sended Count 1 0.0554312s 6 ndn.fw.MyFwStrategy_InterestRate:WillSatisfyPendingInterest(0x9af8d70, /data/p1/%00, /data/p1/%00, NodeId:, 6, ;FaceId:, 2) 0.0554312s 6 ndn.fw.MyFwStrategy_InterestRate:WillSatisfyPendingInterest(): [DEBUG] 0x9af8d70SatisfyInterest Count 1 0.0649352s 5 ndn.fw.MyFwStrategy_InterestRate:WillSatisfyPendingInterest(0x9af88e0, /data/p1/%00, /data/p1/%00, NodeId:, 5, ;FaceId:, 1) 0.0649352s 5 ndn.fw.MyFwStrategy_InterestRate:WillSatisfyPendingInterest(): [DEBUG] 0x9af88e0SatisfyInterest Count 1 0.0702904s 6 ndn.fw.MyFwStrategy_InterestRate:WillSatisfyPendingInterest(root at ubuntu:/home/lok/ndnSIM/scenario# The log shows that the simulation collapsed after the router(node 5) receiving the data packet. The follow is my forwarding strategy: #include "MyFwStrategy_InterestRate.h" #include "interestsatisfiedrate.h" #include "ns3/ndn-fib.h" #include "ns3/ndn-fib-entry.h" #include "ns3/ndn-pit-entry.h" #include "ns3/ndn-interest.h" #include "ns3/ndn-face.h" #include "ns3/node.h" #include "ns3/assert.h" #include "ns3/log.h" #include "ns3/simulator.h" #include "ns3/boolean.h" #include #include #include #include #include "iostream" namespace ll = boost::lambda; namespace ns3{ namespace ndn{ namespace fw{ NS_OBJECT_ENSURE_REGISTERED(MyFwStrategy_InterestRate); LogComponent MyFwStrategy_InterestRate::g_log = LogComponent (MyFwStrategy_InterestRate::GetLogName ().c_str ()); std::string MyFwStrategy_InterestRate::GetLogName () { return "ndn.fw.MyFwStrategy_InterestRate"; } TypeId MyFwStrategy_InterestRate::GetTypeId (void) { static TypeId tid = TypeId ("ns3::ndn::fw::MyFwStrategy_InterestRate") .SetGroupName ("Ndn") .SetParent () .AddConstructor () // .AddAttribute ("Attribute", "Attribute spec", // StringValue ("DefaultValue"), // MakeStringAccessor (& // MakeStringChecker ()) ; return tid; } MyFwStrategy_InterestRate::MyFwStrategy_InterestRate(){} void MyFwStrategy_InterestRate::AddFace (Ptr face){ NS_LOG_FUNCTION(this << " NodeId:" << face->GetNode()->GetId() <<";FaceId:"<< face->GetId()); ObjectFactory factory; const std::string typeId = "ns3::ndn::InterestSatisfiedRate"; factory.SetTypeId(typeId); Ptr interestSatisfiedRate =factory.Create(); //Ptr interestSatisfiedRate = // CreateObject(); //NS_LOG_DEBUG("after AddFace"); face->AggregateObject(interestSatisfiedRate); super::AddFace(face); } void MyFwStrategy_InterestRate::DidSendOutInterest (Ptr inFace, Ptr outFace,Ptr interest,Ptr pitEntry){ NS_LOG_FUNCTION(this << pitEntry->GetPrefix()<< " NodeId:" << outFace->GetNode()->GetId() <<";FaceId:"<< outFace->GetId()); super::DidSendOutInterest (inFace,outFace,interest,pitEntry); Ptr interestSatisfiedRate = outFace->GetObject(); interestSatisfiedRate-> addOutInterests(); NS_LOG_DEBUG(this << "Interest Sended Count " << interestSatisfiedRate-> getOutInterests()); } void MyFwStrategy_InterestRate::WillSatisfyPendingInterest (Ptr inFace,Ptr pitEntry){ NS_LOG_FUNCTION(this << pitEntry->GetPrefix()<< pitEntry->GetPrefix()<< " NodeId:" << inFace->GetNode()->GetId() <<";FaceId:"<< inFace->GetId()); super::WillSatisfyPendingInterest (inFace,pitEntry); Ptr interestSatisfiedRate = inFace->GetObject(); interestSatisfiedRate-> addSatisfiedInterests(); NS_LOG_DEBUG(this << "SatisfyInterest Count " << interestSatisfiedRate-> getSatisfiedInterests()); } //void MyFwStrategy_InterestRate::WillEraseTimedOutPendingInterest (Ptr pitEntry){ // NS_LOG_FUNCTION(this << pitEntry->GetPrefix()); // super::WillEraseTimedOutPendingInterest (pitEntry); // BOOST_FOREACH(const fib::FaceMetric &metricFace,pitEntry->GetFibEntry()) //} bool MyFwStrategy_InterestRate::DoPropagateInterest (Ptr inFace,Ptr interest,Ptr pitEntry){ NS_LOG_FUNCTION (this); int propagatedCount = 0; BOOST_FOREACH (const fib::FaceMetric &metricFace, pitEntry->GetFibEntry ()->m_faces.get ()) { NS_LOG_DEBUG ("Trying " << boost::cref(metricFace)); if (metricFace.GetStatus () == fib::FaceMetric::NDN_FIB_RED) // all non-read faces are in the front of the list break; if (!TrySendOutInterest (inFace, metricFace.GetFace (), interest, pitEntry)) { continue; } propagatedCount++; } //NS_LOG_INFO ("Propagated to " << propagatedCount << " faces"); return propagatedCount > 0; } } } } By the way,the scenario is correct because I run another forwarding strategy in it successfully. -------------- next part -------------- An HTML attachment was scrubbed... URL: From 997566196 at qq.com Wed Oct 30 07:03:15 2013 From: 997566196 at qq.com (=?gb18030?B?1LWhpMPO?=) Date: Wed, 30 Oct 2013 22:03:15 +0800 Subject: [ndnSIM] unexcepted interruption in wireless multi-hop scenarios Message-ID: Hello Everyone, I'm a new learner to ndnSIM. I have a problem when I try to delay some time before sending out an interest. The detailed description are as follow: I want to impliment simulation in a wireless multi-hop scenario with ndnSIM. For the first step, I do simple changes to deal with the Face abstraction, and the key point is to enable "forwarding" to the incoming face. I suppose every node has one wireless interface. It works well in a linear topology, for example 9 nodes in a line and the first node as Consumer and the last one Producer. The intermediate nodes can forward the interest and data to its neighbours(include the next hop and the front hop). Hop by hop, the Consumer and Producer can communicate with each other successfully in this linear topology. But in a more complicated topology, for example a 3*5 Grid topology, we need to delay a random time before forwarding an interest or data to avoid collision. It's the second step, where my problem appears. I just do a simple changes in this step, as follows: change From PropagateInterest (inFace, interest, pitEntry); To Simulator::Schedule(MicroSeconds(rand_delay),&ForwardingStrategy::PropagateInterest,this,inFace, interest, pitEntry); Then the simulation can't run continuously. It just runs for a perod of time and stop with an error.The error message is ?Command ['/home/long/ndnSIM0823/ns-3/build/scratch/ndn-wireless1'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run --command-template="gdb --args %s "). ? I try hard to solve this problem, but can't make it till now. I hope you can give me some help. Thank you so much! Best Regards! -------------- next part -------------- An HTML attachment was scrubbed... URL: