Obviously, OLSR needs some mechanism to detect neighbors and
the state of the communication lines to them. HELLO messages
are emitted on a regular interval for
this purpose. A very simplified version of a neighbor discovery
session using HELLO messages, is displayed in
figure 3.9.
A first sends an empty HELLO message. B receives this
message and registers A as an asymmetric neighbor
due to the fact that B can not find its own
address in the HELLO message. B then sends
a HELLO declaring A as an asymmetric neighbor.
When A receives this message it finds
its own address in it and therefore sets B
as a symmetric neighbor. This time A
includes B in the HELLO it sends, and B
registeres A as a symmetric neighbor upon reception
of the HELLO message.
But HELLO messages serves other purposes as well. They are generated and transmitted to all one-hop neighbors to achieve link-sensing, neighbor-sensing, two-hop neighbor-sensing and MPR selector sensing.
In HELLO messages nodes transmit information about all known links and neighbors. The types of the neighbors are also declared. This includes declaring what MPRs the node has selected. Registered links and neighbors are grouped by the link and neighbor type to optimize byte usage. It is very important to note that HELLO messages are generated on a per interface basis. This is because HELLO messages are used for link sensing, which requires the use of possible non-main-addresses.
The format of the HELLO message can be seen in fig 3.10. This message is included as the body part of an OLSR-message in an OLSR packet as seen in fig 3.1. The 8 byte link-code contains both info about the link to the neighbor and the type of the neighbor. The link type describes the state of the link and the neighbor type describes the state of the neighbor including MPR information. Note that a link can be set as asymmetric while the neighbor is still set as symmetric, if multiple links to the neighbor exists. The 8 bit link code data is ordered as displayed in figure 3.11.