[ndnSIM] How to simulation two or three LNA in ndnSIM?

Alex Afanasyev alexander.afanasyev at ucla.edu
Tue Apr 16 17:06:06 PDT 2013


Hi Nilicy,

There is one important problem in your code, which probably is the reason of the problem: you should not call ndnStackHelper.Install (...) or ndnStackHelper.InstallAll ()  before all nodes and all links before nodes are actually created.

The reason for this restriction is that the Install method besides installing the stack creates necessary NDN faces based on the available NetDevices on the node.  If you call Install and then add new NetDevice (connect LANs), this NetDevice will not have a corresponding ndn::NetDeviceFace and thus NDN will not be aware of the available link.  If you really want to connect after calling Install, you will need to manually create faces and install faces in corresponding ndn::L3Protocols.

As for the other question about selective route calculation.  As it stands right now, CalculateRoutes does the job only for all available nodes. However, you can extend the ndn::GlobalRoutingHelper with another method that accept Node and/or NodeContainer parameter and calculates routes only for the requested nodes.  If you make this change, I will gladly push it to the main branch of ndnSIM, as it could be useful for others too.

---
Alex


On Apr 16, 2013, at 3:04 AM, youshou_wy <youshou_wy at 126.com> wrote:

> Hi  Alex,
>  
> I send you my  scenario , and i guess you maybe don't  the action  of   1.txt   , let me explain it.
>  
> I  Reload ForwardingStrategy::DidCreatePitEntry   in  ndn-ForwardingStrategy.cc   and  make some changes .  when a node receive a interest packet ,fisrt it will check  CS ,second check PIT and last check  FIB , if the node don't find entry about the interest ,the interest will be drop .  In my ForwardingStrategy.cc , wnen  node don't   find entry in FIB, it will check the 1.txt . In other words, 1.txt  store some  route   entrys.
>  
> So  when  i simulation in ndnSIM , I  wanna use   ndn::GlobalRoutingHelper::CalculateRoutes ()  to  add  some  FIB  entry   about  the  LAN  itself,  if   cosumer2 (belong to LAN2)  request a rouses comes form  LAN1, it must find  1.txt.
>  
> But maybe   ndn::GlobalRoutingHelper::CalculateRoutes ()   only  Calculate  all   the   nodes   routes    ,How to use  it to Calculate  some  nodes  routes?
>  
> youshou_wy
>  
> From: Alex Afanasyev
> Date: 2013-04-16 02:03
> To: youshou_wy
> CC: ndnsim at lists.cs.ucla.edu
> Subject: Re: How to simulation two or three LNA in ndnSIM?
> Hi Nilicy,
>  
> ndn::GlobalRoutingHelper should not have any problems in creating valid FIB entries from one LAN to another.  You can either send me your scenario, so I can check what is wrong, or you can use this scenario (http://pastebin.com/Hz3uE73m) that I just created as a base point.  (This scenario creates the same topology as you explained, but using PointToPointGridHelper.)
>  
> I'm a little bit confused about Add method that you have used.  If you're referring to Add on a NodeContainer, then it doesn't really do anything good to you, since NodeContainer is just a container and doesn't create any links.  To create links within a LAN, as well as between LANs, you need to use, for example, PointToPointHelper::Install method (check line 82 in the example I linked).
>  
> ---
> Alex
>  
> On Apr 15, 2013, at 2:37 AM, youshou_wy <youshou_wy at 126.com> wrote:
>  
> > Hi  Alex,  
> > I  wanna simulation two LAN in ndnSIM ,  i set  two NodeContainer to creating nodes, like is:
> >               NodeContainer node1;
> >               NodeContainer node2; 
> >         node1 contains the nodes of first LAN ,node2 contains the nodes of second LAN. I use Add(node1,node2) to create the WAN .  But when i use ndn::GlobalRoutingHelper to Generate each routes of every LAN ,it can't work .
> >         In other word , if i can create a network like is:
> >          
> > (consumer1) -- ( ) ----- ( )
> >     |           |         |
> >    ( ) ------- ( ) ----- ( )
> >     |           |         |
> >    ( ) ------- ( ) -- (producer1)    LAN1
> >                 |
> >                 |
> >                 |
> >  
> > (consumer2) -- ( ) ----- ( )
> >     |           |         |
> >    ( ) ------- ( ) ----- ( )
> >     |           |         |
> >    ( ) ------- ( ) -- (producer2)     LAN2
> >     
> >    I guess i can generation each LAN ,but if i must Manually add routes in each LAN?    
> >         Thanks
> >  
> > Nilicy
>  
> <ndn-grid-v2.cc><1.txt><topo-grid-lan1.txt><topo-grid-lan2.txt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130416/7930cbed/attachment.html>


More information about the ndnSIM mailing list