Problem with Manet Routing Compare.cc

628 views
Skip to first unread message

HC Tan

unread,
Jul 6, 2013, 3:11:24 PM7/6/13
to ns-3-...@googlegroups.com
Hi,

i'm running example/routing/manet-routing-compare.cc to assess the performance of AODV and i observed that all the 10 flows being generated have low throughput or 0 throughput. Looks like there's issue with AODV routing protocol in ns-3. Has anyone encountered the same problem?
For info, i'm using ns3-16 to run the example.

AODV

FlowID: 51 ( 10.1.1.11/49154 --> 10.1.1.1/9)
 Tx Packets:399
 Rx Packets:0
 Lost Packets:390
FlowID: 56 ( 10.1.1.17/49154 --> 10.1.1.7/9)
 Tx Packets:399
 Rx Packets:0
 Lost Packets:550
FlowID: 105 ( 10.1.1.16/49154 --> 10.1.1.6/9)
 Tx Packets:399
 Rx Packets:0
 Lost Packets:816
FlowID: 108 ( 10.1.1.14/49154 --> 10.1.1.4/9)
 Tx Packets:399
 Rx Packets:0
 Lost Packets:355
FlowID: 221 ( 10.1.1.12/49154 --> 10.1.1.2/9)
 Tx Packets:398
 Rx Packets:0
 Lost Packets:344
FlowID: 259 ( 10.1.1.19/49154 --> 10.1.1.9/9)
 Tx Packets:398
 Rx Packets:0
 Lost Packets:354
FlowID: 345 ( 10.1.1.13/49154 --> 10.1.1.3/9)
 Tx Packets:398
 Rx Packets:0
 Lost Packets:638
FlowID: 432 ( 10.1.1.20/49154 --> 10.1.1.10/9)
 Tx Packets:397
 Rx Packets:0
 Lost Packets:382
FlowID: 475 ( 10.1.1.18/49154 --> 10.1.1.8/9)
 Tx Packets:396
 Rx Packets:1
 Lost Packets:352
Mean Hop Count = 13
Throughput: 0.00904309 Kbps
FlowID: 477 ( 10.1.1.15/49154 --> 10.1.1.5/9)
 Tx Packets:396
 Rx Packets:7
 Lost Packets:585
Mean Hop Count = 5
Throughput: 0.301784 Kbps

John Abraham

unread,
Jul 9, 2013, 9:16:40 PM7/9/13
to ns-3-...@googlegroups.com
1. How did you run the program? (the command line)
2. When I tried on ns-3.16 I get the attached flow-mon results, which don't show the same degree of packet loss you observed.
3. 

John-Abrahams-MacBook-Pro:ns-3.16 john$ export NS_LOG=OnOffApplication
John-Abrahams-MacBook-Pro:ns-3.16 john$ ./waf --run "manet-routing-compare" &>a.out
John-Abrahams-MacBook-Pro:ns-3.16 john$ grep sent a.out | wc -l
    3979
John-Abrahams-MacBook-Pro:ns-3.16 john$ grep received a.out | wc -l
    1457

Gives me at least a 36% receive rate, overall. This should be better in ns-3.17.
Also observe the packet receive-rate in the csv file that is generated by the example.





--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Screen Shot 2013-07-09 at 5.28.11 PM.png

HC Tan

unread,
Jul 10, 2013, 8:08:07 AM7/10/13
to ns-3-...@googlegroups.com
Hi John,

i believe i've figured out the problem. The reason for zero throughput is because i've enabled promiscuous mode on all nodes in the network by setting promiscuous mode=true in node.h file as in the given code below.

void RegisterProtocolHandler (ProtocolHandler handler,
                                uint16_t protocolType,
                                Ptr<NetDevice> device,
                                bool promiscuous=true);

I did that because i want every node in the network to be able to overhear its downstream node's transmission. (i'm trying to implement watchdog mechanism).
After i disable promiscuous mode on all nodes, throughput i get is not zero based on flowmon data. My question then is, [1] Why the throughput is zero or near zero when promiscuous mode is enabled on node? And [2] How do i solve this if i still require the overhearing capability on all nodes?

I suppose i'll have to modify the routing protocol to drop all overhearing packets after i process them or do you have any other better solutions.
Thanks in advance..

Promiscuous mode = false


FlowID: 51 ( 10.1.1.11/49154 --> 10.1.1.1/9)
 Tx Packets:399
 Rx Packets:154
 Lost Packets:217
 Mean{Hop Count}: 2
FlowID: 69 ( 10.1.1.17/49154 --> 10.1.1.7/9)
 Tx Packets:399
 Rx Packets:106
 Lost Packets:253
 Mean{Hop Count}: 1
FlowID: 72 ( 10.1.1.16/49154 --> 10.1.1.6/9)
 Tx Packets:399
 Rx Packets:118
 Lost Packets:250
 Mean{Hop Count}: 1
FlowID: 73 ( 10.1.1.14/49154 --> 10.1.1.4/9)
 Tx Packets:399
 Rx Packets:180
 Lost Packets:215
 Mean{Hop Count}: 1
FlowID: 86 ( 10.1.1.12/49154 --> 10.1.1.2/9)
 Tx Packets:398
 Rx Packets:296
 Lost Packets:77
 Mean{Hop Count}: 1
FlowID: 87 ( 10.1.1.19/49154 --> 10.1.1.9/9)
 Tx Packets:398
 Rx Packets:327
 Lost Packets:71
 Mean{Hop Count}: 1
FlowID: 88 ( 10.1.1.13/49154 --> 10.1.1.3/9)
 Tx Packets:398
 Rx Packets:93
 Lost Packets:279
 Mean{Hop Count}: 3
FlowID: 103 ( 10.1.1.20/49154 --> 10.1.1.10/9)
 Tx Packets:397
 Rx Packets:69
 Lost Packets:328
 Mean{Hop Count}: 3
FlowID: 106 ( 10.1.1.18/49154 --> 10.1.1.8/9)
 Tx Packets:396
 Rx Packets:336
 Lost Packets:60
 Mean{Hop Count}: 1
FlowID: 107 ( 10.1.1.15/49154 --> 10.1.1.5/9)
 Tx Packets:396
 Rx Packets:143
 Lost Packets:213
 Mean{Hop Count}: 1

John Abraham

unread,
Jul 10, 2013, 9:20:57 AM7/10/13
to ns-3-...@googlegroups.com
I am not sure, intuitively this looks like a bug.
Rather than RegisterProtocolHandler, they are talking about monitor sniffer NotifyMonitorSniffRx


HC Tan

unread,
Jul 15, 2013, 6:47:00 AM7/15/13
to ns-3-...@googlegroups.com
Hi,

I have found a better method of enabling overhearing for all nodes and this is done at the routing layer. I added the following line to RoutingProtocol::Start () in AODV:

 ipv4 = m_ipv4->GetObject<Node>()->GetObject<Ipv4L3Protocol>();   
  Ipv4Address loopback ("127.0.0.1");
  for (uint32_t i = 0; i < ipv4->GetNInterfaces (); i++)
  {
      Ipv4Address addr = ipv4->GetAddress (i, 0).GetLocal ();
      if (addr != loopback)
      {
          ipv4->GetNetDevice (1)->SetPromiscReceiveCallback (MakeCallback (&RoutingProtocol::PromiscReceive, this));
      }
  }

This registers SetPromiscReceiveCallback on netdevice and will invoke method RoutingProtocol::PromiscReceive to process the overheard packets. Using this method, i re-run manet-routing-compare.cc and did not encounter zero throughput as reported earlier.

However, i did encounter any problem. in this simple scenario,

                        ---        ---        ---        ---    
                       | 0 | -> | 1 | -> | 2 | -> | 3 |
                        ---        ---        ---        ---  

Scenario : Source Node : 0, Destination Node :3
Node 0 will overhear to determine if 1 is forwarding out packets it received from 0
Node 1 will overhear to determine if 2 is forwarding out packets it received from 1

I realized that node 1 is unable to overhear several packets that were forwarded by node 2 to node 3. if node 2 forwarded 100 packets to node 3, node 1 can only overhear 98 packets. why is this so?

Rania

unread,
Jun 2, 2016, 6:50:17 AM6/2/16
to ns-3-...@googlegroups.com


HC Tan <hctan0410@...> writes:

> I am not sure, intuitively this looks like a bug.Have a look

at https://www.nsnam.org/bugzilla/show_bug.cgi?id=827
>
>
> Rather than RegisterProtocolHandler, they are talking about monitor
sniffer NotifyMonitorSniffRx
> also look at http://network-simulator-ns-2.7690.n7.nabble.com/Promiscuous-
mode-for-wifi-mac-layer-td19097.html
>
>
>
>
>

> On Wed, Jul 10, 2013 at 5:08 AM, HC Tan <hcta... <at> gmail.com> wrote:Hi

John, i believe i've figured out the problem. The reason for zero throughput
is because i've enabled promiscuous mode on all nodes in the network by
setting promiscuous mode=true in node.h file as in the given code below.
void RegisterProtocolHandler (ProtocolHandler handler,
                                uint16_t
protocolType,                                Ptr<NetDevice>
device,                                bool promiscuous=true);I did that
because i want every node in the network to be able to
> overhear its downstream node's transmission. (i'm trying to implement

> watchdog mechanism).After i disable promiscuous mode on all nodes,

throughput i get is not zero based on flowmon data. My question then is, [1]
Why the throughput is zero or near zero when promiscuous mode is enabled on
node? And [2] How do i solve this if i still require the overhearing

capability on all nodes?I suppose i'll have to modify the routing protocol

to drop all overhearing packets after i process them or do you have any

other better solutions. Thanks in advance..Promiscuous mode = false


> FlowID: 51 ( 10.1.1.11/49154 --> 10.1.1.1/9) Tx Packets:399
>  Rx Packets:154 Lost Packets:217

>  Mean{Hop Count}: 2FlowID: 69 ( 10.1.1.17/49154 --> 10.1.1.7/9) Tx

Packets:399 Rx Packets:106 Lost Packets:253

>  Mean{Hop Count}: 1FlowID: 72 ( 10.1.1.16/49154 --> 10.1.1.6/9) Tx

Packets:399 Rx Packets:118 Lost Packets:250

>  Mean{Hop Count}: 1FlowID: 73 ( 10.1.1.14/49154 --> 10.1.1.4/9) Tx

Packets:399 Rx Packets:180 Lost Packets:215

>  Mean{Hop Count}: 1FlowID: 86 ( 10.1.1.12/49154 --> 10.1.1.2/9) Tx

Packets:398 Rx Packets:296 Lost Packets:77

>  Mean{Hop Count}: 1FlowID: 87 ( 10.1.1.19/49154 --> 10.1.1.9/9) Tx

Packets:398 Rx Packets:327 Lost Packets:71

>  Mean{Hop Count}: 1FlowID: 88 ( 10.1.1.13/49154 --> 10.1.1.3/9) Tx

Packets:398 Rx Packets:93 Lost Packets:279

>  Mean{Hop Count}: 3FlowID: 103 ( 10.1.1.20/49154 --> 10.1.1.10/9) Tx

Packets:397 Rx Packets:69 Lost Packets:328

>  Mean{Hop Count}: 3FlowID: 106 ( 10.1.1.18/49154 --> 10.1.1.8/9) Tx

Packets:396 Rx Packets:336 Lost Packets:60

>  Mean{Hop Count}: 1FlowID: 107 ( 10.1.1.15/49154 --> 10.1.1.5/9) Tx

Packets:396 Rx Packets:143 Lost Packets:213
>  Mean{Hop Count}: 1
> On Wednesday, July 10, 2013 9:16:40 AM UTC+8, John Abraham wrote:
>
> 1. How did you run the program? (the command line)2. When I tried on ns-
3.16 I get the attached flow-mon results, which don't show the same degree
of packet loss you observed.
>
> 3. 
>
> John-Abrahams-MacBook-Pro:ns-3.16 john$ export NS_LOG=OnOffApplication
> John-Abrahams-MacBook-Pro:ns-3.16 john$ ./waf --run "manet-routing-
compare" &>a.out
>
> John-Abrahams-MacBook-Pro:ns-3.16 john$ grep sent a.out | wc -l
>     3979
> John-Abrahams-MacBook-Pro:ns-3.16 john$ grep received a.out | wc -l
>     1457
>
>
> Gives me at least a 36% receive rate, overall. This should be better in
ns-3.17.
> Also observe the packet receive-rate in the csv file that is generated by
the example.
>
>
>
>
> On Sat, Jul 6, 2013 at 12:11 PM, HC Tan <hcta...-
Re5JQEeQqe8...@public.gmane.org> wrote:
>
>
> Hi, i'm running example/routing/manet-routing-compare.cc to assess the
performance of AODV and i observed that all the 10 flows being generated
have low throughput or 0 throughput. Looks like there's issue with AODV
routing protocol in ns-3. Has anyone encountered the same problem?
>

> For info, i'm using ns3-16 to run the example.AODVFlowID: 51 (
10.1.1.11/49154 --> 10.1.1.1/9)
>
>  Tx Packets:399 Rx Packets:0 Lost Packets:390FlowID: 56 ( 10.1.1.17/49154

--> 10.1.1.7/9) Tx Packets:399
>

>  Rx Packets:0 Lost Packets:550FlowID: 105 ( 10.1.1.16/49154 -->

10.1.1.6/9) Tx Packets:399 Rx Packets:0
>

>  Lost Packets:816FlowID: 108 ( 10.1.1.14/49154 --> 10.1.1.4/9) Tx

Packets:399 Rx Packets:0 Lost Packets:355
>
> FlowID: 221 ( 10.1.1.12/49154 --> 10.1.1.2/9) Tx Packets:398 Rx

Packets:0 Lost Packets:344FlowID: 259 ( 10.1.1.19/49154 --> 10.1.1.9/9)
>
>  Tx Packets:398 Rx Packets:0 Lost Packets:354FlowID: 345 ( 10.1.1.13/49154

--> 10.1.1.3/9) Tx Packets:398
>

>  Rx Packets:0 Lost Packets:638FlowID: 432 ( 10.1.1.20/49154 -->

10.1.1.10/9) Tx Packets:397 Rx Packets:0
>

>  Lost Packets:382FlowID: 475 ( 10.1.1.18/49154 --> 10.1.1.8/9) Tx

Packets:396 Rx Packets:1 Lost Packets:352
>

> Mean Hop Count = 13Throughput: 0.00904309 KbpsFlowID: 477 (

10.1.1.15/49154 --> 10.1.1.5/9) Tx Packets:396
>
>  Rx Packets:7 Lost Packets:585Mean Hop Count = 5Throughput: 0.301784 Kbps
>
>
>


Hello I am trying to do basically the same thing: implement watchdog using
aodv.

The code you posted to be used in the beginning (start) of aodv does not
work as the call back is not declared for this protocol. It is declared for
the DSR. Any idea how can I make it work? Thanks in advance.

Tommaso Pecorella

unread,
Jun 2, 2016, 6:48:37 PM6/2/16
to ns-3-users
Hi,

please read the posting guidelines.

T.
Reply all
Reply to author
Forward
0 new messages