15
Junseok Kim Wireless Networking Lab (WINLAB) Konkuk University, South Korea http://usn.konkuk.ac.kr/~jskim

Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

Junseok Kim

Wireless Networking Lab (WINLAB)

Konkuk University, South Korea

http://usn.konkuk.ac.kr/~jskim

Page 2: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

Broadcast Route Request (RREQ) packet to find where the sink node is

AODV - route establishment

RREQ

Source

Sink

Page 3: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

Flood RREQ packets over the network

Route establishment (Cont.)

RREQ

RREQ

RREQ

RREQ

Source

Sink

Page 4: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

Flood RREQ packets over the network

Route establishment (Cont.)

Source

Sink

Page 5: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

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

Page 6: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

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

Page 7: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

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)

Page 8: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

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)

Page 9: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

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)

Page 10: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

Packet Encapsulation

APPLICATION

LAYER

NETWORK

LAYER

(AODV agent)

MAC LAYER

PHYSICAL

LAYER

original data

network-layer header

MAC-layer header

Page 11: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

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

Page 12: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

(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

Page 13: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

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

Page 14: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

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

Page 15: Junseok Kim Wireless Networking ... - uweb.engr.arizona.edujunseok/pdf/lecture4.pdf · When AODV agent received a data message from its upper layer, it first looks the route table

15