NS3 GPSR for ns2mobility

77 views
Skip to first unread message

Urvik Upadhyay

unread,
Apr 16, 2014, 3:36:51 AM4/16/14
to ns-3-...@googlegroups.com
This may be a repeat post but I want some help regarding GPSR repository. I want to know how we've to pass position of sender and receiver nodes if we're using ns2mobility helper class? In all the examples given, the position is passed.

But when I'm using a piece of code which runs perfectly for aodv in the same repository, it gives ns3 assert error that deserialze() method is trying to read beyond the buffer values. I also went through the gpsr-packet.cc and compared it with apdv-packet.cc. What I found is gpsr needs position of nodes and I believe that's the problem with my program. So any kind of help is appreciated. :)

Konstantinos

unread,
Apr 16, 2014, 5:04:42 AM4/16/14
to ns-3-...@googlegroups.com
HI,

On Wednesday, April 16, 2014 8:36:51 AM UTC+1, Urvik Upadhyay wrote:
This may be a repeat post but I want some help regarding GPSR repository. I want to know how we've to pass position of sender and receiver nodes if we're using ns2mobility helper class? In all the examples given, the position is passed.
 

What do you mean you want to pass the position of the sender/receiver? Where do you want to pass it? If the ns2mobiltiy helper is used properly, then there is no difference between that and any other mobility model in ns-3. 
Which examples do you mean?
 
But when I'm using a piece of code which runs perfectly for aodv in the same repository, it gives ns3 assert error that deserialze() method is trying to read beyond the buffer values. I also went through the gpsr-packet.cc and compared it with apdv-packet.cc. What I found is gpsr needs position of nodes and I believe that's the problem with my program. So any kind of help is appreciated. :)

Can you post that piece of code here and the mobility-trace file you are using? Also, in order to use GPSR properly, STUDY and UNDERSTAND every line of code in the examples of GPSR! 

Urvik Upadhyay

unread,
Apr 16, 2014, 11:22:19 AM4/16/14
to ns-3-...@googlegroups.com

Hello again konstantinos!! I solved that problem. The problem was, I used gpsr.install() before internet.setRoutingHelper(gpsr). Guees what helped? this!! :)
Anyway now I'm also facing the same problem-the flow monitor. I'm attaching my code here. Kindly have a look at it. I'm sending 50 packets and out of 50, 42 are received( I' used a log to keep track of it. I've also attached the output file here.) But the flows are horribley wrong.
The flows are strange very difficult to understand. How to get the flow monitor results correctly? I want to calculate PDR, Throughput and E2EDelay.

Urvik Upadhyay

unread,
Apr 16, 2014, 11:28:32 AM4/16/14
to ns-3-...@googlegroups.com

forgot to attach the files!! Here they are 
Well I'm facing some issue in uploading the output file. So I'm just pasting the output here. It doesn't look good, but.. well..
OUTPUT:

Testing 50 packets sent
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Received One packet!
Flow 1 (10.1.1.21 -> 10.1.1.255)
  Tx Bytes:   11781
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 119
recived packets: 0
 Lost Packets: 11
Flow 3 (10.1.1.15 -> 10.1.1.255)
  Tx Bytes:   12177
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 123
recived packets: 0
 Lost Packets: 11
Flow 5 (10.1.1.8 -> 10.1.1.255)
  Tx Bytes:   12078
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 122
recived packets: 0
 Lost Packets: 11
Flow 7 (10.1.1.20 -> 10.1.1.255)
  Tx Bytes:   11781
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 119
recived packets: 0
 Lost Packets: 11
Flow 9 (10.1.1.23 -> 10.1.1.255)
  Tx Bytes:   12375
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 125
recived packets: 0
 Lost Packets: 12
Flow 11 (10.1.1.9 -> 10.1.1.255)
  Tx Bytes:   11979
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 121
recived packets: 0
 Lost Packets: 11
Flow 13 (10.1.1.29 -> 10.1.1.255)
  Tx Bytes:   11583
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 117
recived packets: 0
 Lost Packets: 11
Flow 14 (10.1.1.11 -> 10.1.1.255)
  Tx Bytes:   12276
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 124
recived packets: 0
 Lost Packets: 11
Flow 17 (10.1.1.22 -> 10.1.1.255)
  Tx Bytes:   11682
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 118
recived packets: 0
 Lost Packets: 11
Flow 19 (10.1.1.18 -> 10.1.1.255)
  Tx Bytes:   12078
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 122
recived packets: 0
 Lost Packets: 11
Flow 21 (10.1.1.13 -> 10.1.1.255)
  Tx Bytes:   11979
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 121
recived packets: 0
 Lost Packets: 11
Flow 23 (10.1.1.16 -> 10.1.1.255)
  Tx Bytes:   12078
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 122
recived packets: 0
 Lost Packets: 11
Flow 25 (10.1.1.26 -> 10.1.1.255)
  Tx Bytes:   12276
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 124
recived packets: 0
 Lost Packets: 11
Flow 27 (10.1.1.10 -> 10.1.1.255)
  Tx Bytes:   11979
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 121
recived packets: 0
 Lost Packets: 11
Flow 29 (10.1.1.24 -> 10.1.1.255)
  Tx Bytes:   11583
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 117
recived packets: 0
 Lost Packets: 11
Flow 31 (10.1.1.6 -> 10.1.1.255)
  Tx Bytes:   11781
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 119
recived packets: 0
 Lost Packets: 11
Flow 33 (10.1.1.25 -> 10.1.1.255)
  Tx Bytes:   11979
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 121
recived packets: 0
 Lost Packets: 11
Flow 35 (10.1.1.5 -> 10.1.1.255)
  Tx Bytes:   11187
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 113
recived packets: 0
 Lost Packets: 10
Flow 37 (10.1.1.27 -> 10.1.1.255)
  Tx Bytes:   11583
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 117
recived packets: 0
 Lost Packets: 11
Flow 39 (10.1.1.7 -> 10.1.1.255)
  Tx Bytes:   12276
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 124
recived packets: 0
 Lost Packets: 11
Flow 41 (10.1.1.30 -> 10.1.1.255)
  Tx Bytes:   12276
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 124
recived packets: 0
 Lost Packets: 11
Flow 43 (10.1.1.12 -> 10.1.1.255)
  Tx Bytes:   12375
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 125
recived packets: 0
 Lost Packets: 12
Flow 45 (10.1.1.1 -> 10.1.1.255)
  Tx Bytes:   11979
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 121
recived packets: 0
 Lost Packets: 11
Flow 47 (10.1.1.2 -> 10.1.1.255)
  Tx Bytes:   11880
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 120
recived packets: 0
 Lost Packets: 11
Flow 49 (10.1.1.14 -> 10.1.1.255)
  Tx Bytes:   12078
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 122
recived packets: 0
 Lost Packets: 11
Flow 51 (10.1.1.19 -> 10.1.1.255)
  Tx Bytes:   11781
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 119
recived packets: 0
 Lost Packets: 11
Flow 53 (10.1.1.28 -> 10.1.1.255)
  Tx Bytes:   11880
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 120
recived packets: 0
 Lost Packets: 11
Flow 55 (10.1.1.3 -> 10.1.1.255)
  Tx Bytes:   11880
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 120
recived packets: 0
 Lost Packets: 11
Flow 57 (10.1.1.4 -> 10.1.1.255)
  Tx Bytes:   11880
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 120
recived packets: 0
 Lost Packets: 11
Flow 59 (10.1.1.17 -> 10.1.1.255)
  Tx Bytes:   11286
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 114
recived packets: 0
 Lost Packets: 11
Flow 61 (10.1.1.12 -> 10.1.1.27)
  Tx Bytes:   39816
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 36
recived packets: 0
 Lost Packets: 38
Flow 63 (10.1.1.12 -> 10.1.1.27)
  Tx Bytes:   1106
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 1
recived packets: 0
 Lost Packets: 1
Flow 64 (10.1.1.12 -> 10.1.1.27)
  Tx Bytes:   1106
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 1
recived packets: 0
 Lost Packets: 1
Flow 65 (10.1.1.12 -> 10.1.1.27)
  Tx Bytes:   1106
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 1
recived packets: 0
 Lost Packets: 1
Flow 66 (10.1.1.12 -> 10.1.1.27)
  Tx Bytes:   1106
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 1
recived packets: 0
 Lost Packets: 1
Flow 67 (10.1.1.12 -> 10.1.1.27)
  Tx Bytes:   1106
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 1
recived packets: 0
 Lost Packets: 1
Flow 68 (10.1.1.12 -> 10.1.1.27)
  Tx Bytes:   7742
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 7
recived packets: 0
 Lost Packets: 7
Flow 69 (10.1.1.12 -> 10.1.1.27)
  Tx Bytes:   1106
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 1
recived packets: 0
 Lost Packets: 1
Flow 70 (10.1.1.12 -> 10.1.1.27)
  Tx Bytes:   1106
  Rx Bytes:   0
  Throughput: -0 Kbps
transmitted packets: 1
recived packets: 0
 Lost Packets: 1

new30.cc

Konstantinos

unread,
Apr 16, 2014, 12:29:35 PM4/16/14
to ns-3-...@googlegroups.com
First of all, if you read that post more carefully you would see that there was a discussion about FlowMonitor and that packets are not tracked.
Probably, it was not fixed, hence you need to use other methods of calculating your statistics (look at the statistics module)

In addition, the broadcast flows (those with destination 10.1.1.255) are not to be monitored by flowmonitor. This has been 'fixed' (flows are not shown) in the svn tree.

Finally, I do not understand why you get so many flows with the same src/dst. It should not happen if the ports are the same. 

Urvik Upadhyay

unread,
Apr 16, 2014, 12:35:26 PM4/16/14
to ns-3-...@googlegroups.com


On Wednesday, 16 April 2014 21:59:35 UTC+5:30, Konstantinos wrote:
First of all, if you read that post more carefully you would see that there was a discussion about FlowMonitor and that packets are not tracked.
Probably, it was not fixed, hence you need to use other methods of calculating your statistics (look at the statistics module)

I was going through that thread and I read that it's a flow monitor issue. As it considers a packet to dropped for Loopback. Statistics module. Can you suggest me some good tutorial to start with? It would be a great help!!

In addition, the broadcast flows (those with destination 10.1.1.255) are not to be monitored by flowmonitor. This has been 'fixed' (flows are not shown) in the svn tree.

Okay I'll do svn update
Finally, I do not understand why you get so many flows with the same src/dst. It should not happen if the ports are the same.
Even I'm not getting why such multiple flows are generated. Port is same. And this is not the case in AODV.
 

Konstantinos

unread,
Apr 16, 2014, 12:40:25 PM4/16/14
to ns-3-...@googlegroups.com
You can find an example in /examples/stats 

Urvik Upadhyay

unread,
Apr 16, 2014, 12:52:31 PM4/16/14
to ns-3-...@googlegroups.com
I was going through the same example. When I tried to run it after copying both wifi-example-sim.cc and wifi-example-apps.h, I got some errors. Strange.
Reply all
Reply to author
Forward
0 new messages