[ndnSIM] A question about ndnSim routing item

Alex Afanasyev alexander.afanasyev at ucla.edu
Mon Nov 4 11:25:36 PST 2013


Hi Xu,

There are two different things that are called "metric".  One thing that is metric for the face as managed by setMetric() method in ndn::NetDeviceFace.  This parameter is configured for the scenario in topology file (http://ndnsim.net/examples.html#node-grid-example-using-topology-plugin; 4th element on each line in 'link' block).

The other "metric" belongs to FIB entry:  priority with which interests for the prefix should be routed via this face.  This metric can be either configured manually via "AddRoute" call (http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_stack_helper.html#aa30137bf3324ce86d1a3c0708c0ac1f2), or if you use ndn::GlobalRoutingContoller, will be set automatically as a sum of individual ndn::NetDeviceFace metrics on the path.

I hope this clarifies the confusion,
Alex

On Nov 2, 2013, at 8:11 PM, xuzhw2001 at gmail.com wrote:

>   Hi, Alex
>  
>   Thank you for the reply, that help a lot. I have understood these items. But what does <FACE-METRIC> here stand for exactly? I have read the  ndn-fib-entry.cc and its .h.
>   There is an int32_t  variable named metric, and the class is also named FaceMetric. I am confused, since the class FaceMetric has many factors such as status,rtt, how can you only use  one variable to represent this class? Is the int32_t  variable metric a point of the class FaceMetric? But why setMetric() in ndn-net-device-face.cc set the varialbe to be 1 on the line 63.
>   Look forward to your reply, thanks a lot.
>  
> Xu Zhiwei
>  
>  
> 发件人: Alex Afanasyev
> 发送时间: 2013-11-02 06:08
> 收件人: xuzhw2001
> 抄送: ndnsim at lists.cs.ucla.edu
> 主题: Re: A question about ndnSim routing item
> Hi Xu,
> 
> I hope the list you showed is not for the same node, otherwise something is strange.
> 
> You can see the implementation detail on what is printed inside in model/ndn-net-device-face.cc and model/fw/ndn-fib-entry.cc (last methods), but here is brief summary:
> 
> dev[0]=net(0,0-4)(2,y,1)
> 
> for NetDeviceFace with PointToPointNetDevice
> 
> dev[<NODE ID>) = net(<FACE-ID>, <NODE-ID of one side of P2PChannel>-<NODE-ID of the other side of the channel))(<TOTAL-ROUTING-COST>, <STATUS-Y-for-yellow-G-for-gree-R-for-red>, <FACE-METRIC>)
> 
> for AppFace
> dev = local(<FACE-ID>)
> 
> ---
> Alex
> 
> On Oct 22, 2013, at 7:22 PM, xuzhw2001 at gmail.com wrote:
> 
>> Hi, Alex
>>  
>> I have written some experiments on ndnSim recently. Now, I have two problem about the routing process in ndnSim.
>> (1) I can't understand the detail of the routing item which I got in my experiment, listed as below:
>> /root    dev[0]=net(0,0-4)(2,y,1)
>> /root    dev[0]=net(0,0-4)(2,y,1)
>> /root    dev[4]=net(2,4-6)(1,y,1)
>> /root    dev[4]=net(2,4-6)(1,y,1)
>> /root    dev=local(2)(0,g,0)
>> /root    dev=local(2)(0,g,0)
>>  
>> Can you do me a favor to explain  the meaning of the parts in these routing items?  Thanks a lot.
>> xu zhiwei

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


More information about the ndnSIM mailing list