Download presentation
Presentation is loading. Please wait.
Published byQuentin Roberts Modified over 8 years ago
1
Network and Systems Laboratory nslab.ee.ntu.edu.tw Polly@NTU Copyright © 2008 1 Wireless Sensor Networks: Zigbee Stack Polly Huang Department of Electrical Engineering National Taiwan University http://cc.ee.ntu.edu.tw/~phuang phuang@cc.ee.ntu.edu.tw
2
Network and Systems Laboratory nslab.ee.ntu.edu.tw Zigbee Stack Designed for indoor home appliances Routing MAC Polly@NTU Copyright © 2008 2
3
Network and Systems Laboratory nslab.ee.ntu.edu.tw Radio Coverage Good linkGrey linkBad link Polly@NTU3 Copyright © 2008
4
Network and Systems Laboratory nslab.ee.ntu.edu.tw Problems in Networking No one node can reach every other node Need multiple routing Each node can reach a high number of other nodes Need MAC with collision avoidance No link is 100% reliable Need (quasi-)reliable data transport Polly@NTU Copyright © 2008 4
5
Network and Systems Laboratory nslab.ee.ntu.edu.tw Ad Hoc Routing Multi-hop Routing for Wireless Network Polly@NTU Copyright © 2008 5
6
Network and Systems Laboratory nslab.ee.ntu.edu.tw Ad Hoc Network A collection of wireless and/or mobile nodes Forming a spontaneous network Polly@NTU6 Copyright © 2008
7
Network and Systems Laboratory nslab.ee.ntu.edu.tw Ad Hoc Routing Finding a path Each host is also a router ? Simplest Solution Shortest path routing Ex: Distance Vector or Link State Polly@NTU7 Copyright © 2008
8
Network and Systems Laboratory nslab.ee.ntu.edu.tw Temporally-Ordered Routing Algorithm (TORA) Presented INFOCOM ’ 97 by Park and Carson Think about it as water flowing through tubes on its way to a destination Node broadcasts a QUERY packet, recipient broadcasts an UPDATE packet Polly@NTU8 Copyright © 2008
9
Network and Systems Laboratory nslab.ee.ntu.edu.tw Route Creation Example Polly@NTU9 Copyright © 2008
10
Network and Systems Laboratory nslab.ee.ntu.edu.tw Polly@NTU10 Ad Hoc On-Demand Distance Vector (AODV) Presented as Internet-Draft, Perkins and Royer, 1997 Takes the basic On-demand mechanism of Route Discovery and Maintenance from DSR Plus hop-by-hop routing, etc from DSDV Source broadcasts a Route Request packet, recipient sends back a Route Reply packet Copyright © 2008
11
Network and Systems Laboratory nslab.ee.ntu.edu.tw Polly@NTU11 AODV Example Route Request Route Reply Copyright © 2008
12
Network and Systems Laboratory nslab.ee.ntu.edu.tw Wireless MAC Polly@NTU Copyright © 2008 12
13
Network and Systems Laboratory nslab.ee.ntu.edu.tw Types of MAC Reservation Based Allocating a certain amount of resource Exclusive for a particular node Example: TDMA, FDMA, CDMA For cellular networks Random Access Sharing the channel Listen and try Example: CSMA, CSMA/CD, CSMA/CA For WiFi Polly@NTU Copyright © 2008 13
14
Network and Systems Laboratory nslab.ee.ntu.edu.tw Copyright © 2008 14 Time Division Multiple Access Access to channel in "rounds" Each station gets fixed length slot in each round Length = packet transmission time Unused slots go idle Example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle Polly@NTU
15
Network and Systems Laboratory nslab.ee.ntu.edu.tw Copyright © 2008 15 Frequency Division Multiple Access Channel spectrum divided into frequency bands Each station assigned fixed frequency band Unused transmission time in frequency bands go idle Example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle frequency bands time Polly@NTU
16
Network and Systems Laboratory nslab.ee.ntu.edu.tw Copyright © 2008 16 Carrier Sense Multiple Access CSMA: listen before transmit: If channel sensed idle: transmit entire frame If channel sensed busy, defer transmission Human analogy: don’t interrupt others! Polly@NTU
17
Network and Systems Laboratory nslab.ee.ntu.edu.tw Copyright © 2008 17 CSMA Collisions collisions can still occur: propagation delay means two nodes may not hear each other’s transmission collision: entire packet transmission time wasted spatial layout of nodes Polly@NTU
18
Network and Systems Laboratory nslab.ee.ntu.edu.tw Copyright © 2008 18 CSMA/CD (Collision Detection) CSMA/CD: carrier sensing, deferral as in CSMA Collisions detected within short time Colliding transmissions aborted, reducing channel wastage Human analogy: the polite conversationalist Polly@NTU
19
Network and Systems Laboratory nslab.ee.ntu.edu.tw Copyright © 2008 19 CSMA/CD Illustrated Polly@NTU
20
Network and Systems Laboratory nslab.ee.ntu.edu.tw Copyright © 2008 20 Collision Detection in Wireless Can’t sense all collisions in any case: Hidden terminal Signal fading goal: avoid collisions: CSMA/C(ollision)A(voidance) A B C A B C A’s signal strength space C’s signal strength Polly@NTU
21
Network and Systems Laboratory nslab.ee.ntu.edu.tw CSMA/CA Collision Avoidance 802.11 sender if sense channel idle for DIFS then transmit entire frame (no CD) if sense channel busy then 1. start random backoff time 2. timer counts down while channel idle 3. transmit when timer expires 4. if no ACK, increase random backoff interval, repeat 2. 802.11 receiver if frame received OK return ACK after SIFS (ACK needed due to hidden terminal, fading problems) Polly@NTU Copyright © 2008 21 sender receiver DIFS data SIFS ack
22
Network and Systems Laboratory nslab.ee.ntu.edu.tw Copyright © 2008 22 Really Avoiding Collisions idea: allow sender to “reserve” channel rather than random access of data frames: avoid collisions of long data frames Sender first transmits small request-to-send (RTS) packets using CSMA RTSs may still collide with each other (but they’re short) Receiver broadcasts clear-to-send CTS in response to RTS RTS/CTS heard by all nodes sender transmits data frame other stations defer transmissions Avoid data frame collisions completely using small reservation packets! Polly@NTU
23
Network and Systems Laboratory nslab.ee.ntu.edu.tw Copyright © 2008 23 CSMA/CA - Illustrated Receiver A B time RTS(A) RTS(B) RTS(A) CTS(A) DATA (A) ACK(A) reservation collision defer Polly@NTU
24
Network and Systems Laboratory nslab.ee.ntu.edu.tw Zigbee Stack AODV Identifying single path On-demand for mobile network CSMA-like MAC Listen before transmit Ack optional RTS/CTS optional Polly@NTU Copyright © 2008 24
25
Network and Systems Laboratory nslab.ee.ntu.edu.tw Polly@NTU Copyright © 2008 25 Questions?
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.