OLSR change Hellointerval (m_helloInterval)

96 views
Skip to first unread message

Matteo Danieletto

unread,
Aug 26, 2015, 6:39:30 PM8/26/15
to ns-3-users
Hi all,
for a few experiments I would like to change on the fly the HelloInterval paramter on OLSR protocol.


I modified the olsr-routing-protocol.cc in this way:

void RoutingProtocol::HelloTimerStop (Time helloInterval)
{

  m_helloTimer.Cancel();
  m_helloInterval = helloInterval;
  SendHello ();
  m_helloTimer.Schedule (m_helloInterval);
}


And I call the this function from the simulator.

First I did this:

std::vector<Ptr<olsr::RoutingProtocol> > olsr_vector;
for (ii=0; ii< n_nodes ;  ii++)
{
Ptr<Ipv4RoutingProtocol> prot = nodes.Get(ii)->GetObject<Ipv4>()->GetRoutingProtocol();
olsr_vector.push_back(DynamicCast<olsr::RoutingProtocol>(prot));
}

int intervalChange = 50;
Simulator::Schedule(Seconds(intervalChange),&changeValueOLSR,intervalChange,olsr_vector);

and when I need I call 

void changeValueOLSR(int intervalChange , std::vector<Ptr<olsr::RoutingProtocol> > olsr_vector)
{
std::cout << "TEST " <<Simulator::Now ().GetSeconds () << std::endl;
double HelloInterval_BAYES = 2.0;
  if(startMove == 1)
  {
HelloInterval_BAYES = 0.1; 
startMove = 0;
}
else
{
startMove = 1;
}


for(int ii=0; ii<9; ii++)
olsr_vector.at(ii)->HelloTimerStop(Seconds(HelloInterval_BAYES));                  
   
  
Simulator::Schedule(Seconds(intervalChange),&changeValueOLSR,intervalChange,olsr_vector);
}

The first thing I did was to see if I am changing  m_helloInterval value with the same value it was assigned what happen to the throughput?

So in my case if HelloInterval_BAYES=2.0 .
I found the there are some difference regarding the throughput when I changed the the m_helloInterval.
The throughput is higher when I don't change the parameter than when I change the parameter but with the same value.


Do you think is something happen when I stop the timer and maybe the routing table are thrown away?

Thank you
Matteo
 

Konstantinos

unread,
Aug 28, 2015, 10:51:12 AM8/28/15
to ns-3-users
Hi Matteo,

Please clarify a bit more and try to get statistically independent results (https://www.nsnam.org/docs/manual/html/random-variables.html#id1) especially when you have random mobility. The difference in the results may be caused by a different network graph due to the mobility.

Then, if you see the same trends, you can come back and explain clearly what you mean that there is a difference in throughput when you change the interval parameter; change it how? what was the original value and what is the new?
Generally, changing the hello interval has both positive and negative effects so you need to find the 'sweet point'.
You can have smaller interval, so you have a better view of the network graph, faster convergence, but on the other hand you have increased signalling that deteriorates throughput.  
Regards,
K.

Matteo Danieletto

unread,
Sep 1, 2015, 7:01:08 PM9/1/15
to ns-3-users
Hi Konstantinos,
yes you are right I have to explain a bit more my experiments.

- I tried to collect the throughput with 5 different run numbers (but same seed). 
- the topology is built with 9 nodes placed far from each other 80m
- how the nodes are placed
                       
                       F
                       |
                       |
                       G
                       |
                       |
A ------ B ------ C ------ D ------ E
                       |
                       |
                       H
                       |
                       |
                       J

During the experiment I am going to move these nodes to swap their positions:

1. (B,C) -> so B will stay in C position and C will stay in B position
2. (B,G)
3. (G,D)
4. (D,H)

and after the vice versa (other 4 movement). The speed is 2m/s.

The data traffic start at time 20s the first movement start after 50s start to move the first couple of nodes when their position are swapped the next movement is scheduled after 50s and so on until to do the all 8 movement .

The points are:
   - I tried to figure out the throughput without change the hello interval e.g. hello interval = x setup during olsr configuration
   - I tried to figure out the throughout chaining the hello interval but imposing the same hello interval = x when two nodes are starting to move

In my mind I thought that the two results were the same because when I changed the hello interval in the second kind of experiment it was the same time I configure the hello interval in the first kind of experiments.


Thank you
Matteo
Reply all
Reply to author
Forward
0 new messages