help on multi-hop OLSR routing

817 views
Skip to first unread message

jagadeesh B

unread,
Apr 17, 2012, 6:36:43 PM4/17/12
to ns-3-...@googlegroups.com
Hi ns3-users,

I am trying to simulate a Adhoc network with 7 nodes separated by a fixed distance. I would like to vary the number of hops between sender and receiver
and observe the throughput. I have used OLSR routing protocol but the number of hops is not changing even I increased the distance
between nodes to a larger value.

I have attached my code for reference. I would really appreciate if anybody could help me on this issue.

Thanks,
Jagadeesh
Adhoc3.cc

Konstantinos

unread,
Apr 18, 2012, 6:52:08 AM4/18/12
to ns-3-...@googlegroups.com
Hi,

If you want to use OLSR you have to give it some time to converge (build up the routing table). In addition, for a fixed topology, OLSR will always give you the same number of hops (minimum).

I would recommend to have a fixed topology (for example a standard grid or just a line) and change the source node keeping the destination the same (e.g. at one corner of the topology).
Changing the distance as you say might have an impact on the throughput (due to transmission delays etc).

jagadeesh B

unread,
Apr 18, 2012, 2:59:06 PM4/18/12
to ns-3-...@googlegroups.com
Hi Konstantinos,

Thanks a lot for the help.

I have configured like you said and since OLSR randomly updates the routing table based on distance, I got a maximum of only 2 hops to reach the destination. My requirement is to vary the number of hops from 1 to 10 and observe the throughput. I think static routing will be helpful for this. Do you know any examples using static routing?

Thanks again for the reply.

Regards,
Jagadeesh

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/p_uaFWIYvg4J.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.

Konstantinos

unread,
Apr 18, 2012, 4:43:04 PM4/18/12
to ns-3-...@googlegroups.com
Even with OLSR you can have e.g. 10 hops.

Take for example a scenario with 11 nodes all in one line, the comm. range is 300m and

(n1) --- 200m -- (n2) --- 200m -- (n3) --- 200m -- (n4) .... (n11)

Set the sink node n1 and change the source node at each example from n2 to n11 (or vice versa). Thus, you will achieve 1-10 hop.
However, keep all the nodes in every scenario so as to keep the background traffic (from OLSR) the same for comparison reasons.

For examples you can find in the /examples folder


On Wednesday, 18 April 2012 19:59:06 UTC+1, Griffinz wrote:
Hi Konstantinos,

Thanks a lot for the help.

I have configured like you said and since OLSR randomly updates the routing table based on distance, I got a maximum of only 2 hops to reach the destination. My requirement is to vary the number of hops from 1 to 10 and observe the throughput. I think static routing will be helpful for this. Do you know any examples using static routing?

Thanks again for the reply.

Regards,
Jagadeesh

On Wed, Apr 18, 2012 at 5:52 AM, Konstantinos  wrote:
Hi,

If you want to use OLSR you have to give it some time to converge (build up the routing table). In addition, for a fixed topology, OLSR will always give you the same number of hops (minimum).

I would recommend to have a fixed topology (for example a standard grid or just a line) and change the source node keeping the destination the same (e.g. at one corner of the topology).
Changing the distance as you say might have an impact on the throughput (due to transmission delays etc).



On Tuesday, April 17, 2012 11:36:43 PM UTC+1, Griffinz wrote:
Hi ns3-users,

I am trying to simulate a Adhoc network with 7 nodes separated by a fixed distance. I would like to vary the number of hops between sender and receiver
and observe the throughput. I have used OLSR routing protocol but the number of hops is not changing even I increased the distance
between nodes to a larger value.

I have attached my code for reference. I would really appreciate if anybody could help me on this issue.

Thanks,
Jagadeesh

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/p_uaFWIYvg4J.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+unsubscribe@googlegroups.com.

jagadeesh B

unread,
Apr 21, 2012, 3:59:33 PM4/21/12
to ns-3-...@googlegroups.com
Konstantinos,

I really appreciate your help. 

With one hop, I have determined the communication range 250m but when I increased the node count, I am not able to get the multi-hopping working. I am getting the throughput always 0. My application starts at 32 seconds giving time to build the routing table and also I changed the position of source node for every 1 second keeping all other nodes position constant. I am stuck at this and still I couldn't figure out the issue why multi-hopping is not working in my code. 

I would really appreciate if you could help me on this. Thanks

Regards,
Jagadeesh

To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/h825xEjQMdcJ.

To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
Adhoc.cc

Sindhuja Kasam

unread,
Jun 6, 2014, 3:07:52 AM6/6/14
to ns-3-...@googlegroups.com
Konstantinos,

I am trying to plot throughput vs pathlength in hop to hop string topology. when i use "for loop" i am getting some error. I will be glad to recieve help from you. I am attaching my code here.
Jagadeesh

To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
Adhoc3.cc

Konstantinos

unread,
Jun 6, 2014, 6:57:57 AM6/6/14
to ns-3-...@googlegroups.com
Please do not post in such an old thread if you have a different question. 

Your problem is simply that you do not close the for loop 'correctly' (in the right place). In the for loop you only want the applications not the Run() & FlowMonitor configuration.
Also, I would suggest two changes in the start time of your apps. (a) you need to start them after some time, not at t=0, since you have OLSR with needs some time to converge and (b) give them some time differentiation, e.g. app1 starts at t=t1, app2 starts at t=t2. The reason for that is the deterministic backoff procedure of ARP which will cause some unexpected results. See the manual for further explanations. 

Sindhuja Kasam

unread,
Jun 9, 2014, 1:13:01 AM6/9/14
to ns-3-...@googlegroups.com
hi Konstantinos,

your suggestion is really helpful. as it is hop to hop communication it is giving me throughput for individual hops. for suppose i consider 3 nodes, code gives me throughput for 1-2, 2-3, 2-1 and 3-2. path length for each is constant(i.e distance between nodes)... now how do i proceed further?
Also if i increase the distance between the nodes, i am getting throughput as 0..at present i am using 25 as distance..
thanks in advance.

dugd...@gmail.com

unread,
Dec 8, 2014, 4:10:55 PM12/8/14
to ns-3-...@googlegroups.com
Hi,

I have also faced with that problem, when building n*n grid ad-hoc topology with OLSR. The nodes' routing tables could not be updated with entries more than 2 hops away.
A workaround I have found is this - to change the value of OLSR "HelloInterval" from default 2 to 1 second - "olsr.Set("HelloInterval", TimeValue(Seconds(1)));"
After this, the nodes could see each other on much more farther hop distances. Actually, it is quite hard to say why is it happening, I guess, it is due to underlying Wi-Fi Ad-Hoc implementation.
I will be glad, if anybody has an explanation why the HelloInterval affects the OLSR routing process in such a way.

Regards,
Dmitrii

Tommaso Pecorella

unread,
Dec 8, 2014, 4:52:47 PM12/8/14
to ns-3-...@googlegroups.com
Hi,

it may depend on your network density and/or on the error probability.

Increasing the HELLO frequency will negatively affect the network overhead, and may cause congestion. However, you will have a greater probability to receive an HELLO in the same amount of time.
As far as I understand the tuple lifetime in a node is directly proportional to the HELLO frequency, so increasing it shouldn't have any effect.  However I'm not an OLSR expert, so I could be wrong.
I'd start by checking the receive probability of the nodes in your topology, and see if you have large losses.
Also, I'd check the tuple timeout. I.e., if the nodes are actually building the n-hop away tables and they're just deleting them too fast.

Hope this helps,

T.

Konstantinos

unread,
Dec 8, 2014, 5:54:53 PM12/8/14
to ns-3-...@googlegroups.com
Just a couple of questions on this that would also help clear some things:
For how long are you running your scenario? If it is just for 5 secs, then with 2sec interval, only 2 hops could be discovered, and with 1sec 5.
What is the 'n'? What is the 'expected' communication range in your scenario.

As Tommaso said, if you decrease the interval, then you impose more traffic on the network and potentially you increase congestion.

dugd...@gmail.com

unread,
Dec 9, 2014, 3:13:20 PM12/9/14
to ns-3-...@googlegroups.com
Hi,

@Konstantinos.
Simulation runs for 60 seconds. Topology is static n*n grid with n = (8, 10, 25), so the net size is (64, 100, 625). A hop (link) length is 100 m.
With 2 seconds "HelloInterval", not a single node could find a route more than 2 hops away. With 1 second interval - each node has routes to all possible destinations through selected MPRs like it's supposed to be.
Empirically, I have noticed, that with HelloInterval around 1.6 seconds, you become to see how the route tables start getting 'underflowed'. And it depends from net size and simulation time (the less net size and the greater time - the less underflow).
However, with 2 seconds HelloInterval, I tried increasing simulation time up to 240 seconds - the same result. I guess, in such case, the simulation time should be much more bigger, but this creates some inconveniences.

@Tommaso.
It definitely makes sense to check the receive probability and tuple lifetime. Will certainly do it, thanks for advice.
However, I must add, that with the same network configuration (i.e., with the same receive probability), I have tested AODV, DSDV and DSR, and did not have such "hop count" problems.

Regards,
Dmitrii.
Reply all
Reply to author
Forward
0 new messages