View
2
Download
0
Category
Preview:
Citation preview
Junseok Kim
Wireless Networking Lab (WINLAB)
Konkuk University, South Korea
http://usn.konkuk.ac.kr/~jskim
Broadcast Route Request (RREQ) packet to find where the sink node is
AODV - route establishment
RREQ
Source
Sink
Flood RREQ packets over the network
Route establishment (Cont.)
RREQ
RREQ
RREQ
RREQ
Source
Sink
Flood RREQ packets over the network
Route establishment (Cont.)
Source
Sink
When sink node received RREQ, it forwards Route Reply (RREP) packet back to source node
Route establishment (Cont.)
RREP
RREP
RREP
RREP
RREP
Source
Sink
When a node detects a route break, it floods RREQ again or forwards Route Error (RERR) packet back to the source node
Route Recovery
DATA
RREQ
RREQ
RREQ
Source
Sink
When AODV agent received a data message from its upper layer,
it first looks the route table to find the next hop information
If there is no route, AODV broadcasts RREQ
For example shown below,
when node 2 received RREQ,
it stores information (sequence, destination address, etc) into RREQ cache for not
re-broadcasting same RREQ
node 2 also inserts information of previous node and source node into the
route table
Route Establish (details)
When node 4 received RREQ, a reverse route (41) is established
Then, node 4 forwards RREP back to node 1
Node 4 sends RREP to node 3 since
the next hop node for node 1 is node 3
When node 1 received RREP,
a forward route (14) is established
Route Establish (details)
When node 2 continuously fails to transmit packets to node 3,
it sends a route error (RERR) packet to node 1
When a node received RERR, it delete information of node 3 in route table
After node 1 received RERR, it restarts RREQ flooding
Route Recovery (details)
Packet Encapsulation
APPLICATION
LAYER
NETWORK
LAYER
(AODV agent)
MAC LAYER
PHYSICAL
LAYER
original data
network-layer header
MAC-layer header
NETWORK-LAYER
MAC-LAYER
RREQ RREP RERR DATA
APPLICATION-LAYER
PHYSICAL-LAYER
DATA
packet
module AODV_M {provides {
interface SplitControl;interface AMSend[am_id_t id];interface Receive[uint8_t id];
}
uses {interface SplitControl as AMControl;interface Timer<TMilli> as Timer;interface Leds;interface AMPacket;interface Packet;interface AMSend as SendRREQ;interface AMSend as SendRREP;interface AMSend as SendRERR;interface Receive as ReceiveRREQ;interface Receive as ReceiveRREP;interface Receive as ReceiveRERR;interface AMSend as SubSend;interface Receive as SubReceive;interface PacketAcknowledgements;
}}
TinyOS Implementation
(sync, async) command, event, task
NETWORK-LAYER
MAC-LAYER
APPLICATION-LAYER
PHYSICAL-LAYER
NETWORK-LAYER
MAC-LAYER
APPLICATION-LAYER
PHYSICAL-LAYER
Node A Node B
“Send DATA to Node B”
command
command
command
command
event
event
event“Where should I transmit ?”
“Can I transmit now ?”
“Transmission is successful ?”
“I got someting”
“I got a DATA”
“I got a DATA from Node B”
“Receive DATA from Node B”
call
signal
command, event, task (Cont.)
“if transmission fails, retransmit DATA”
task
task 1
task 2
...
task n
excuted when processor is idle
post
NETWORK-LAYER
MAC-LAYER
APPLICATION-LAYER
PHYSICAL-LAYER
Node A
“Send DATA to Node B”
command
command
command
command
“Where should I transmit ?”
“Can I transmit now ?”
“Transmission is successful ?”
call
command, event, task (Cont.)
Processor
Radio Sensor1 Sensor2 Sensor k
Application1 Application2 Application n...
...
commandcommand
command
eventeventevent
event
task
interrupt
time
sync command
sync command
async command
interrupt
sync event
sync event async event
task
15
Recommended