C6 AH N WI

eggplantcinnabarΚινητά – Ασύρματες Τεχνολογίες

21 Νοε 2013 (πριν από 3 χρόνια και 8 μήνες)

319 εμφανίσεις

C
HAPTER
6

A
D
H
OC

N
ETWORKS

AND

THE

W
IRELESS
I
NTERNET
*

Those of you who are Star Trek fans, or have ever watched any movie or TV
episode from this series, must have noticed total absence of wires in their
universe: crew member communicate by touching their
Starfleet badges,
doctors diagnose (and further more cure) patients simple by moving
sophisticated instruments (so called “tricorders”) over patients bodies. This
is science fiction no more


prepare for the wireless world.

In the last decade of the 20
th

c
entury, one of the hottest topics in
computing and communications has been wireless technology. It has
attracted many users, and has undergone numerous transformations,
including the introduction of wireless Internet. The next step in
the
evolution
of wire
less communication are Ad Hoc networks, which do not require any
other network infrastructure beside the already existing mobile nodes. In this
chapter we will cover basic
and some advanced
ideas
and concepts
of Ad
Hoc networking
.

And one last remark for a
ll Star Wars fans who might be reading this
chapter


although they can communicate, move objects and heal without
any devices in SW universe, that kind of wireless service
, better known as
the “force”
,

is still pure science fiction. Nevertheless, may the
force be with
you on this exciting voyage to the world of the wireless future.




*

Prepared by Nikola Milanovic (
nikol
a99@eunet.yu
) and Veljko
Milutinovic (vm@etf.bg.ac.yu).



256

Mastering E
-
Business Infrastructure

6
.1. Introduction


The focus of this chapter are Ad Hoc networks, that is, the establishment
of network communication without the preexisting network infrastructure.
Let’s take
a closer look at the contents. This chapter is divided into five
parts:



In the part about
mobile networks

we’ll consider ad
-
hoc networks as a
part of wider family of mobile networks, and then we’ll make the
distinction between the classic mobile networks a
nd Ad Hoc networks.



Next comes
routing in Ad Hoc networks.
Here we’ll explain the basic
routing problems in Ad Hoc networks and describe some of the existing
solutions in form of routing algorithms.



Security in Ad Hoc networks
is a very important considera
tion and
we’ll discuss some security issues of the Ad Hoc networks.



In the following part, some basic characteristics of the
Bluetooth
technology and environment will be given, because this well may be the
future platform for the Ad Hoc network implementat
ion.



At the end, a project of Ad Hoc multihop sensor network will be
presented, that was designed and realized at the School of Electrical
Engineering, University of Belgrade, during the course of the IEEE
Computer Society International Design Competition.

A five
-
member
student team (Aleksandar Radovanovic, Branislav Cukanovic,
Aleksandar Beric, Nenad Tesovic, Nikola Milanovic, and mentor
Gvozden Marinkovic) designed complete hw/sw infrastructure for Ad
Hoc multihop communication using the Bluetooth modules
. Following
components were designed: routing protocol, hardware routing card,
simulator, software for administration, sensor examples and much more.
Most important of all, whole team gained a precious experience working
with the Bluetooth technology, and
we’ll try to share those impressions
with you. It will be very interesting, useful and productive, since you
will learn firsthand experiences about this new and exciting technology.


6
.2. Mobile Networks


We will first talk about the evolution of network c
ommunications, that
is, how the Ad Hoc networks present the next evolutionary step in the
development of global communications.

Ad Hoc Networks and the
Wireless

Internet


257

We can distinguish between two types of Ad Hoc networks. These are
networks of mobile computers handled by users and wireless se
nsor
networks. The first group consists of laptop computers, cellular phones,
personal digital assistants and similar devices handled by user, while the
second group consists of autonomous electronic sensor devices.

As such, the basic characteristic of an
y Ad Hoc network is: establishing
the communication between hosts without any preexisting network
infrastructure needed.

It would be wise to pause here a little, and try to go get straight to the
core of the problem. What is an Ad Hoc network? We will giv
e you one
vivid example of what an Ad Hoc network might be. Keeping that in mind,
you’ll be able to follow the remaining part of this chapter much easier.

Assume that you are equipped with some sort of wireless communication
device, which has a limited ra
nge of 10m. Suppose that you want to send a
message from one office in the building to another, using that wireless
device. What are your options?

First, you can connect your device to the existing wire infrastructure, and
then use the existing network in
frastructure for transport. The drawbacks are
obvious: your mobility is very limited, and you are adding more load on the
already overloaded wire network. Not to mention that wire network
protocols are not suitable for wireless communication.

The second o
ption is to build a network of base stations that will enable
the cellular communication. That is better solution, but very expensive.

The third choice is to presume that many electronic devices around you
have the same capability of wireless communication

as you do, and then to
use them as switches. For example, the packet from my device hops to
mobile phone of the gentleman passing in the hall in front of my office, then
from his mobile phone to the shared laser printer standing in the next office,
then f
rom printer to someone’s digital wristwatch on the floor below, then
from the wristwatch to the coffee machine, and finally, from the coffee
machine to its destination, that is, to the another office in the building.




258

Mastering E
-
Business Infrastructure



Figure
6
.1:

Basic Ad Hoc network a
rchitecture.


Comment:

The message hops from one node to another. Every
node acts as a switch and has routing capabilities.


And this is exactly what you see on the figure

6
.1: the message hops
-
hops
-
hops from one node to another until it reaches the destin
ation node

Now, that you have a basic idea, what can be the benefits of such an
approach? We’ll name but a few, which are obvious (and leave the
drawbacks for now):



easy installation and upgrade



modest requirements for existing infrastructure



low cost and

maintenance



great flexibility

We have already said that Ad Hoc networks can be viewed as a new step
in the evolution of network communication. In order to understand them
better, let’s see from what have these networks evolved.

Fixed computer networks hav
e many good sides, such as: very detail and
elaborate concepts, mechanisms, and infrastructure; very long experience
that has been acquired in the past few decades; as such, they present useful
base for development of mobile networks.

But wireless communic
ation has its peculiarities. As we’ll see very soon,
simply using already developed solutions is not possible. However, as it is
always the case, in the beginning designers tried to employ as much
Ad Hoc Networks and the
Wireless

Internet


259

modifications and adaptations of existing mechanisms as the
y thought
possible. But it proved that this is not a good approach, and more and more
new ideas showed, relieved from the ballast of obsolete conceptions. Such
are the routing algorithms that we’ll soon describe.

Before we proceed directly to the core of
the Ad Hoc networks problem,
let us first discuss mobile networks as a whole, and then it will be easier to
see why the Ad Hoc networks deserve our special attention. So, let’s meet
the mobile family.

Not long ago, mobile networks were treated just as exte
nsions of fixed
networks. As such, in the mobile networking terminology, beside mobile
hosts, we have fixed hosts and base stations (or mobility support routers).

Do you already feel that something does not feel right here? In order for
mobile hosts to wo
rk, we need the huge support infrastructure, often more
complicated that the mobile hosts themselves. And while the notion of base
stations and fixed hosts is reasonable from the perspective of fixed networks,
what we need to do is try to let go of these c
oncepts. What we are trying, or
what we should be trying to do, is to build complementary, not dependent
infrastructure, that is, mobile networks should work together with fixed
networks, without being dependent of them. But for now, let’s see how a
classi
cal notion of the mobile network is working.

Mobile phones have entered our everyday life, so the concept of base
station is not foreign to you, and we will not waste much time here. Each
mobility support router (or base station) covers the area that is li
mited by its
range. That is how a cell is defined


the area covered by mobility support
router. It is used for the communication with mobile hosts that are currently
in its cell. In this architecture, mobile host can communicate only with the
mobility sup
port router. Mobile hosts can freely move from one cell to
another, falling under responsibility of another mobility support router.

At the following figure you can see how mobility support router
broadcasts to mobile hosts in its cell, and how a cell is
formed. Mobile hosts
1 and 2 are in range of mobility support router, while mobile host 3 is
unreachable.



260

Mastering E
-
Business Infrastructure



Figure
6
.2:


Cellular communication


Comment:

Each mobility support router covers the area limited by its
range


the cell. Mobile hosts can commun
icate with the
mobility support router only.


We can say that mobility support routers are bridges between wired
(or fixed) network and mobile hosts.

In figure
6
.3, we have an example of typical network topology. We
can see the fixed (or wired) part of th
e network (consisting of fixed hosts
FH1, FH2, FH3 and FH4), then there is mobility support router (MSR), and
two mobile hosts (MH1 and MH2) . What happens when one of the fixed
hosts wants to send a message to a mobile host?

Let’s assume that FH1 is sourc
e host, and MH2 is destination host. The
communication between the fixed host and the mobile host can be divided
into two parts:


Ad Hoc Networks and the
Wireless

Internet


261



Figure
6
.3:

Classic mobile network topology.


Comment:

FH1 is source, and MH2 is destination. The network
communication is

divided into two parts: over the fixed and
over the wireless part of the network.




The first part is standard communication inside fixed network, from the
originating fixed host to the mobility support router. You can see that the
message is being transfe
rred over the existing fixed network and
mobility support router is just another address in this network, that is,
nothing distinguishes it from the other fixed hosts. Off course, some of
the existing transport protocols is used for this part of communicat
ion
(for example, it can be TCP/IP).



Then the mobility support router broadcasts the message to all mobile
hosts in its cell, and the one that is being addressed receives the message.
This is the second part of communication


a wireless communication
betw
een mobility support router and mobile host.

So, while we are still here, let’s go through this once again, since it’s
essential to understand how this communication is performed, in order to
move on to the Ad Hoc networks. The network has two parts: fixe
d and
mobile (or wireless). The bridges between these parts are mobility support
routers. The communication is also divided into two phases: standard
communication between two fixed hosts, one of which is the originating host


262

Mastering E
-
Business Infrastructure

and the other is mobility supp
ort router (for example, using TCP/IP) and
wireless communication between the mobility support router and mobile
host.

Now that we understand this, we can explore this kind of communication
more deeply.

We have already said that this kind of wireless netwo
rks were designed
to be dependant on the existing wire (or fixed) infrastructure, which was
clearly visible on the figure
6
.3.

However, designers did not stop there: the general idea is to hide
mobility from the fixed hosts, that is, mediation of the mobi
lity support
router is entirely transparent to fixed host. The fixed host does not need to
know that it’s addressing a mobile host. For this purpose, indirect protocols
were developed with the purpose of hiding mobility from fixed hosts.



Figure
6
.4:


I
ndirect protocols


Comment:

Mediation of mobility support router is transparent. Fixed
part of the network is not aware that the addressed host is
mobile. Mobility support router hides mobility.

In that way, the message is delivered from the fixed host to

the
mobile host, with fixed host not even aware that the destination host is
mobile.


Let’s stop here for a moment. This is obviously wrong


why would
we try to hide mobility in something we call a mobile network? This is the
Ad Hoc Networks and the
Wireless

Internet


263

same old story repeating it
self over and over


we can’t just extend the
existing fixed networks with mobile hosts, and expect everything to be
perfect while using the transport protocols designed for wire communication.
And now we’ve come to the point


what is needed for the next
generation
of mobile networks is not only hardware, but new concepts and ideas, too


that is, the next generation of wireless routing protocols.

Now, let’s see what are the characteristics and limitations of this
type of wireless networks. The described c
ommunication is what we call one
hop communication, that is, there is no direct communication between
mobile hosts. If two mobile hosts wish to communicate, the have to do that
using mobility support router and fixed part of the network, even if they are
i
n the same cell. This is a major drawback of this approach. Then, there is
the issue of limited mobility that is dependent on the existing wire
infrastructure, since mobility support routers are part of the fixed network.
Mobile hosts can move only within
areas determined by the range of
mobility support routers, and their own range. Mobility is limited to one hop
from the mobility support router, that is, mobile host can’t move farther from
the mobility support router than the range of its own transceiver.


Beside all the downsides, this generation of mobile networks is very
important because it offers a starting point for the design of true, multihop
wireless networks. Why is this important? Not from the infrastructure point
of view, since we already agree
d that relying on the existing infrastructure
does not seem to be the correct approach. Instead, the nature of wireless
communications had to be considered, and that was a great benefit for the
development of Ad Hoc networks.

As one step closer to Ad Hoc n
etworks, we are now going to
examine the nature of wireless communications.

What can we conclude when comparing wireless and wired links:
the wireless links are slower, less reliable, prone to loss of signal due to
noise and fading. Then, there is the issu
e of limited bandwidth, and frequent
asymmetric quality of communication. Beside, mobile hosts are often
disconnected from fixed networks, for a short or long period of time. The
reasons can be numerous: moving out of range, exhausted battery, etc.

Now tha
t we know how the wireless links relate to wired links, what
can be the usage possibilities of described mobile networks? First and basic,
it’s the wireless local area network, the much
-
disputed approach of short
-


264

Mastering E
-
Business Infrastructure

range wireless networks. Then, there is the

possibility of connecting mobile
and portable computers to existing widely used fixed networks, like the
Internet. All this is already realized, with more or less success.

In order to understand the advantages of Ad Hoc networks, we must
first learn what

are the drawbacks and limitations of the classic approach to
mobile networking. First, we need a network infrastructure. This involves
large investments in base stations, and lots of time for their installation.
Then, because of the limited range, the com
munication can not always be
established exactly where needed, while the maintenance of such systems is
very expensive.

We saw what can be done with existing mobile networks, but what
these networks cannot do? In many cases it is necessary to establish
co
mmunication even if the infrastructure does not exist, or is damaged. That
cannot be done with classic mobile networks. Typical examples are rescue
actions, earthquakes, floods, war destruction, etc. In these cases the
communication must be established wit
hout any preliminary setup, that is,
Ad Hoc. It finally brings us to the theme of this chapter


Ad Hoc networks.

The basic idea was already stated: to establish the connection
without the preexisting network infrastructure. Let’s take a closer look at the

meaning of this. The following figure describes the nature of Ad Hoc
communication:






Figure
6
.5:

Ad Hoc communication

Comment:

The message is propagating through the network using
intermediate nodes as switches. Therefore, each node must
have r
outing capabilities.

Ad Hoc Networks and the
Wireless

Internet


265

What have we seen here? We saw that every mobile host acts like a
switch during the communication, that is, every mobile host has routing
capabilities. The message is effectively being transmitted from mobile host
to mobile host, witho
ut any other infrastructure needed.

What else can be noted here? First, mobile hosts can communicate
on much greater distances that covered by their ranges. This is possible
thanks to the presence of other mobile hosts than can be reached by the
source ho
st, and that are willing (or free) to retransmit the packet further.
Thus, propagating from one mobile host to another, the packet reaches its
destination.

Why is this called

multihop

communication? Remember the
previous examples of mobility support route
r and mobile hosts? There, the
packet could hop over the wireless link only once


from mobility support
router to destination mobile host, and we called it single hop network. Here,
we have multiple wireless hops, that is, the packet hops from one mobile
host to another until it reaches destination. Hence the name, multihop. The
number of such hops is not limited. (Well, this is not exactly true, but we’ll
come back to that later, when we discuss the routing protocols).

In essence, this is how a multihop
wireless communication through a
temporally formed Ad Hoc network is realized.


6
.3. Routing in Ad Hoc Networks


Now we have a good enough base to start examining the key issue in Ad
Hoc networks: multihop Ad Hoc routing protocols.

As we already said, effi
cient routing of packets is one of the main issues
that need to be addressed in Ad Hoc networks. In conventional networks,
distant vector or link state are the mostly used algorithms. They assume
periodical broadcast advertisements of all routers, with pur
pose of keeping
routing tables up
-
to
-
date.

In some cases, those algorithms were adapted to be used in Ad Hoc
networks, with every host treated as a router. Two examples of such practice
are Destination Sequenced Distance Vector and Wireless Routing Protoc
ol.
The benefit of such approach is that route to every host in network is always
known.



266

Mastering E
-
Business Infrastructure

However, when we take a closer look, it becomes obvious that
drawbacks of adapted algorithms seem to be of much more significance than
their benefits. First, there is

a large bandwidth overhead, because periodic
updates of topology are being sent even if no changes were made in the
network. Then, batteries become quickly exhausted, because hosts are
regularly wakened for receiving and sending information that is not al
ways
necessary. The network scalability is significantly reduced. Why is that? We
have large quantity of information propagating through the network that is
directly dependent on number of existing hosts. More hosts we have


more
routing information is be
ing regularly broadcasted, and the network becomes
overloaded. Then, there is unneeded
accumulation

of redundant routes,
because we have large number of routers (remember, every host is a router),
and the probability of redundant routes is very high. Final
ly, such systems
are often unable to respond to dynamic changes of the network topology
quickly enough.

This lead us to the class of routing protocols that we call
on
-
demand
protocols
. The general idea is not to use periodic broadcast of available
routes,

since it overloads the network. Instead, the route is discovered when
needed, that is, on demand. In that way, the network traffic is reduced, but
the real question is how efficient can these algorithms be? How long does
the process of route discovery las
t?

We will describe 3 algorithms for on
-
demand routing in Ad Hoc
networks:



Dynamic Source Routing (DSR)



Ad
-
hoc On
-
demand Distance Vector (AODV)



Temporally Oriented Routing Algorithm (TORA).

Each of these algorithms approaches this problem from a differe
nt angle
and under different assumptions. As such, they are not universally
applicable, because their usage depends on the type of Ad Hoc network.

However, the main characteristic of all mentioned algorithms is that they
all offer apparent reclamation of
performance compared to classic
algorithms. That is not unexpected, since they are relieved of the ballast of
classic routing algorithms, designed for stationary environments.

Ad Hoc Networks and the
Wireless

Internet


267

It is important to mention that algorithms that will be presented here are
just

specimens of large number of solutions that are being under
development even now. You can find more information on Internet
Engineering Task Force Web Site, on the page about MANET GROUP.
Also, in the last section of this chapter, an original routing algo
rithm for
multihop Ad Hoc networks will be presented which was developed at School
of Electrical Engineering, University of Belgrade.


6
.3.1. Dynamic Source Routing


The first algorithm that will be considered here is Dynamic Source
Routing
[IETF2001b]
. Th
is algorithm is based on the concept of source
routing. What does it mean? What is source routing? The source routing
means that sender provides the sequence of nodes through which the packet
will be sent. These sequences are stored in a route cache. Each
node
maintains its own route cache. You can imagine these route caches as
routing tables, because that’s what they really are.

What is the main feature of this approach? Route is determined
dynamically, and only when it’s needed. There are no periodical b
roadcasts
from routers regarding the routing information. Instead, the process of
routing goes like this. When sender wants to send a packet, it checks its
routing cache. If there is a valid entry in the routing cache for destination, the
packet is being s
ent. Remember that the whole route is stored in this cache,
that is, the list of all nodes through which the packet will travel is known at
this time. If there is no valid route to destination, a sender initiates the
process of
route discovery
. This is the

key notion of all on
-
demand routing
algorithms. If the host does not have a valid route, some king of route
discovery (depending on the algorithm) takes place, usually by sending route
request packet. This is the packet that propagates through the network

searching for destination node.

As we already said, the process of route discovery is initiated by
sending a route request packet (RREQ). This packet then propagates through
the network until it reaches destination host. On its way, route request
collect
s addresses of all visited hosts. These addresses are stored in the route
record, which is part of route request packet. The exact format of route
request packet is not that important, since there is no rigid specification. It is
obvious though, that route

request packet must at least contain the address of


268

Mastering E
-
Business Infrastructure

sender, destination, and some storage space for the addresses it collects on its
way. Instead of dealing with precise format, lets take a look at the following
figure, which describes the functioning of
this algorithm
.



Figure
6
.
6
:

Dynamic Source Routing


Comment:

Route request packet propagates through the network,
collecting the addresses of all visited nodes. Upon reaching
destination node, route request will contain the entire route
from source to d
estination node.


Imagine that node 1 wants to send a message to node 6. Suppose that
there is no valid route to node 6 in node 1 routing cache. Thus, node 1
initiates the process of route discovery by sending route request packet to all
neighbor nodes. Ne
ighbor nodes are all nodes in range. In this case, route
request is being sent to nodes 2 and 3.

As you can see, sender address is associated with this route request.
Then, each node retransmits this RREQ to its neighbor nodes.

So, node 2 transmits RREQ t
o node 3, while node 3 transmits RREQ
to node 4. Two things should be noted here.

First, observe how this route between nodes 1 and 3 is invalidated.
There is no purpose for node 1 to send messages for node 3 over node 2,
Ad Hoc Networks and the
Wireless

Internet


269

because node 1 obviously can send
messages directly to node 3. The
invalidation of route is shown with different
color
.

Second, notice how RREQ gathers information about nodes it travels
through. As you can see, RREQ sent by node 3 to node 4 contains the
addresses of nodes 1 and 3, which i
s the path or route through which this
RREQ passed.

Next, node 4 forwards RREQ to nodes 5 and 6. RREQ grows, that
is, the route record is updated and now contains the addresses of nodes 1, 3
and 4. Node 5 sends RREQ to node 6, but this route is invalidate
d because of
the reasons already mentioned. The process of route discovery is now over,
because RREQ has reached the destination node. In this case that is node 6.
Now the second phase of route discovery process must take place. That is
route reply.

Now th
e route to node 6 has been discovered. But node 1, the
originator of RREQ, still does not have that information. Therefore, an
inverse process must now take place. That is route reply. Route reply
(RREP) is generated by destination node with purpose of inf
orming source
node of the discovered route.




Figure
6
.
7
:

Route reply.


Comment:

Node 6 must inform node 1 about the valid route, and it is
done using the route reply message.




270

Mastering E
-
Business Infrastructure

Now, node 1 knows that it can send message to node 6 through
nodes 3 and 4.
However, one important issue must not be overlooked here.
How can node 6 send RREP to node 1? First, it searches its route cache. If
there is a valid route to node 1, the RREP is sent using that routing
information. But what happens if there is no active r
oute in the route cache
of node 6? There are two possibilities in this case.

First, RREP can be returned using the inverse route that was found
in the RREQ packet. But that includes some serious limitations. The transfer
quality must be the same in both d
irections, or in other words, wireless links
must be symmetric. However, that is often not the case in mobile
communications.

The second approach is better. Here destination node initiates route
discovery process by sending RREQ in order to find the origin
al initiator.
This process is called inverse route discovery. This mechanism provides
support for non
-
symmetric links, and that is very important merit of this
algorithm. However, inverse route discovery is not all that simple. What
would happen if destina
tion node would only send RREQ packet? This
packet would eventually reach the source node. Then the source node would
try to reach destination node by sending RREP, but it would not have valid
route to destination yet. So RREQ would be sent again. As you c
an see, we
are entering an infinite loop here. Some mean of destination identification
must be found when sending inverse RREQ. The easiest method is to attach
original RREQ with the RREP. This method is called piggybacking. Then,
when the originating node

receives inverse RREQ, it knows where to send
RREP.

Now we will discuss some aspects of route maintenance. In this
algorithm it is implemented by acknowledgement mechanism and route error
packets (RERR). Acknowledgements can be hop
-
to
-
hop or end
-
to
-
end.

The
meaning is obvious: hop
-
to
-
hop includes error checking at every hop, while
end
-
to
-
end includes error checking on sending and receiving sides only. Let
us take a closer look at hop
-
to
-
hop acknowledgement mechanism. The
process is shown on the following

figure
:

Ad Hoc Networks and the
Wireless

Internet


271



Figure
6
.
8
.

Hop
-
to
-
hop acknowledgement


Comment:

Each node waits for ack message. If not received, after a
predefined timeout the node sends an error message. Thus,
the exact location of the broken link can be determined.

So, upon receiving a p
acket, each node sends acknowledgement to
the source node. The source node, on the other side, waits for the ack. If the
ack is received, nothing happens. However, if the ack is not received after
the specified timeout, node that did not receive ack sends
route error packet
to the source node. RERR propagates to the originating node, which
becomes aware that a link is broken. Moreover, since the ack mechanism is
implemented hop
-
to
-
hop, source node even knows which link is broken, and
the routing cache is up
dated accordingly. The red cross at the previous figure
shows this


now source node knows exactly which node is unreachable.
Then, the alternative route can be used, or the route discovery process can be
initiated.

What happens when using end
-
to
-
end cont
rol? Now, there is no
information where did the link breakage occur and the source node can only
assume that the last hop is broken., although it is not the case in this
example. But, implementation of end
-
to
-
end control is easier and introduces
lesser ove
rhead.

Since this is one of the simplest routing algorithms, many
improvements can be proposed. Here we will mention only one of them.
That is working in so
-
called promiscuous receive mode. The general idea is
to update routing tables when receiving and t
ransmitting messages, requests
and replies that are addressed to some other node. The downside of this


272

Mastering E
-
Business Infrastructure

approach is that it causes more power to be used and more rapid battery
discharge.

Now we will once again go through the benefits of this algorithm.



Fi
rst, it is very simple and easy to implement.



There is always
-
important ability of working with asymmetric links.



Since there are no periodical broadcasts, bandwidth and energy can be
conserved.



Also, there is no overhead when there are no changes in the

network.



Beside, protocol can be easily improved to become able to support
multiple routes to the same destination. In that way, it would not be
necessary to initiate a new route discovery process every time some link
breaks.

This all sound nice, but ar
e there any drawbacks of this approach? Off
course there are and we’ll name but a few.

The first is caused by the nature of source routing, and it is a large
bandwidth overhead. As we all know, the bandwidth is all
-
important
consideration in modern communi
cations. But this protocol does not
appreciate it much. The problem is that RREQ packets rapidly grow as they
propagate through the network, because they store addresses of all nodes
through which they have passed in their route records. This, on the other

hand, causes potentially huge RREP packets. It all brings additional
overhead. Then, since the whole route must be sent along with the message,
it is possible that routing information can be bigger than the message itself.
But, this is the price we have t
o pay for simplicity of the algorithm.

The second problem is scalability, because the acceptable size of the
network is limited. Why is that? The largest the network is, more hops are
required for communication, and following the above conclusion, the
mes
sage growth becomes unacceptable.

At the end we can say that DSR protocol is suitable for Ad Hoc
networks with moderate number of mobile hosts which move with moderate
velocities.


Ad Hoc Networks and the
Wireless

Internet


273

6
.3.2. Ad Hoc On Demand Distance Vector Routing


Now we will take a look
at a slightly different approach to Ad Hoc
routing
[IETF2001a]
. The second algorithm that will be presented is called
Ad Hoc On
-
Demand Distance Vector routing. New route is discovered in a
manner that looks very similar to the one that we just described. S
ource host
broadcasts route request to all its neighbors, when it needs to discover a
route to some destination host. Then, after sending this packet, it waits for a
route reply. But, this is as far as similarity gets. Things are starting to get a
little b
it more complicated from here.

Key term here is the route request packet. Let’s examine its structure.
Route request packet consists of several fields. You will learn about them in
the last section of this chapter. For now, we will only introduce some bas
ic
ideas. First, let’s consider Sequence number. What is a sequence number,
and why is it introduced in this algorithm?

Sequence number is a number that every host generates for itself. It is a
unique number. It is incremented every time when there is a ch
ange in the
range of current host, that is, when something happens it its neighborhood
(for example, when some link breaks). Obviously, this number is used to
detect those changes.

Each routing table entry has a field called Destination Sequence
Number (D
SN). DSN is being calculated and kept for every route that the
current host knows. How is DSN used? First, whenever a host wants to send
a RREQ, it also sends the last known DSN for the requested route (or zero, if
the route was not known in any point in t
ime). Why is this done? We’ll
answer that question later in this section, but first we’ll have to introduce
some other concepts. For now, it’s enough for you to remember that DSN is
a unique number that is associated with every route that a current host
kn
ows, and that this number is kept in a routing table. So the minimal
required format of the RREQ is:

RREQ(src, dest, srcSN, dstSN, …)

As you can see, RREQ does not contain route record. There is no
information about the hosts through which it propagates.
Instead, RREQ
basically consists of only few fields: source address, source sequence
number, destination address, destination sequence number and few other
control fields that are not important for now.



274

Mastering E
-
Business Infrastructure

This is the key difference between Ad Hoc On
-
Demand
Distance Vector
routing and Dynamic Source Routing. And here is the first and the most
obvious advantage of this approach


since there is no route record in RREQ,
it is smaller and the bandwidth is conserved. But

what price are we paying
for having such a
n elegant solution? We’ll come to that soon.

What happens instead of RREQ carrying a whole route record is
following: a host that receives RREQ packet adds inverse route towards
source host, that is, to the host that originated RREQ. You can see this on th
e
figure
6
.
9
.

Here, our current node received RREQ from some source node
through node n1. Now, the current node will establish a route to the source
node, because it now knows that it can reach it through node n1. Every time
the current node wants to send
a message to the source node, it only needs to
forward it to node n1. This concept is essential for this type of routing.





Figure
6
.
9
:

Adding inverse route to source


Comment:

When receiving RREQ from source host via some
intermediate host, the curr
ent host updates its
routing table with route toward that source host.

What happens when RREP comes? Using the mentioned
mechanism, our current node will now establish a route to destination node,
through node n2. It’s simple: since destination node was ab
le to send a
Ad Hoc Networks and the
Wireless

Internet


275

RREP packet over node n2, than why shouldn’t current node be able to send
a message to destination node through node n2?





Figure
6
.
10
:

Adding inverse route to destination


Comment:

When receiving RREP from destination host via
some inter
mediate host, the current host updates its
routing table with route toward that destination host.

Now, it is time to state this as a fact: one of the main benefits of this
algorithm is that the network topology is updated at all nodes through which
the RRE
Q and RREP messages pass, and not only at source and destination
nodes. Each host through which RREQ or RREP pass will update its routing
table to source and destination nodes.

Instead of keeping the whole route, hosts keep only the next hop,
that is, the

address of neighbor to which it should transfer packets for the
required destination.

Pay attention to figure
6
.
11
, which describes this difference between
the Ad Hoc On
-
Demand Distance Vector and Dynamic Source Routing.




276

Mastering E
-
Business Infrastructure



Figure
6
.
11
:

Comparison of DSR

and AODV approaches to routing


Comment:

The main difference is that DSR maintains the whole route
record, while ADOV remembers only the next hop.


Assume that node 1 wants to send a message to node 6. In case that
Dynamic Source Routing is applied, node
1 has the whole route in its route
cache. You can see it on the figure
6
.
11
. Node 1 knows that, if it wants to
send a message to node 6, the message must go through nodes 3, 4 and 6.
Source node, therefore, knows the exact route through which the packet mu
st
travel to reach destination node. So, node 1 sends a message to node 3,
because this is the first node in its route record. Node 3 receives a packet
destined for node 6, forwards it to the next node specified in the route record
it received, and so on.

Now, let’s examine what happens in the case of Ad Hoc On
-
Demand
Distance Vector routing. Here, node 1 does not have the entire route to
destination host. Instead, as you can see, it only keeps the address of a next
hop, that is, the address of a node to wh
ich it needs to forward a message
destined for node 6. In this case, that is node 3. So, node 1 sends its packet to
node 3 without knowing what this node will do with it. Here lies all the
beauty of this approach. You can clearly see that each host knows o
nly the
Ad Hoc Networks and the
Wireless

Internet


277

next hop in the whole route, but despite that, the packet is perfectly
forwarded to the right destination: node 1 knows that it needs to forward a
message to node 3, node 3 to node 4, and node 4 to the destination node 6.
Simple and elegant, isn’t
it?

But, for this simple mechanism to work, some background work has
to be done. So, let’s see what happens when RREQ reaches a host that has a
route to the destination node.

First, a comparison of DSN from the packet and from the routing
table is made. If

a DSN value from RREQ is greater, that means that host’s
route to destination is not fresh enough, and then the host rebroadcasts
RREQ with the updated DSN.





Figure
6
.
12
:

RREQ rebroadcast


Comment:

If the host does not have route that is fresh enough,

RREQ message is rebroadcasted with updated value
of DSN.

Otherwise, the host generates RREP and sends it to the source node,
along with the calculated information about the discovered route. Also, note
that the DSN is being updated. After this, the concep
t of DSN should be
clear


it is used to respond to dynamic topology changes.




278

Mastering E
-
Business Infrastructure




Figure
6
.
13
:

RREP generation


Comment:

When an intermediate node has a fresh route to
destination host, RREP is generated and sent back to
the originating host, with upda
ted value of DSN.

How is RREP returned to the originating (or source) host? Using the
inverse route that was formed by intermediate hosts during the propagation
of the RREQ. You can see that on figure

6
.
14
.



Figure
6
.
14
:

RREP forwarding


Comment:


RREP i
s forwarded using inverse route formed by
intermediate hosts during the propagation of RREQ.

And that’s it. RREP has been forwarded to source node, and now it
can send a message to destination node.

Now we’ll discuss route maintenance in this approach. For

every
route in the routing table, host maintains a list of neighboring nodes that use
that route, in order to be able to inform them about eventual link breakage on
that route. Link breakage is detected by the absence of so called hello
Ad Hoc Networks and the
Wireless

Internet


279

messages, which mu
st be emitted by every host after the specified time
interval expires.

Here, we encounter two new terms: neighbor list and hello
messages. Try to remember them, because they form a base for the Ad Hoc
network realization, along with the concept of route d
iscovery. You’ll see
that the Ad Hoc routing protocol that will be described in the last section of
this chapter relies heavily on neighbor lists and hello messages.

Now that we are familiar with both protocols


Ad Hoc On
-
Demand
Distance Vector and Dynam
ic Source Routing, let’s try to compare some of
their aspects. What are the advantages of AODV over DSR?



First, there is a significantly smaller network bandwidth overhead. Why
is that? Control and message packets are smaller.



Then, only two addresses are

needed when routing, instead of the whole
route. This provides a good scalability, because the size of a packet does
not depend on a network diameter.



At the end, this protocol supports multicasting.

Nothing is perfect, so we must trade something in orde
r to obtain all
those beautiful things. The most important drawback of this approach is that
it works with symmetric links only. Then, each host must broadcast hello
messages, therefore increasing bandwidth overhead and reducing a
possibility of energy con
servation by remaining in the sleep mode. Also, this
algorithm does not support multipath routing, that is, there is only one route
to destination. So, when some link on the route breaks, new route must be
discovered. At the end, there is an increased prob
ability of congestion, too.


6
.3.3. Temporally Oriented Routing Algorithm


Now, we’ll examine another interesting algorithm for Ad Hoc routing.
That is Temporally Oriented Routing Algorithm
-

TORA
[IETF2001c]
.

This algorithm proposes entirely different an
d somewhat interesting
solution to the routing problem. It is conceived as link
-
reversal algorithm.
The basic idea is to define a network topology using a directed acyclic graph
(DAG). Hosts are represented as nodes with directed links. Direction of a
link

is realized by assigning a height to every node. The link is always


280

Mastering E
-
Business Infrastructure

directed from node with greater height to node with lower height, as you can
see on the figure
6
.1
5
.






Figure
6
.1
5
:

Directed Acyclic Graph




Comment:

Each node is assigned a height.
The link is
always directed from node with greater
height to node with lover height.


What is the general idea of this algorithm? The destination node
should have minimal height in the graph. Other nodes are assigned greater
and greater heights, as their d
istance from destination node grows. Then,
packets may be sent only from “higher” to “lower” nodes, that is, only via
downstream links.

This is all nice, but how is a DAG formed in the first place? Well, a
DAG forming starts when a node that does not have

downstream links wants
to send a message to destination node. Initially, all nodes in the graph have
undetermined height (special NULL value), except destination node. It has a
special height of ZERO, which is considered less even from NULL. Source
node t
hen broadcasts Query (QRY) packet to its neighbors. This packet is
somewhat equivalent to RREQ packet that we already know from the
previous algorithms. This packet propagates through the network, marking
Ad Hoc Networks and the
Wireless

Internet


281

every node through which it passes as “interested f
or route discovery”. This
is done by setting route request flag of each node.

When Query packet arrives to a node that has at least one
downstream link, that node then emits Update (UPD) packet. Update packet
then propagates back through the network, sett
ing heights of all nodes that
have the route request flag set, and resetting them afterwards. Every further
node will get a greater height than the preceding one in the path of Update
packet propagation. And as you can clearly see from figure
6
.1
6
., now th
ere
is one established downstream route between source and destination node.




Figure
6
.1
6
:

DAG forming


Comment:

The downhill path is formed from source to
destination node.


One important thing that should be noted here is that proposed
mechanism enabl
es many downstream links that lead to the same
destination. Therefore, this algorithm supports multipath routing, that is,
there can be more than one route to each destination host.

What happens in case of a link break? As we have seen, if Ad Hoc
On
-
Demand

Distance Vector routing algorithm is applied, a route must be
discovered again, that is, a route discovery process must be reinitiated.

However, it is not the case here. If a node still has any downstream
links left, no action is performed after a link b
reak. Otherwise, a node
broadcast Update packet, thus recovering the network graph. It is important


282

Mastering E
-
Business Infrastructure

to notice that recovering is a one pass process, except in the cases of
networks partitioning, when a graph gets separated in two
sub graphs
.

What are the
advantages of this approach compared to the others
already described?



First, route discovery is fast.



Then, multipath routing is enabled.



Also, recovering is localized.



There is a support for multicast, so this is Lightweight Adaptive
Multicast algorit
hm.

This is all very nice, but TORA has one major drawback, which you may
have already noticed


this idea of graph forming requires some external
synchronized timing mechanism, such as Global Positioning System (GPS).
This complicates things, because such

mechanism can turn out to be very
expensive.

Also, second drawback is that the network graph becomes less optimal
as time passes. This can be solved using the refresh packets, but it introduces
more overhead.

At the end, let’s just say that TORA is desig
ned for large networks, with
many nodes with dense distribution. In other words, this algorithm is
considered heavy artillery. When everything else fails, equip each mobile
host with GPS, employ TORA and it will go as smoothly as it can.


6
.4. Issue of Sec
urity in Ad Hoc Networks


The next issue in this chapter is the question of security in Ad Hoc
networks. The main attributes of security are:

1.

availability

2.

confidentiality

3.

integrity

4.

authentication

5.

non
-
repudiation

We will discuss these attributes one by one,

in detail.

Ad Hoc Networks and the
Wireless

Internet


283

Availability ensures the survival of network services despite denial
of service attacks. A denial of service attack could be launched at any layer
of an ad hoc network. On the physical and media access control layers, an
adversary could employ
jamming to interfere with communication on
physical channels. On the network layer disruption of the routing protocol
can cause the break of network.

Confidentiality ensures that certain information is never disclosed to
unauthorized entities. Leakage of i
nformation could have devastating
consequences. It is important to note that routing information must also
remain confidential in some cases.

Integrity guarantees that a message being transferred is never
corrupted. A message could be corrupted because of
benign failures, such as
radio propagation impairment, or because of malicious attacks on the
network.

Authentication enables a node to ensure the identity of the peer node
it is communicating with. Without authentication, an adversary could
masquerade a n
ode, thus gaining unauthorized access to resources and
sensitive information and interfering with the operation of other nodes.

Non
-
repudiation ensures that that the origin of a message cannot
deny having sent the message. Non
-
repudiation is useful for det
ection and
isolation of compromised nodes.

Use of wireless links renders an ad hoc network susceptible to link
attacks ranging from passive eavesdropping to active impersonation,
message replay, and message distortion. Eavesdropping might give an
adversary

access to secret information, violating confidentiality. Active
attack might allow the adversary to delete messages, to inject erroneous
messages, to modify messages, and to impersonate a node, thus violating
availability, integrity, authentication, and n
on
-
repudiation.

We should not only consider malicious attacks from outside a
network, but also take into account the attacks launched from within the
network by compromised nodes. To achieve high survivability,
Ad Hoc

networks should have a distributed arc
hitecture with no central entities.
Introducing any central entity into our security solution could lead to
significant vulnerability: that is, if this centralized entity is compromised,
then the entire network is subverted.



284

Mastering E
-
Business Infrastructure

There are two sources of threat
s to routing protocols:



from external attackers



from compromised nodes

The first comes from external attackers. By injecting erroneous routing
information, replaying old routing information, or distorting routing
information, an attacker could successfully

partition a network or introduce
excessive traffic load into the network by causing retransmission and
inefficient routing. To defend against this kind of threats, nodes can protect
routing information in the same way they protect data traffic, for exampl
e
through the use of cryptographic schemes such as digital signature.

The second and also the more severe kind of threats comes from
compromised nodes, which might advertise incorrect routing information to
other nodes.

Let’s discuss the problem of advert
ising incorrect routing information.
Detection of such incorrect information is difficult: merely requiring routing
information to be signed by each node would not work, because
compromised nodes are able to generate valid signatures using their private
ke
ys.
We can exploit the fact that routing protocols for ad hoc networks must
handle outdated routing information to accommodate the dynamically
changing topology. How can we do that?

False routing information generated by compromised nodes could be
consider
ed as outdated information. If routing protocols can discover
multiple routes, nodes can switch to an alternative route when the primary
route appears to have failed.

Another way is to use diversity coding. Diversity coding takes advantage
of multiple path
s in efficient way without message retransmission. The basic
idea is to transmit redundant information through additional routes for error
detection and correction.

Even if certain routes are compromised, the received node may still be
able to validate mes
sages and to recover messages from errors using the
redundant information. Off course, this will work only if the routing
algorithm supports multiple path routing.

We can employ cryptographic schemes, such as digital signature, to
protect both routing info
rmation and data traffic. Use of such schemes
Ad Hoc Networks and the
Wireless

Internet


285

usually requires a key management service. A public key infrastructure has
superiority in distributing keys and in achieving integrity and non
-
repudiation. In a public key infrastructure, each node has a public
/private
key pair. Public keys can be distributed to other nodes, while private keys
should be kept confidential to individual nodes.

There is a trusted entity called Certification Authority (CA) for key
management. The CA has a public/private key pair, wi
th its public key
known to every node and it signs certificates binding public keys to nodes.
The trusted CA has to stay on
-
line to reflect the current binding, because the
binding could change over time and some node can become compromised.
Although no si
ngle node is trustworthy in an Ad Hoc network because of
low physical security and availability, we can distribute trust to an
aggregation of nodes.

Assuming that any t+1 nodes will unlikely be all compromised,
consensus of at least t+1 nodes is considere
d trustworthy.

This is the
principle of distributed trust.
To accomplish distribution of trust in key
management service we can use threshold cryptography. An (n, t+1)
threshold cryptography scheme allows n parties to share the ability to
perform a cryptog
raphic operation (for example: creating a digital signature),
so that any t+1 parties can perform this operation jointly, whereas it is
infeasible for up to t parties to do so, even by collusion.

We divide the private key k of the service into n shares (s1
, s2,… ,sn),
assigning one share to each server. For the service to sign a certificate, each
server generates a partial signature for the certificate using its private key
share and submits the partial signature to a combiner. With t +1 correct
partial si
gnatures, the combiner is able to compute the signature for the
certificate.

However, compromised servers (there are at most t of them) cannot
generate correctly signed certificate by themselves, because they can
generate at most t partial signatures. Comb
iner can be any of servers and
there are more combiners because if the one combiner is compromised
others can recognize him as compromised.

A combiner can verify the validity of a computed signature using the
service public key. In case verification fails,

the combiner tries another set of
t+1 partial signatures. This process continues until the combiner constructs
the correct signature from t+1 correct partial signature.



286

Mastering E
-
Business Infrastructure

A problem with threshold cryptography is that it assume synchronous
system and an ad
hoc network is asynchronous by its nature (we can’t know
the exact time of message
-
delivery and message
-
processing). In fact, any
synchrony assumption is vulnerability in the system, because the network
under attack can become much slower.

Fortunately ther
e is an asynchrony prototype of such a key management
service, which have been implemented recently.

At the end, let’s just say that an ad hoc network is very vulnerable to
many kind of attacks. We have to protect not only data information but also
routing

information. The best way for that is cryptography scheme with
public/private key management combined with distribution of trust.
However, it is not cheap and it is complex.

6
.5. Bluetooth

Now we will briefly discuss the emerging Bluetooth technology, bec
ause
it can provide the potential platform for the future ad
-
hoc network
realization, and also because the project that will be described in the last
section uses this technology.

Bluetooth Technology is under development by the Bluetooth Special
Interest

Group. The following companies are leading this group: Ericsson,
IBM, Intel, Motorola, Nokia and Toshiba.

Bluetooth wireless technology is used for creating an open specification
for short
-
range wireless connectivity.

This technology allows users to make

effortless, instant connections
between a wide range of communication devices. Based on a radio link,
facilitating fast and secure transmission of both voice and data, Bluetooth
operates in a globally available frequency band giving worldwide
compatibilit
y.

Bluetooth is aiming to become the global standard for wireless
connectivity
[Miller2001]
.

You can see the Bluetooth module on the figure
6
.1
7
. There are three
ways of communicating from host to module: USB port, UART and PCM
port. USB and serial commun
ication are achieved using the Host Controller
Interface. Next, you can see that the main part of the module is the
base band

Ad Hoc Networks and the
Wireless

Internet


287

chip. Then, there is a voltage regulator, and on the other side of the module
we have crystal, radio and antenna interface and fla
sh memory.


Figure
6
.1
7
:

Bluetooth module

As we already mentioned, there are three on
-
chip external interfaces:



USB 1.1 compliant. This module is a USB high
-
speed class device (12
Mbps) and has the full functionality of a USB slave.



Second interface is U
ART. Signals supported are Rx, Tx, RTS and CTS.
The maximum speed is 460.8 kbs.



The third interface is PCM, and the PCM data can be: Linear PCM, 13
-
16 bit U
-
law 8 bit, A
-
law 8 bit. The PCM synchronization is 8kHz, and
the PCM clock is 200 kHz
-
2MHz.

As for
the antenna interface, it is for 50 ohm Bluetooth ISM band
antenna (operating in 2.4
-
2.5 GHz band).

Bluetooth has three communication layers: base band, link manager and
host controller interface.

Of these, the most important is the host controller inter
face, because it
provides a uniform interface method of accessing the Bluetooth hardware
capabilities regardless of the host platform. Description of the host controller


288

Mastering E
-
Business Infrastructure

interface is beyond the scope of this section, but as an example, we have
provided thi
s simple picture on which you can see how Bluetooth host
communicates with Bluetooth hardware using the available physical bus.


Figure
6
.
18:

Blueto
oth communication layers


Comment:

Bluetooth module communicates with the host using HCI
driver via physica
l bus.

Ad Hoc Networks and the
Wireless

Internet


289

Bluetooth is a short
-
range radio link intended to replace the cable(s)
connecting portable and fixed electronic devices. Key features are
robustness, low complexity, low power, and low cost. Bluetooth operates in
the unlicensed ISM band at 2.4 GHz.
A frequency hop transceiver is applied
to combat interference and fading. A shaped, binary FM modulation is
applied to minimize transceiver complexity.

The symbol rate is 1 Ms/s. A slotted channel is applied with a nominal
slot length of 625 ms. For full
duplex transmission, a Time
-
Division Duplex
(TDD) scheme is used. On the channel, information is exchanged through
packets. Each packet is transmitted on a different hop frequency. A packet
nominally covers a single slot, but can be extended to cover up to

five slots.

Bluetooth protocol uses a combination of circuit and packet switching.
Slots can be reserved for synchronous packets. Bluetooth can support:



an asynchronous data channel



up to three simultaneous synchronous voice channels



a channel which si
multaneously supports asynchronous data and
synchronous voice

Each voice channel supports a 64 kb/s synchronous (voice) channel in
each direction. The asynchronous channel can support maximal 723.2 kb/s
asymmetric (and still up to 57.6 kb/s in the return d
irection), or 433.9 kb/s
symmetric.

The Bluetooth system consists of radio unit, link control unit, and
support unit for link management and host terminal interface functions.



Figure
6
.
19
:

Typical Bluetooth system


Comment:

Host is connected with the Bl
uetooth radio transciever via
link manager and link controller.



290

Mastering E
-
Business Infrastructure

Bluetooth system can provide a point
-
to
-
point connection (only two
Bluetooth units involved), or a point
-
to
-
multipoint connection.

In point
-
to
-
multipoint connection, the channel is shared amon
g
several Bluetooth units. Two or more units sharing the same channel form a
piconet
. One Bluetooth unit acts as the master of the piconet, whereas the
other unit(s)
acts as slave(s). Up to seven slaves can be active in the piconet.


Figure
6
.
20
:

Types o
f connections


Comment:

Bluetooth can form 1
-
1 master slave connections (a), 1
-
many piconet connections (b) and scatternets (c)

In addition, many more slaves can remain locked to the master in a
so
-
called parked state. These parked slaves cannot be active
on the channel,
but remain synchronized to the master. Both for active and parked slaves, the
channel access is controlled by the master.

Multiple piconets with overlapping coverage areas form a
scatternet
. Each piconet can only have a single master. Howev
er, slaves can
participate in different piconets on a time
-
division multiplex basis. In
addition, a master in one piconet can be a slave in another piconet. The
piconets are not time
-

or frequency
-
synchronized. Each piconet has its own
hopping channel.

Oth
er features of the Bluetooth technology are Link Manager
Protocol, Logical Link Control, Service Discovery Protocol, RFCOMM,
Ad Hoc Networks and the
Wireless

Internet


291

Infrared access, Telephony Control Protocol and many more. Therefore,
Bluetooth may be a potential hardware platform for ad
-
hoc net
work
realization.

6
.6. Multihop Ad Hoc Sensor Network
Project


Do it yourself…


In the last section of this chapter, we will describe a new application of
mobile communications


a wireless, sensor, multihop Ad Hoc network for
data acquisition and remote
administration. This project was realized at the
School of Electrical Engineering in Belgrade, during the course of IEEE
Computer Society International Design Competition.

The goal of this project was to create a complete hardware/software
specification fo
r replacing and/or upgrading the existing wire systems for
data acquisition and process control.

The idea is based upon the expectation that Bluetooth modules, due to
their performance and price, will become the standard parts of most
electronic systems:
from mobile phones, personal digital assistants and
industry control units to home appliances.

However, because Bluetooh devices are short
-
range radio devices and,
as such, are not suitable for large
-
scale networks, a multihop adhoc routing
protocol is re
quired to extend the range of a Bluetooth device by enabling
routing of messages through intermediate mobile Bluetooh nodes, thus
creating a multihop mobile network
.

Therefore, we started with the following intention: to connect a
Bluetooth module with a
microcontroller that will execute the routing
protocol, forming a universal base for the wireless Ad Hoc communication.
The final goal is integration of the routing protocol on the base Bluetooth
chip, which eliminates the need for additional microcontroll
ers. Every device
equipped with a Bluetooth chip would then be a potential node in a global
Ad Hoc network (or wireless Internet).

The basic advantages of realized wireless Ad Hoc system are easy
installation and upgrade, modest requirements for existing i
nfrastructure, low
cost and maintenance, great flexibility.

Data acquisition systems are only one way to use such an environment.


292

Mastering E
-
Business Infrastructure

The project presents a universal platform for wireless integration of any
system that requires remote administration and gene
rates analogue and/or
digital signals. Implementation of this project in such a system automatically
guaranties two premises: stable and universal hardware platform, and
reliable and easy replaceable software. System that is once installed has the
capabili
ty of dynamic reconfiguration and adaptation to new working
requirements and conditions.

As we already mentioned, an open data acquisition and processing
system based on a wireless ad
-
hoc multihop sensor network was designed in
this project. Network was re
alized using Bluetooth modules with routing
protocol implemented on a separate hardware module (Interface and Routing
Module


IFRM) based on Microchip's PIC microcontroller.


In order to emphasize open architecture of our system, a hardware
Digital Signal

Processing System (DSPS) based on a Texas Instruments
Digital Signal Processor was designed as a sensor example
,

and a Personal
Digital Assistant (PDA), which enables fast on
-
line control of any process
.
Process control is done by software for data acquis
ition (Shell) and the
expert system for decision
-
making. All relevant system activities are stored
in an Internet accessible database.

6
.6.1. System
Overview

You can see the system overview on the figure 6.
2
1. We will briefly describe
each component of the

system before proceeding on to the detail analysis.

Web Server
database
AD-HOC
network
Web
client
PDA
DSPS
simulated
sensors
IFRM
Bluetooth
IFRM
Bluetooth
Bluetooth


Figure 6.
2
1:

System Overview

Ad Hoc Networks and the
Wireless

Internet


293

Multihop Ad Hoc sensor network and IFRM:
The basic idea of
an Ad Hoc network is establishing communication without a predefined
network infr
astructure. In other words, routing is dynamic, and data packets
are hopping through other nodes that act as switches.

The role of the network subsystem is to provide a communication
between other components of the system (server, DSPS, PDA...). In order
to
be scalable and flexible, network was designed as a multihop Ad Hoc
wireless network, which means that nodes perform routing of packets.

The appropriate routing protocol was designed and optimized for
execution on a microcontroller with very limited re
sources.
In order to
enable integration of

the existing data acquisition devices into the system,
interface to the Bluetooth module was designed to give such devices an
illusion that they are in direct cable connection with the server.

Personal digital ass
istant:

The role of the PDA is to inform the
person in charge about status of the process he/she is monitoring. Also, PDA
enables a person to send commands to remote parts of the system.
Communication with the rest of the system is realized through the int
erface
that is universal for each component that has an access to Ad Hoc network.

Digital Signal Processing System (DSPS):
A device with TI DSP
chip for digital motor control and signal processing was designed as an
example of sensor that can be connected
to this system. The basic role of this
device is gathering of information from different peripheral devices, real
time processing of gathered data and transfer of processed data to the server
(through IFRM and Ad Hoc network), where the monitoring and addi
tional
processing are available.

Data acquisition and the expert system
: Software for data
acquisition and expert system for decision making reside on the server. If
any irregularity is discovered, expert system tries to solve the problem by
sending contro
l commands to the part of the system that caused the problem.
If the system is unable to fix the problem, person in charge is informed. If no
response is received, a backup messaging system is activated. Every activity
of the system is also logged in a dat
abase.

Database:
All relevant activities of the system are recorded in a
database: received sensor data, discovered irregularities and emergencies.
Database is accessible from the Internet. The idea is to provide remote


294

Mastering E
-
Business Infrastructure

diagnostics and administration, besi
de plain recording of data, when the
expert on site is unable to solve the problem on his own.

The basic advantage of this idea is that it offers universal and open
platform, which can be implemented in any environment with small
adjustments. For example,
using this low cost kit, it is possible to upgrade
factory sensor infrastructure. The existing wire sensors can be easily
incorporated into the network, while it is possible to add any number of
wireless sensors for each production process that is being mo
nitored.
Engineer in charge would be equipped with a PDA, which shortens the
response time for any anomaly discovered.

We can identify several possible scenarios. Expert system discovers
some irregularity in the incoming data flow from the sensors and tri
es to
remedy the situation. At the same time the message is being sent to the
person in charge, who can manually override the expert system and send
remote command from the PDA. In that way, regulation of the anomaly has
begun before the expert has made hi
s way to the site where the problem
occurred.

If a person in charge cannot contain the situation alone, another
expert can access database from the Internet, gain insight into the nature of
the problem, and help expert on site to solve it. It is possible
to picture
numerous similar situations in various institutions, from hospitals and power
plants to the applications in the open air


rescue actions and researches of
inhospitable terrain.

The main problem that we face when trying to realize such a system

is providing critical data transmission rate and stable ad
-
hoc network. The
first problem was solved using the Bluetooth modules, which ensure fast
enough transmission. The question of stability was addressed with careful
design and implementation of the
Ad Hoc routing protocol. Testing and
detail simulations, the results of which will be presented in this chapter,
showed that this protocol, with realized hardware and software
infrastructure, is capable of operating in extreme load conditions, which is a
p
rerequisite for eventual industrial exploitation.

And now we will discuss in detail each part of the system separately.
Let’s start with the ad
-
hoc routing protocol.


Ad Hoc Networks and the
Wireless

Internet


295

6
.6.2. Routing Protocol


Regarding critical application of the system and limited resourc
es of the
microcontroller on which it’s being executed, routing protocol was designed
with the following guidelines in mind:



speed



reliability



simplicity

As we will see, solutions are proposed for each of these items, based on
results of the intensive s
imulations.

We started the development of the protocol by examining the existing
solutions. We examined the following protocols: Dynamic Source Routing
(DSR), Ad Hoc On
-
Demand Distance Vector routing (AODV) and
Temporally Oriented Routing Algorithm (TORA)
[IETF2001a], [IETF2001b],
[IETF2001c], [IETF2001d]
.

It turned out that DSR and TORA failed to fulfill our requirements.
Namely, DSR broadcasts route request to all nearby nodes, the request then
propagates through the network and gathers the addresses of
all the nodes
that it passes through. The drawback is obvious: in networks with many
nodes, route requests become too big and the network is overloaded.

The big limitation of TORA is demand for some external timing system
(such as GPS). AODV algorithm off
ers an acceptable solution, although it
does not use all benefits of the Bluetooth technology. Therefore, we adopted
it as a starting point and modified it in shape of Bluetooth capabilities and
the specific attributes of the sensor networks.

The routing a
lgorithm defines three types of messages:



route requests (RREQ)



route replies (RREP)



route errors (RERR)


On the figure 6.
2
2. you can see a detailed structure of the route request
packet. It has six fields: Hop count, Broadcast ID, Destination Address,
Destination Sequence Number, Source Address and Source Sequence
Number.



296

Mastering E
-
Business Infrastructure


Figure 6.2
2
:


Route Request packet format


Hop count denotes the number of hops to the ending node.
Broadcast ID is a unique RREQ identifier. Destination address is the address
to

which a route is requested. Destination Sequence Number is the last
known sequence number for the required destination (or zero if unknown).
Source Address is the address of node that issued RREQ and Source
Sequence Number is the current route sequence nu
mber.

Next we will examine the structure of Route Reply packet. It has
five fields: Hop Count, Destination Address, Destination Sequence Number,
Source Address and Lifetime.


Figure 6.
2
3
:

Route Reply packet format

RREQ:

Hop Count

BCID

Dest

Address

DSN

Source

Address

SSN


Hop Count



number of hops to the ending node

BCID



unique RREQ identifier

Des
tination Address



address to which the route is
requested

DSN



the last known sequence number

Source Address



address of the node that issued RREQ

SSN



current route sequence number



RREP:

Hop Count

Destination

Address

DSN

Source

Address

Lifetime

H
op Count



numer of hops between the source and
destination

Destination Address



address of node for which a route is
found

DSN



route sequence number

Source Address



address of the node that sent RREQ

Lifetime


time in which the route is considered va
lid


Ad Hoc Networks and the
Wireless

Internet


297


The only new field here is Lifetime, whi
ch denote the time in which
route record is considered valid.

The Route Error packet consists of three fields only: Destination
Count, Unreachable Destination Address and Unreachable Destination
Sequence Number.

Figure 6.
2
4:

Route Error format

The first
field specifies the number of unreachable nodes, second
field is the address of unreachable node, and the third field is the last known
destination sequence number incremented by 1.

Now we will briefly try to explain the functioning of protocol. The
algori
thm can distinguish between three types of nodes: master, gateway and
slave node. It uses the inherent capabilities of Bluetooth modules to form
piconets with master
-
slave communication. The nodes that are members of
two or more piconets are considered the

gateway nodes.

All communication is done exclusively on the master
-
slave level.
The slave node sends packets to the master, while master then forwards them
to the appropriate gateway. This kind of forwarding is continued until the
packet reaches the pico
net with destination node.

Server (the node on which the expert system resides) communicates
with all other nodes (sensors, PDA), while other nodes send data to the
server only (which is inherent to the sensor networks


the protocol itself is
not limited

to this kind of communication).

Let’s observe the situation in the network depicted on figure 6.
2
5.
Here we have server node M1 and five other master nodes M0
-
M5. You can
see that there are six piconets in this environment. We can identify gateway

RERR:

DestCount

Unreachable

Dest Address

Unreachable

DSN

DestCount



number of unreachable nodes

Unrea
chable Dest Address



address of the unreachable
node

Unreachable DSN



last knows DSN, incremented by 1



298

Mastering E
-
Business Infrastructure

nodes a
s members of two or more piconets. Here, gateway nodes are 8, 1, 2,
3, 7 and 13. The remaining nodes are slave nodes.

10
10
14
6
9
12
M4
M4
M3
M1
M2
M5
M0
11
11
16
4
5
15
0
8
13
3
7
2
master
gateway
plain node

Figure 6.
2
5
:

Typical network topology


Comment
:

Three types of nodes participate in communication: maste
r,
gateway and slave nodes. Piconets are overlapped, thus
forming scatternets.


The algorithm works in the following manner: during system
initialization, piconets are formed, every node creates a neighbor table
(nodes in the same piconet) and an empty rou
ting table.

When a node wants to send a message to other node, it first searches
the neighbor table to see whether destination node is in the same piconet. If
so, the communication is performed instantly, through the master of that
piconet. If destination

node is not in the neighbor table, node searches its
routing table.

You can see how the routing table entry looks like at figure 6.
2
6.
There are seven fields: Destination Address (which is the address of the
destination node), Destination Sequence Number,

Hop Count, Last Hop
Count (which is the hop count before the route invalidation), Precursors
(which is the list of forwarding nodes) and Lifetime.

As we already said, if destination node is not in the neighbor table,
node searches its routing table. If th
ere exists an active route to destination
node, packet is forwarded to the node specified in the Next Hop field of
corresponding routing table entry.


Ad Hoc Networks and the
Wireless

Internet


299

Figure 6.26:


Routing Table entry

If there is no valid entry in the routing table, node sends route
requ
est packet (RREQ) which propagates through the network, but not as a
plain broadcast


all subsequent communication is done at the master
-
gateway
-
master level.

There is no need for master to broadcasts RREQ to its slave nodes,
because it has all the nece
ssary information about them in the neighbor table.

When RREQ reaches destination node (or the node that has valid
route to destination node), route reply (RREP) message is generated, which
travels back to the node that issued RREQ.

At the same time, all

nodes that were in the path of RREQ and
RREP messages update their routing tables. When sending RREQ, a node
fills DSN field with the last known value for desired destination (initially
zero). If during the communication there happens to exist a routing t
able
entry with a DSN value that is greater than this, that means that the route is
invalid.

When a node receives RREQ, it checks whether there is an active
route to destination. If such route does not exist, RREQ is resent, while the
DSN value is set to t
he maximum of DSN from RREQ and DSN from
routing table entry (if exists). Otherwise, RREP is generated.

A node sends route error (RERR) message in three cases:



a link is broken (1)



a packet is received, but there is no active route to destination (2)



RRER
is received from a neighboring node (3)

Dest

Address

DSN

Hop

Count

Last


Hop Count

Next

Hop

Precursors

Lifetime

Dest Address


address of the destination node

DSN


destination sequence number