Sei sulla pagina 1di 61

ICT Entrepreneurship

for
Telematics Services

L2- Mobile Ad-Hoc Networks (MANETs)

February 6, 2013

T. Russell Hsing, FIEEE/FBCS(UK)/FSPIE


Email: thsing@ieee.org
What Problems Do You See
As Important to Address and Why?
What Are Mobile Ad-Hoc Networks?

No fixed network infrastructure

All nodes can be mobile and can be routers

Arbitrary and dynamically changing network


topology
Why Are Mobile Ad-Hoc Networks Important?

Military operations

Vehicular networks and telematics applications

Emergency search and rescue operations

Scientific explorations

Meetings and conferences

..
Key Technical Issues

How to route in mobile ad-hoc networks?

How to secure an mobile ad-hoc network and


communications over it?

High speed protocols process needed for some


key applications (i.e. vehicular telematics, high
speed railway (HSR))

How to conserve energy?


Nodes in mobile ad-hoc networks are likely to be energy-constrained
Military Mobile Ad-Hoc Network Illustration
What Makes Ad-Hoc Routing Difficult
Frequent node movements lead to frequent
changes of network topology

Energy-constrained nodes

Large number of nodes

Fast moving nodes (e.g., airplanes, cars,


HSR,etc)

Routing
Routingprotocols
protocolsdesigned
designedforforthe
theInternet
Internet
were
weredesigned
designedfor
forrelatively
relativelystable
stablenetworks
networks
and
andcannot
cannothandle
handlethe
thedynamic
dynamicchanges
changesininad-hoc
ad-hocnetworks
networks
Desirable Characteristics of Ad-Hoc Routing

Distributed operations

Loop free

Scalable

Energy conservative

Rapid convergence

Security and privacy preserving


How is Routing Done in IP Networks?
Key methods
Link state routing
OSPF Open Shortest Path First
Distance vector routing
RIP Routing Information Protocol
BGP Border Gateway Protocol

How to scale to large networks?


Hierarchical Routing
Divide network into domains
Different protocols for intra-domain routing (OSPF, RIP) and inter-domain
routing (BGP)

Hierarchical IP addresses

Private addresses (NAT Network Address Translation)


Using Existing IP Routing Protocols for Ad-
Hoc Networks?
They are not designed to handle frequent changes
in the network

Dont scale well enough

But, some basic ideas can be used or enhanced to


fit the ad-hoc network
A Fundamental Algorithm Behind Many
Ad-Hoc Routing Protocols:

Bellman-Ford Routing Algorithm


Bellman-Ford Routing Algorithm

A distance-vector routing algorithm

Initially designed in 1957

Currently used in many popular Internet routing


protocols
ARPANET (Advanced Research Projects Agency Network,
US DoD), the origin of the Internet
RIP (Routing Information Protocol)
BGP (Border Gateway Protocol)
NOVELL IPX

Foundation for many ad-hoc routing protocols


Bellman-Ford Routing Algorithm

Key Characteristics
Distributed algorithm
Each node exchanges routing information with its directly attached
neighbors and makes its own routing decisions

Iterative
Routing information exchange continues until no new information is
exchanged between the neighborhood.

Asynchronous
Do not require all nodes to operate in lock step with each other
Bellman-Ford Routing Algorithm

How It Works
Each router maintains a distance table, which is a one-
dimensional array, hence the term distance vector
Distance table maintains the distance and the shortest
path to each node in the network.

Distance (Cost of Path) Neighbor on shortest


Destination Node
to Destination path to Destination

Distance can be hop-count distance or time it takes to


transmit a packet to the destination
Referred to generally as "cost

Assumption: Each node knows the cost of the link to each


of its directly connected neighbors.
Bellman-Ford Algorithm

How It Works

Every node sends routing update messages to its directly


connected neighbors containing its own distance table
Upon first joining the network or change of the distance table

Every node updates its distance table with cost and next
hops learned from its neighbors

Repeat routing table exchange until no more new


information between the neighbors.
Bellman-Ford Algorithm

How It Works
Shortest distance from Z1 to Y: D(Z1,Y)
Cost of direct link
C(X,Z)
X Z1 Y

Shortest distance from X to Y via Z1 :


D(X,Y) = C(X,Z) + minZ {D(Z,Y)}

Z2 Y

Node X knows C(X,Zj ) for every neighbor Zj


Node X can learn C(Zj,Y) from route updates from each neighbor Zj.
Node X can compute D(X,Y) based on C(Zj,Y) for every neighbor Zj, and
C(X,Zj)
Bellman-Ford Algorithm
Potential Problems: Counting to Infinity

A B C X
Converged
Stable X 3 B X 2 C
Condition

A B C X
Routing update

X 3 B X 4 A

X 5 B X 4 A

X 5 B X 6 A
Bellman-Ford Algorithm

Solving the Counting-to-Infinity Problem


Split Horizon
If you learn a route on an interface, do not send information about
that route back out that interface.
Split Horizon eliminates routing loops with only two nodes. It is not
effective in eliminating loops that involves more than two nodes

Make the infinity finite


Specify a maximum distance vector metric as infinity

Hold Down Timers or Hold down


Hold downs are ways to try to eliminate larger routing loops.
When a node eliminates a node from its routing table, it initiates a
hold downs so no new entries can be accepted for that node for a
specific period of time. This helps to keep that node from being a
member of the loop.
Existing Ad-Hoc Routing Protocols

Pre-Computed (Table-Driven) Routing


Proactive routing where every node maintains up-to-date and
consistent routes to every other node

On-Demand Routing
Reactive routing that discovers a route only when needed

Probabilistic/Opportunistic Routing
Take advantage of the randomness of the network to route packets
to further increase scalability

Location-Added Routing
Use location of the destination to route the traffic
Pre-Computed Ad-Hoc Routing
Each node maintains routing tables to store up-to-date and
consistent routes to each destination

Nodes respond to changes in network topology by


propagating routing update messages throughout the
network

Existing table-driven routing protocols differ primarily in


how changes in network topology are propagated over the
network

Flat routing
Requires each node to maintain a routing table containing all other
nodes in the network

Hierarchical routing
Organizes nodes into a hierarchy of clusters
Sample Pre-Computed Routing Protocols
Flat table-driven routing protocols
Dynamic Destination-Sequenced Distance-Vector Routing Protocol
(DSDV)
Wireless Routing Protocol (WRP)
Global State Routing (GSR)
Fisheye State Routing (FSR)

Hierarchical table-driven routing


Hierarchical State Routing (HSR)
Zone-based Hierarchical Link State Routing (ZLSR)
Dynamic Source Routing Protocol

Dynamic Destination-Sequenced Distance-
Vector Routing Protocol (DSDV)
Based on Bellman-Ford Distance-Vector Routing
Algorithm

Each node maintains a Routing Table, which


contains
All available destinations
Number of hops to reach the destination
Sequence number assigned by the destination node used to avoid
routing loops

Destination 1 Hop counts to Destination Sequence Number 1


Destination 2 Hop counts to Destination Sequence Number 2

Key difference from classical


Bellman-Ford protocol
Dynamic Destination-Sequenced Distance-
Vector Routing Protocol (DSDV)
Each node sends route update packets to its neighbors periodically
and also when their routing tables change significantly
Route update packet may carry the full routing table update or only an
incremental update

Each route update packet contains


Address of known destinations
# of hops to each destination
A unique sequence number assigned by the originator for the route to the
destination.

Route with the highest (i.e. most recent) sequence number is used.

If two routes have an identical sequence number, the route with the
best metric (i.e. shortest route) is used
Dynamic Destination-Sequenced Distance-
Vector Routing Protocol (DSDV)
Route used by X for destination Y (sequence #=1)

X A B Y
Route Update (Y, Hop count to distance = 2, Seq. #=1)

Route used by X for destination Y (sequence #=2)

X A Y

Route Update (Y, Hop count to distance = 1, Seq. #=2)


Wireless Routing Protocol (WRP) (1 / 7)
Another distance-vector routing protocol

Each node maintain 4 tables


Distance Table
Routing Table
Link-Cost Table
Message Retransmission List
Wireless Routing Protocol (WAP) (2 / 7)
Distance Table
Distance to each destination via each neighbor

The downstream neighbor of each neighbor


through which a path is realized
Node X remembers a 2-hop path toward destination

Destination

X A B Y

Hop-Count Distance to Destination


Wireless Routing Protocol (WAP) (3 / 7)
Routing Table

Distance to each destination node,

Predecessor node and successor node for each


path

A tag to identify if the routing entry is a simple


path, a loop, or invalid.

A X B Y

Distance Successor Predecessor


Destination Y Tag
=2 =A =B

Node Xs Routing Table


Wireless Routing protocol (WAP) (4 / 7)
Using Predecessor Info to Avoid Loops

A B C X
Converged
Stable X 3 B X 2 C
Condition

A B C X
Routing update B knows from the
successor info it has
X 3 B C and the predecessor in
the route update
that the route
in this update
Destination Next Hop Is not valid

Distance Predecessor
Wireless Routing Protocol (WAP) (5 / 7)
Link Cost Table and Message Retransmission List

Link Cost Table


Cost of link to each neighboring node
The number of timeouts since an error-free message was received
from that neighbor

Message Retransmission List (MRL) contains


Information to let a node know which of its neighbor has not
acknowledged its update message and to retransmit update
message to that neighbor.
Wireless Routing Protocol (WAP) (6 / 7)

Routing Table Update


Node sends routing updates to its neighbors periodically,
and upon route changes
Route may change when a neighbor moves away or when the node receives
routing updates from its neighbors indicating new routes
If there is no change in routing table since last update, the node is required
to send an idle Hello message to ensure connectivity
Nodes learn the existence of neighbors from receipt of ACKs and other
messages
An route update message contains
A list of updates: destination, distance to destination, predecessor node of
destination
A response list indicating which neighbors should acknowledge the update

Upon receiving an route update message, a node modifies


its tables and looks for better paths using new information.
Wireless Routing Protocol (WAP) (7 / 7)

Routing Table Update


Any new path is relayed back to the original nodes so that
they can update their tables. The node updates its routing
table if the new path is better than the existing path.

Upon receiving an ACK, the node updates its Message


Retransmission List.

Node checks the consistency of the information reported


on the predecessors by all its neighbors every time it
detects a change in link of any of its neighbors. This helps
eliminate loops and enable fast convergence.
Global State Routing (GSR)

A link-state routing protocol

Each node maintains 4 tables


Neighbor List: Contains all neighbor nodes

Topology Table: Contains the link state information as reported by


the destination and the timestamp of the information for each
destination

Next Hop Table: Contains the next hop toward each destination

Distance Table: Contains the shortest distance to each destination.


Fisheye State Routing (FSR)
FSR is an improvement of Global State Routing (GSR) to
reduce the state update messages

Issues addressed
Update messages in GSR can be large and hence can waste a considerable
amount of network bandwidth.

Solution in FSR
Each update message does not contain information about all nodes. Instead,
it exchanges information about closer nodes more frequently than it does
about farther nodes thus reducing the update message size.
So each node gets accurate information about neighbors and the detail and
accuracy of information decreases as the distance from node increases.
Packets can be routed correctly because the route information becomes
more and more accurate as the packet moves closer to the destination.
Hierarchical State Routing (HSR)
Network is divided into clusters of nodes

Each elects a cluster head as in a cluster-based routing algorithm

Cluster heads organize themselves into clusters and so on.

Nodes in a cluster broadcast their link information to each other

Each cluster head summarizes its cluster's information and sends it


to neighboring cluster heads via gateways

A node at each level floods to its lower level the information that it
obtains so the lower level has a hierarchical topology information.

Each node has a hierarchical address


Routing Hierarchy in HSR
Cluster
Head
X

Virtual Link X.1 X.2


Virtual
Nodes Cluster
Head

Cluster
Head Cluster
Head
X.2.2
Physical Physical Link
Nodes X.2.3
X.2.1
Cluster
Cluster
Head
Gateways
Zone-based Hierarchical Link State Routing
Protocol (ZHLS) (1 / 2)
The network is divided into non-overlapping zones

No zone head is needed better scalability

Uses 2 levels of topologies: node level and zone level

Use 2 types of Link State Packets (LSP)


Node LSP contains information on a nodes physical neighbors and
is propagated within the zone

Zone LSP contains the zone information and is propagated globally


so that each node has full node connectivity knowledge about the
nodes in its zone and only zone connectivity information about other
zones.
Zone-based Hierarchical Link State Routing
Protocol (ZHLS) (2 / 2)
Nodes and zones are identified by Node IDs and
Zone IDs

Packet routing
A packet is routed first based on the Zone ID to the destination zone.
The, within the destination zone, the packet is routed based on the
destinations Node ID
On-Demand Ad-Hoc Routing Protocols

Discovers a route only when needed, by flooding a


query to all nodes

Each query packet remembers the intermediate


nodes it traverses

Destination, or nodes that know how to reach the


destination, sends the route information
accumulated in the query packet back to the source

Routes are kept for a finite lifetime


Sample On-Demand Routing Protocols

Dynamic Source Routing Protocol (DSRP)

Ad hoc On-Demand Distance Vector (AODV)


Routing
IETF RFC 3561

Cluster-based Routing Protocol

Temporarily Ordered Routing Protocol


Dynamic Source Routing Protocol
On-demand source routing protocol.

Source route: A packet carries in its header the


entire route from source to destination

A node caches source routes that it knows and


updates them when needed
A node can maintain multiple routes to the same destination

No periodic routing updates

Has two major phases


Route discovery and
Route maintenance.
Dynamic Source Routing Protocol
Route Discovery Phase
When a source node wants to send a packet to a
destination, it
Looks up its route cache to determine if it already knows a route to
the destination.
If it knows an unexpired route to the destination, it uses this route to
send the packet.
If is does not have an existing route, it initiates the route discovery
process by broadcasting a route request packet

The route request packet contains


Addresses of the source and the destination, and
A unique ID.
Dynamic Source Routing Protocol
Route Discovery Phase

Each intermediate node checks whether it knows a route to


the destination.
If it does not, it appends its address to the route record of the packet
and forwards the packet to its neighbors
If it knows a route to the destination, it sends a route reply message
to the source along an unicast reverse path contained in the route
request message

To limit the number of route requests propagated, a node


processes the route request packet only if it has not
already seen the packet and its own address is not present
in the route record of the packet
Dynamic Source Routing Illustration
(1, 2)
2 5
Route Discovery
(1, 2, 5)
(1, 2, 5)
(1)

(1)
Source 1 4 7 Destination
(1, 4)

(1)
3 6 (1, 3, 6)
(1, 3) Intermediate node caches
source route in the packet

Route Reply 2 5

Source 1 4 7 Destination

(1, 3, 6, 7)
(1, 3, 6, 7)
3 6

(1, 3, 6, 7)
Dynamic Source Routing
Route Maintenance
Each node along a route is responsible for detecting failure
of the part of the route that goes through it

Upon detecting a broken link, it informs the source

Source deletes any route in its cache that uses the broken
link

Source may re-initiate the route discovery procedure to find


a new route
Ad-Hoc On-Demand Distance Vector Routing
(AODV)
Distance-vector routing used on an on-demand fashion

Node search for a route to a destination only when it needs


to send packets to the destination and does not already
have a route to the destination

Node keeps active routes in the same manner as in


traditional routing tables: <destination, next hop>
An active route is one over which at least one packet has
been forwarded over the past active timeout period

Two main operations


Route discovery
Route maintenance
AODV
Route Discovery
To find a route to the destination, the source broadcasts a
Route Request packet to all its neighbors, which in turn
broadcast the Route Request to their neighbors until the
Route Request reaches
The destination, or
An intermediate node that has an up-to-date route to the destination

To avoid route loops, a node discards a Route Request that


it has already seen.
Route Request packets identified by sequence numbers
AODV
Route Discovery
Destination or an intermediate node with a route to the
destination unicasts a Route Reply packet back to the
source along a reserve direction of the path traveled by the
Route Request

To construct the reverse path, a node records the neighbor


from which the first copy of each Route Request came

As the Route Reply travels back to the source, the nodes


along the way enter the forward route into their routing
tables, forming a forward route from the source to the
destination
AODV
Route Discovery
To ensure most recent route is used and to help avoid
routing loop, AODV uses a Destination Sequence Number

When the destination sends back the Route Reply packet, it


assigns a Destination Sequence Number to the route and
insert the Destination Sequence Number in the Route
Reply.

As the Route Reply travels towards the source, each node


along the way records the Destination Sequence Number
for the route in its routing table as illustrated below

Destination Destination
Hop Count Next Hop Lifetime
IP Address Sequence Number
AODV Route Discovery Illustration
2 5
Route Discovery

Source 1 4 7 Destination

3 6

Intermediate node caches the


route to source

Route Reply 2 5

Source 1 4 7 Destination

3 6 Route establishment
AODV: Use of Destination Sequence Number
Destination Sequence
Number = 1
Source 1 For route to Y
Destination

X A B Y

Source 2
Destination Sequence
Q Number = 2
For route to Y Destination

A Y

Destination Sequence
Number = 2
Source 1
For route to Y Destination
Route Request
(Dest. Seq. # =1)
X A Y
Node A will use new route to Y
to respond to this Route Request
AODV
Route Maintenance

A route may break when any node along the route moves
away

If the source moves


The source can reinitiate route discovery to find a new route to the
destination.

If an intermediate node moves


A neighbor of the moved node detects failure of link to the moved
node and sends a link failure notification to its upstream neighbors,
which in turn informs its upstream neighbors until the notification
reaches the source
The source can reinitiate route discovery to find a new route to the
destination
Cluster-Based Routing Protocol
Nodes are divided into clusters.

Algorithm for establishing clusters:


Upon powering up, node enters "undecided" state, starts a timer and
broadcasts a Hello message

Cluster head responds to the Hello message with its own Hello
message

Receipt of Hello from cluster head triggers the undecided node to


transition its state into "member".

If the undecided node times out, then it makes itself the cluster-head
if it has bi-directional link to some neighbor; otherwise it remains in
undecided state and repeats the procedure again.

Cluster heads are changed as infrequently as possible.


Cluster-Based Routing Protocol

Each node maintains a neighbor table, containing


Status of the link to each neighbor and
State of the neighbor (cluster-head or member).

A cluster-head maintains information about


All members of its cluster and
A cluster adjacency table

Cluster adjacency table contains the following


information about each neighboring cluster:
Gateway through which the cluster can be reached and
Cluster head of the cluster.
Cluster-Based Routing Protocol
When a source has to send packet to a destination, it sends
a route request packet to its cluster head

Upon receiving the request, a cluster-head checks to see if


the destination is in its cluster
If yes, it sends the request directly to the destination
Else, it sends it to all its adjacent cluster-heads.

The request contains the cluster heads addresses (i.e.,


source routing) so a cluster head discards a request packet
that it has already seen.

When the destination receives the request packet, it replies


with the route recorded in the request packet.

If the source does not receive a reply within a time period,


it backs off exponentially before trying to re-send route
request
Cluster-Based Routing Protocol
Route shortening technique
Upon receiving a source route packet, the node tries to find the
farthest node in the route that is its neighbor (this could have
happened due to a topology change) and sends the packet to that
node thus reducing the route

While forwarding the packet if a node detects a broken link


it sends back an error message to the source and then
initiates local repair mechanism

Local repair: when a node finds the next hop is


unreachable, it checks to see if the next hop can be
reached through any of its neighbor or if the hop after next
hop can be reached through any other neighbor. If any of
the two works, the packet can be sent out over the repaired
path.
Signal Stability-Based Adaptive Routing
Protocol (SSR) (1 / 4)

On-demand routing that selects routes based on


the radio signal strength between nodes,
choosing "stronger" connectivity.

Uses two protocols


Dynamic Routing Protocol (DRP)
Static Routing Protocol (SRP).

Each node maintains


Signal Stability Table (SST) and
Routing Table (RT).
SSR (2 / 4)
Signal Stability Table (SST) stores the signal
strength of neighboring nodes obtained by
periodic beacons from the link layer of each
neighboring node.
Signal strength is either recorded as a strong or weak.
All transmissions are received by DRP and processed.
After updating the appropriate table entries, the DRP passes the
packet to the SRP.
SSR (3 / 4)

SRP passes the packet up the protocol stack if


the node is the destination. Otherwise, it looks up
the destination in the RT and forwards the
packet.
If there is no entry for the destination in the RT, it initiates a route-
search process to find a route by sending a route-search packet to
neighbors from which it received strong signals
The destination chooses the first arriving route-search packet to
send back as it is highly likely that this packet arrived over the
shortest or least congested path.
The DRP reverses the selected route and sends a route-reply
message back to the initiator of route-request.
The DRP of the nodes along the path update their RTs accordingly.
SSR (4 / 4)
Route-search packets arriving at the destination have
necessarily arrived on the path of strongest signal stability
because the packets arriving over a weak channel are
dropped at intermediate nodes.

If the source times out before receiving a reply, it can re-


transmit the packet and sets the PREF field in the packet
header to indicate that weak channels can also be used

When an intermediate node detects a link failure, it sends


an error message to the source indicating which channel
has failed. The source then sends an erase message to
notify all nodes of the broken link and initiates a new route-
search process to find a new path to the destination.
What Problems Do You See
As Important to Address and Why?
Thanks !

Potrebbero piacerti anche