Sunteți pe pagina 1din 4

Implementation of a new Algorithm for MPR selection in an OLSR protocol

based Wireless Mesh Network


Prashanth Gopinath, Srikanth Subramanian and Janani Swaminathan
Department of Electrical and Computer Engineering,
University of Florida

Abstract information for all links between any two nodes inside
the same network.
In this project we aim to implement a new algorithm for  Routing table calculation. Based on TC messages
the selection of Multi Point Relays (MPRs) in the OLSR received from other nodes, a node is able to compute
protocol. This would involve detailed background study its shortest-path routes to all reachable nodes in the
about wireless mesh networks and the OLSR protocol.
network, by using an algorithm similar to the
Further we will describe the proposed algorithm to
update the MPR tables maintained by the OLSR Dijkstra‟s algorithm. The shortest-path in terms of the
protocol and the procedure for implementing this on a number of hops is used for route calculation in OLSR.
router. We also aim to provide a comparison between
the performance of two networks, one running on Furthermore, two other messages are defined in OLSR, i.e.
conventional OLSR and the other with the modified Multiple Interface Declaration (MID), and Host and
OLSR. Network Association (HNA). MID messages are used when
a node is equipped with multiple interfaces, i.e. multiple
1. Introduction
wired or wireless cards. However, only one interface is
selected as the ID (main address) of the node. HNA
OLSR protocol (Optimized Link State Routing Protocol) is
messages are used when a node functions as a gateway
a classic table driven, proactive protocol that works
node, and it is especially useful when an ad hoc network is
efficiently. The routing strategy of OLSR protocol is
connected to the Internet. Gateway here means the nodes
similar to traditional routing protocols. Each node
which provide connectivity between an ad-hoc and external
broadcasts control packets periodically, exchanges nodes‟
networks, e.g. the Internet.
information and discovers routes proactively and
independently. Compared with the classical flooding
OLSR maintains the following set of tables:
mechanism, OLSR protocol reduces routing overhead with
the help of its key concept – MPR (Multi Point Relay). Tables Details
Each node in the network selects part of its symmetric Neighbor table State of neighbors
neighbors as MPR with MPR selection algorithm. Only 2 Hop Neighbor table State of 2 hop neighbors
MPRs are allowed to diffuse topology information. An MPR table Information about MPR of
optimization is achieved by minimizing the number of own node
control messages flooded in the network. MPR also reduces MPR selector table Neighboring nodes which
the size of the topology control message by reporting links select this node as their
MPR
between itself and its MPR selectors instead of links to all
Topology table Information acquired from
symmetric neighbors. TC messages received
Routing table Routing information
OLSR operates in three main steps: Duplicate table Information about most
 Neighbor sensing. This is achieved by exchanging recently received messages
HELLO messages between all one-hop neighbors in a
network. Through periodic HELLO messages received
from its one-hop neighbors, a node is able to select its 2. Proposed Modification
MPRs. Then a link state database and a neighborhood
database are established by each node based on The existing MPR tables can be optimized by using this
neighbor sensing. algorithm that generates a reduced set of MPRs which
 TC messages dissemination. Each node, through its result in reduced overhead in the network when link state
MPRs, periodically advertises its link information to information is transmitted to all the nodes in the network.
all other nodes inside the network. As a consequence,
all nodes inside a network have necessary topology The existing method of selecting MPRs is based on Greedy
Algorithm. Its step could be stated as follows.
 Step 1: Select all one hop neighbors that could provide reach-ability to some nodes in the set of second
the only reach ability to some two hop neighbors as hop neighbors, select these nodes as MPRs. Then
MPRs. delete all two hop neighbors that are covered by
 Step 2: If there are still some two hop neighbors that these nodes from N2(x). Now if there is no node
are not covered by MPR, select that one hop neighbor in N2(x) then stop else go to step 3
which covers the most uncovered two hop neighbors  Step 3: Recalculate D(x,y) for all nodes in N(x)
as MPR. Now repeat this step until all two hop and choose the nodes with the minimal degree. If
neighbors are covered by MPRs. there is only one node with minimal degree delete
it from N(x) and recalculate D(x,y) for all nodes
Fig.1 below is an example of selecting MPRs using the in N2(x) and go to step 2, else using rule I break
above heuristic. As shown in the figure the one hop the tie and delete the selected node from N(x).
neighbor set of A includes the nods {B C D E F} while Now again recalculate D(x,y) for all nodes in
MPR set of A is {B C D}. N2(x) and go to step 2.

Where N(x) is the set of first hop neighbors for node x,


N2(x) is the set of second hop neighbors for node x
excluding any node already in N(x). D(x,y) is the degree of
node x‟s one hop neighbor y. This is the number of nodes
in N2(x) that are covered by y. All these sets can change
during the course of selection of MPRs.

Rule I:

If D(x,y1) = D(x,y2) then for yi(i ɛ {1,2})

 Step 1: Find all nodes in N2(x) that are covered


by yi.
 Step 2: Find all nodes in N(x) that could cover
any of the two hop neighbors found in step 1.
 Step 3: Calculate the number of two hop
neighbors in N2(x) covered by the one hop
neighbors found in step 2.
 Step 4: Select that node which has a bigger
It is obvious that {B C D} is not the MPR set of minimal number as a result in step 3.
size. It is easily seen that we require only the two nodes {C
D} to cover all two hop neighbors. The Greedy algorithm 3. Related Work
cannot select the optimal MPR set {C D} as the algorithm
OpenWRT: Setting up a build environment
uses cover ability as the heuristic. However there occurs an
overlap as the nodes covered by B are also covered by C.
OpenWRT is a Linux based firmware program which is
This limitation of the Greedy algorithm not being able to
used to customize embedded devices and residential
always arrive at the optimal solution is addressed by the
gateways. OpenWRT is the platform being used on the
Necessity First Algorithm(NFA).
netgear WGT634u routers. The website www.qcsmesh.com
provides step by step instructions of how to create a „build
The NFA decreases the number of MPRs significantly. Its
environment‟ that provides a platform for one to add
description is as follows.
additional packages to the already existing basic packages
The NFA chooses from a different angle trying to that OpenWRT provides. This freedom of customization
overcome the problem of Greedy Algorithm. NFA is based allows one to use a device in ways never envisioned. The
on “necessity of selecting” unlike GA which is based on QCS Mesh routers in essence have their wireless 802.11
cover ability. According to this basis, protocols used in the netgear routers replaced with OLSR
protocol. This enables them to be a part of an ad-hoc mesh
 Step 1: Calculate N(x), N2(x), D(x,y) for all network where one of the routers acts as a gateway. This
nodes in N(x). makes it possible to extend a physically constrained
 Step 2: If there are any nodes in the set of one network connection, eg. an internet gateway, over to a
hop neighbors who are the only nodes providing larger area thus providing extensive connectivity.
To compile customized OpenWRT firmware, a build The OLSR protocol: An Overview of the code
environment has to be setup. This process involves
installing the OpenWRT toolchain, necessary to build a The Olsrd package provided by www.olsr.org contains the
OpenWRT image and packages that can be later installed C code of the OLSR algorithm that needs to be modified.
on the netgear device, on a host unix system. Upon The OLSR daemon provided by olsr.org is an
completion of the installation, the particular build of implementation of the Optimized Link State Routing
OpenWRT can be configured by using the configure menu. protocol. It provides for routing of mobile ad-hoc networks
Later additional packages can be added depending on and is driven by a technique called multipoint relaying.
customization desired. In this particular case, the olsrd Olsrd is a well structured and well coded implementation
package is installed and the image file is compiled by using that is easy to maintain, expand and port to other platforms.
the „make‟ command. This file can be then flashed on to The implementation is RFC3626 compliant with respect to
the device using either of the steps mentioned below. both core and auxiliary functioning. Olsrd supports use of
loadable plug-ins. These can be used to handle and generate
Configuring a router to be a part of a mesh network custom packet types that can be carried by olsr‟s MPR
flooding scheme or any other desired functioning. Olsrd is
This process involves setting up a connection between the an ongoing open source project. Olsrd is on layer 3 and is
router and the computer with OpenWRT. This is achieved highly portable. It can run on a variety of platforms which
using a serial console built using a RS232 complaint cable include Windows, Linux, OS X, VxWorks, NetBSD,
a MAX3232 IC for level conversion of voltage between the FreeBSD, OpenBSD etc.
two. The whole console is comprised of a MAX3232
converter pcb with a serial input and serial output The entire Olsrd package consists of approximately over
connection. This is connected to the pc using a usb to rs232 ninety source and header files. The selection of MPRs is
serial cable adapter. The other end of the max3232 ic is governed by a set of around 20 source and header files that
connected to the serial port of the netgear wgt634u router. contain the definition of all different functions, procedures
This method is one of the two methods available for and class definitions that are used to store topology
flashing images onto the device. The schematic for the information in the form of a number of tables as mentioned
max3232 pcb package is as shown in fig.2. in previous sections. The olsr.c file contains function
definitions which process changes when there are any
The other method that is easier, faster and generally used updates in the neighborhood and/or topology. It re-
more often is the direct update of the firmware by writing it calculates the topology and calls the corresponding
on the device by connecting to it through a standard functions to update the routing tables. Routing table entries
Ethernet cable. This does not require a serial to a usb consist of calculating initial values of the tables, initial
converter (in case the computer has a serial port, we would selection of the MPR set and other calculations.
still need level conversion). But this method can be used olsr_protocol.h contains values and packet formats as
only in the case of flashing precompiled packages available proposed in RFC3626 and miscellaneous values and data
on the OpenWRT website. structures used by the olsr.org olsr daemon. The central
focus of this particular modification would revolve around
the following few files.
olsr_spf.c: This part of the code calculates and assigns a
„cost function‟ for each node in the topology. Initially all Wireless Communications, Networking and Mobile
nodes are initialized to infinite cost. First the heap of Computing 2008, WiCom ‟08, Oct 2008.
reachable nodes is collected. The heap implementation is
based on an AVL tree which provides interesting [3] Dang Nguyen and Pascale Minet, “Analysis of MPR
performance characteristics for the frequent operations of selection in the OLSR protocol”, 21st International
minimum key extraction and re-keying. Next all neighbors Conference on Advanced Information Networking and
are explored and put on the heap if the cost of reaching Application Workshops (AINAW‟07), 2007.
them is better than the current candidate node. The SPF
(Shortest Path First) calculation is terminated if there are no [4] Frank Y. Li, Lorenzo Vandoni, Giampietro Zicca, and
more nodes on the heap. Stefano Zanoli, “OLSR Mesh Network for Broadband
mpr.c : This file consists of code which is used to select 2 Access: Enhancements, Implementation and Deployment”,
hop neighbors based on the cost and willingness of the 4th IEEE International Conference on Circuits and Systems
node. The willingness of a node is determined based on the for Communication, 2008. ICCSC 2008. May 2008.
power status of the node. This calculation is based on the
[5] Mounir Frikha, and Manel Maamer, “Implementation
greedy algorithm. The 2 hop neighbor table is used for the
and Simulation of OLSR protocol with QoS in Ad Hoc
mpr table updation. This is generated by the code in
Networks”, Higher School of Communication of Tunis,
2_hop_neighbor_table.c.
Network Department.
olsr_cfg.h : This file defines default values for the
parameters used in the olsr_cfg.c file which haven‟t been [6] http://openwrt.org/
initialized to any particular value.
[7] http://www.olsr.org/
The above files are the ones we aim to modify in order to
produce a difference in the mpr selection table entries. [8] www.members.shaw.ca/swstuff/wgt634u.html

4. Anticipated Results [9] http://qcsmesh.com/twiki/bin/view/QCSMesh/WebHome

The OLSR protocol based on the new algorithm selects a


fewer number of MPRs while maintaining the connectivity
of every node to every one of its 2 Hop neighbors as per
protocol requirements. This is expected to be less than the
number of MPRs selected by the OLSR protocol employing
the greedy algorithm introduced in RFC 3626.

5. Conclusion and Future Work

Further work will include modifying the C code as


previously mentioned in the earlier sections to obtain
increased performance through decreased number of
MPRs. A comparison of the performance of the old and
modified OLSR also seems in order. Finally a wireless
mesh network consisting of nodes following the modified
OLSR protocol on netgear WGT634U routers will be
implemented.

6. References

[1] Yan Wen, Guo Wein and Liu Jun, “An Implementation
and Study of OLSR protocol in Linux OS”, 4th
International Conference on Wireless Communications,
Networking and Mobile Computing 2008, WiCom ‟08, Oct
2008.

[2] Zheng Li, Nenghai Yu, Zili Deng, “NFA: An Algorithm


to select MPRs in OLSR”, 4th International Conference on

S-ar putea să vă placă și