MASIMUM
Home > Software > UM-OLSR > Using

Using


UM-OLSR can be used like any other routing agent in ns2, so you can use node-config command to attach our routing agent to the mobile nodes which are to be created:

$ns_ node-config -adhocRouting OLSR

After creating your mobile nodes, now you can configure each UM-OLSR routing agent individually or all at once. But first we'll see the configuration options of UM-OLSR:
  • debug_ : Print debugging messages on stdout
  • use_mac_ : Enable link-layer feedback
  • willingness_ : Set the willingness for forwarding data packets on behalf of other nodes
  • hello_ival_ : Set the interval of HELLO messages transmission
  • tc_ival_ : Set the interval of TC messages transmission
  • mid_ival_ : Set the interval of MID messages transmission. This has no actual effect in the simulations, since multiple interfaces are not supported
To configure all agents, put sentences like these:

Agent/OLSR set debug_ true
Agent/OLSR set hello_ival_ 3

To configure a single agent:

set ra [$mobilenode agent 255]
$ra set use_mac_ true
$ra set tc_ival_ 6

These are the default values of every option:
  • debug_ : false
  • use_mac_ : false
  • willingness_ : WILL_DEFAULT (3)
  • hello_ival_ : 2
  • tc_ival_ : 5
  • mid_ival_ : 5
By default, every UM-OLSR packet may piggyback up to 4 OLSR messages. You can change this value by redefining OLSR_MAX_MSGS constant and recompiling the simulator. For the simulation results, the length of IPv4 addresses are used by default. If you prefer the length of IPv6 addresses, define OLSR_IPv6 and compile again.

Once you have performed your simulations, you get a trace file where you can see what happened during the execution. Let's see with some examples the format of the traces generated by UM-OLSR. Following examples use the classic notation of ns2 trace files. However, tagged and new trace formats are also supported.

s 21.537326976 _0_ RTR  --- 98 OLSR 56 [0 0 0 0] ------- [0:255 -1:255 32 0] [1 12 [HELLO 0 0 12]]

The line above indicates that node 0 is sending an OLSR packet (size of 56 bytes) with a HELLO message. Specific information about the OLSR packet is by the end of the line (inside the final brackets): number of messages contained, packet sequence number, and the list of OLSR messages. Then we have information of the message: type, originator address, hop count and message sequence number.

r 13.833447485 _2_ RTR  --- 45 OLSR 84 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] [2 10 [HELLO 1 0 10][TC 1 0 11]]

This example shows the piggybacking of two messages, a HELLO and a TC.