0% found this document useful (0 votes)
11 views

zigbee notes

Uploaded by

salemlumumba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

zigbee notes

Uploaded by

salemlumumba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Student Questions

Q on 20, 24c, 30b


Student Questions
Overview

1. Zigbee Features, Versions, Device Types, Topologies


2. Zigbee Protocol Architecture
3. Zigbee Application, Zigbee Application Support Layer
4. Network Layer, Routing: AODV, DSR
5. Zigbee Smart Energy V2

Note: This is the 3rd lecture in a series of class lectures on


IoT. Bluetooth, Bluetooth Smart, and IEEE 802.15.4 were
covered in the previous lectures.
Zigbee PRO Features
❑ Zigbee PRO: Published in 2007.
❑ Stochastic addressing: A device is assigned a random address Student Questions
and announced. The mechanism for addressing conflict ❑ In a concentrator like an coordinator?
Yes and no. Some applications (not all) have n-to-1
resolution. Parents don’t need to maintain the assigned address traffic. In those cases, the central point is called a
concentrator.
table. ❑Can you please explain
❑ Link Management: Each node maintains the quality of links to Stochastic addressing?
neighbors. Link quality is used as link cost in routing. Discussed in Slide 13-18.
Stochastic=Random
❑ Frequency Agility: Nodes experience interference report to the ❑You discuss Zigbee Pro here.
channel manager (e.g., trust center), which then selects another Then in 4-6, talk about Zigbee
channel classic. Then on Slide 7, we go
back to Zigbee Pro.
❑ Multicast The slides are out-of-order.
❑ Many-to-One Routing: To concentrator
❑ Asymmetric Link: Each node has different transmit power and
sensitivity. Paths may be asymmetric.
❑ Fragmentation and Reassembly
©2022 Raj Jain
Zigbee Overview
❑ Industrial monitoring and control applications requiring small
amounts of data, turned off most of the time (<1% duty cycle),
e.g., wireless light switches, meter readings, patient monitoring Student Questions
❑Is the channel width still 5
❑ The First standard was published in 2004 MHz?
❑ Ultra-low power, low-data rate, multi-year battery life No. Bit rates are explicitly specified
in the last point. Widths are similar.
❑ Power management to ensure low power consumption. ❑Why is it "Tri-Band"?
2.4GHz, 915 MHz, 868 MHz
❑ Less Complex. 32kB protocol stack vs 250kB for Bluetooth (Not counting country-specific
❑ Range: 1 to 100 m, up to 65000 nodes. variations)
❑So Zigbee is for tiny amounts of
❑ Tri-Band: data, but we want it to go a long
way? This seems like a particular
1. 16 Channels at 250 kbps in 2.4 GHz ISM application.
2. 10 Channels at 40 kb/s in the 915 MHz ISM band It is designed for a typical home
environment, which is too big for
(Americas) Bluetooth. This is better.
3. One Channel at 20 kb/s in European 868 MHz band ❑What does ISM stand for?
Industrial, Scientific, and Medical
➢ Also, 920 MHz in Japan, 784 MHz in China
Zigbee Overview
❑ Industrial monitoring and control applications requiring small
amounts of data, turned off most of the time (<1% duty cycle),
Student Questions
e.g., wireless light switches, meter readings, patient monitoring
❑ The first standard was published in 2004
❑ Ultra-low power, low-data rate, multi-year battery life
❑ Power management to ensure low power consumption.
❑ Less Complex. 32kB protocol stack vs 250kB for Bluetooth
❑ Range: 1 to 100 m, up to 65000 nodes.
❑ Tri-Band:
➢ 16 Channels at 250 kbps in 2.4GHz ISM

➢ 10 Channels at 40 kb/s in the 915 MHz ISM band


(Americas)
➢ One Channel at 20 kb/s in European 868 MHz band

➢ 920 MHz in Japan ©2022 Raj Jain


Zigbee Overview (Cont)
❑ IEEE 802.15.4 MAC and PHY
(Except for Zigbee Smart Energy 2.0) Student Questions
❑ Could you go over the difference between mesh
Higher layer and interoperability by Zigbee Alliance topology and router again? I'm more confused on
the idea of mesh topology.
❑ Up to 254 devices or ~216 end nodes (Applicatio ns obj ects) Mesh routing means “end-nodes” do the routing. For
example, you may forward your neighbor’s packets to
them. This has not been successful due to economic
❑ Named after the zigzag dance of the honeybees considerations. What’s in it for me?
Mesh topology is as shown. Some nodes are end nodes
The direction of the dance indicates the location of the food and some are intermediate nodes. This is quite common.

❑Is there any difference between


❑ Multi-hop ad-hoc mesh network multi-hop vs. mesh routing?
Multi-Hop Routing: message to non-adjacent nodes A chain is multi-hop but not mesh.
Mesh routing is designed to avoid
Ad-hoc Topology: No fixed topology. Nodes discover each other cycles.
❑ What is the difference between
Mesh Routing: End-nodes help route messages for others devices and simpler nodes?
End nodes are applications inside a
Mesh Topology: Loops possible device. Devices have 8-bit addresses,
and end nodes have 16-bit addresses.
It is explained in Slide 13-10. Some
device and end-nodes addresses are
reserved.
13-5
Zigbee Protocol Architecture

Student Questions
❑There is no transport layer in
Zigbee Zigbee protocol?

Interface
Application Framework Device APS is transport + session +

Public
Object presentation
App

ZDO
App App ❑Can you please highlight the
Object Object Object (ZDO) application layer?
See Slide 13-10.

Management
Application Support Sublayer (APS)
Servic
Securit

ZDO
Network Layer
y

Media Access Control (MAC)


Physical Layer
PRO Features (Cont)
❑ Power Management: Routers and Coordinators use main
power. End Devices use batteries. Student Questions
❑ Why do routers need main power? Is this because
they need to be on all the time?
❑ Security: Standard and High Yes, Exactly.

End-Devices get new security keys when they wake up.


❑ Backward Compatible:
➢ Pro-devices act as non-routing Zigbee end devices (ZEDs)
on the legacy Zigbee network.
➢ Legacy Zigbee devices act as non-routing Zigbee end-
devices on Zigbee Pro Network
Zigbee Device Types
❑ Coordinator: Selects channel, starts the network, assigns short
addresses to other nodes, transfers packets to/from other nodes Student Questions
❑ So only Reduced-Function devices can use batteries
in pro-devices?
❑ Router: Transfers packets to/from other nodes RFD’s can use main’s power or battery depending upon
their location. By they way, non-RFDs are not prohibited
from using batteries. But you will need big batteries to
❑ Full-Function Device: Capable of being a coordinator or router support the power requirements.
❑ Does the ZTC exist outside of the hub//gateway?
It is a function. Not a box. Functions can reside in any
❑ Reduced-Function Device: Not capable of being a coordinator box. Most boxes implement more than one function. ZTC

or a router  Leaf node


can reside in the hub or in the cloud.

❑Because ZTC provides security


❑ Zigbee Trust Center (ZTC): Provides security keys and keys and authentication, would it
be somewhat "safer" than
authentication Bluetooth?
❑ Zigbee Gateway: Connects to other networks, e.g., WiFi ZTC is a function. It is generally
packaged with the hub. It can be
physically secured in a locked
location. Bluetooth does not
technically have a hub. So yes.
Zigbee Topologies

Star Tree Cluster Tree Mesh Student Questions


❑ How is a topology decided on?
Decided by the users and manufacturers. Some users

E E C C E C E
don’t like trees (no redundancy). Some don’t like mesh
(looping). Some manufacturers may not support
complicated (mesh) routing to keep costs down.

C E E E E R R ❑Can there be multiple


R coordinators in the cluster tree
R E topology?
E E E E Only one as shown.
E E E ❑Do end nodes equal end devices?
E R
No. End nodes are defined in the
C Coordinator R E
next slide.
E End nodes = Application objects
R Router R
Self-Healing
E E E Star of stars =
E End-Device E E 1 level cluster tree
Zigbee Protocol Architecture (Cont)
❑ Application Objects: e.g., Remote control application.
They are also referred to as End-Point (EP). Student Questions
❑If a lightbulb or a switch is an

❑ End-Node: End device. Switch EP1 EP6 Light end-point, what sort of thing
functions as a node?
Each node can have up to 250 application objects. A light bulb can also be a wireless
hub  2 functions = 2 end points
❑ Zigbee Device Object (ZDO): Control and management of
application objects. Initializes coordinator, security service,
device, and service discovery
❑ Application Support Layer (APS): Serves application
objects.
❑ Network Layer: Route Discovery, neighbor discovery
❑ ZDO Management
❑ Security Service
Zigbee Application Layer
❑ Application layer consists of application objects (aka endpoints)
and Zigbee device objects (ZDOs) Student Questions
❑ 256 End Point Addresses: ❑ What are endpoints 241-254 reserved for?
Future use
➢ 240 application objects: Address EP1 through EP240
➢ ZDO is EP0
➢ End Points 241-254 are reserved
➢ EP255 is broadcast
❑ Each End Point has one application profile, e.g., light on/off
profile
❑ Zigbee forum has defined several profiles.
Users can develop other profiles
❑ Attributes: Each profile requires several data items. Each data
item is called an “attribute” and is assigned a 16-bit “attribute
ID” by the Zigbee forum
Zigbee Application Layer (Cont)
❑ Clusters: A collection of attributes and commands on them. A
16-bit ID represents each cluster. Commands could be Student Questions
read/write requests or read/write responses ❑ Does a device implement a set of clusters?
Yes.
❑ Cluster Library: A collection of clusters. Zigbee forum has ❑Module 12 (802.15.4) defines
defined several cluster libraries, e.g., the General cluster library "cluster" as one piconet with
contains on/off, level control, alarms, etc. some PAN ID. I wonder which
one is being used?
❑ Binding: Establishing a logical relationship (parent, child, ..) That was a cluster of devices. This
❑ ZDO: is a cluster of software and
database.
➢ Uses device and service discovery commands to discover
details about other devices.
➢ Uses binding commands to bind and unbind endpoints.
➢ Uses network management commands for network
discovery, route discovery, link quality indication, join/leave
requests
Zigbee Application Profiles
❑ Smart Energy: Electrical, Gas, and Water Meter reading
❑ Commercial Building Automation: Smoke Detectors, lights, Student Questions
… ❑Since all of these use Zigbee, is it
❑ Home Automation: Remote control lighting, heating, doors, true that all of these applications
have very small amounts of data
… associated with them?
❑ Personal, Home, and Hospital Care (PHHC): Monitor blood Yes. Note no video.
pressure, heart rate, …
❑ Telecom Applications: Mobile phones
❑ Remote Control for Consumer Electronics: In collaboration
with Radio Frequency for Consumer Electronics (RF4CE)
alliance
❑ Industrial Process Monitoring and Control: temperature,
pressure, position (RFID), …
❑ Many others
Ref: A. Elahi and A. Gschwender, “Zigbee Wireless Sensor and Control Network,” Prentice Hall, 2009, 288 pp., ISBN:0137134851,
Safari Book
http://www.cse.wustl.edu/~jaicse574-22/
Sample Zigbee Products

Student Questions
❑ Phillips Hue smart lightbulb devices are moving
away from requiring a hub. Does this mean that
devices like this are moving away from Zigbee or
are connecting in a different way?
Yes. Wi-Fi with existing access points or APs built-in the
bulbs can do the same job cheaply.
Lock Light Bulb Hub
(Kwikset) (Sengled) (Samsung)

Motion Detector Outlet Temperature Sensor


(Bosch) (Samsung) (Visonic)

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-22/ ©2022 Raj Jain


13-14
Zigbee Address Assignment
❑ Each node gets a unique 16-bit address
Student Questions
❑ Two Schemes: Distributed and Stochastic ❑Could you give some intuition
❑ Distributed Scheme: Good for tree structure behind this formula?
Graph theory. S(d)*(R-1) is
➢ Each child is allocated a sub-range of addresses. approximately the range of
addresses allocated.
➢ Need to limit maximum depth L,
Maximum number of children per parent C, and Maximum
number of routers R
➢ Address of the nth child is parent+(n-1)S(d)
Distributed Scheme Example
C d=0
S(0)=4 Student Questions
10
❑ Why address 24 is skipped here?
Corrected.
R1 R2 R3 R4 d=1
11 15 19 23 S(1)=1
L L L L L L L L d=2
12 13 16 17 20 21 24 25

❑ Max depth L=2, Routers R=4, Children C=3


❑ Coordinator: d=0. Skip
Distributed Scheme Example (Cont)
❑ Assume the address of coordinator is 10 (decimal)
❑ Address of R1 = 10+1 = 11 Student Questions
❑ Address of R2 = 10+1+S(0) = 11+4=15
❑ Address of R3 = 10+1+2*S(0) = 11+8 = 19
❑ Address of R3 = 10+1+3*S(0) = 11+12 =23
❑ Routers R1-R4 compute S(1):

❑ Children of R1 are assigned 12 and 13


❑ Children of R2 are assigned 16 and 17 C
10
R1 R2 R3 R4
11 15 19 23
L L L L L L L L L L L L
12 13 14 16 17 18 20 21 22 24 25 26
Stochastic Address Assignment
❑ Parent draws a 16-bit random number between 0 and
Student Questions
216-1 and assigns it to a new child. A new number is
drawn if the result is all-zero (null) or all-one
(broadcast). So the assigned address is between 1 and
216-2.
❑ Parent then advertises the number to the network
❑ If another node has that address, an address conflict
message is returned, and the parent draws another
number and repeats
❑ There is no need to pre-limit # of children or depth
Zigbee Routing
1. Ad-Hoc On-Demand Distance Vector (AODV)
Student Questions
2. Dynamic Source Routing (DSR)
3. Hierarchical Tree Routing
4. Many-to-one routing
Note: Zigbee does not use DSR. It is presented here for
completeness.
AODV
❑ Ad-hoc On-demand Distance Vector Routing
❑ On-demand  Reactive  Construct a route when needed Student Questions
❑ Does this route error happen when a node in the
❑ Avoids unnecessary computations if there is no traffic lowest cost path drops off between the route reply
and the sending of the packet? Or are there other
❑ Source broadcasts Route-Request (RREQ) command to all its neighbors reasons that can cause a route error?
Yes.
containing source, destination, broadcast ID
❑ Each node determines if this is a new request or if this copy has a lower cost. ❑ What is the cost function?
If yes, it makes a “reverse route” entry for the source in its table w the You define. Cost of a link =
1/bandwidth, length, or dollar cost,
previous node as the optimal reverse path.

❑ The node then checks if it has a route to the destination. If yes, it sends ❖In AODV routing, when
“route-reply” to the source. Otherwise, it forwards the request to all its exploring the correct route,
neighbors except where it came from. should we not check every
neighbor except the one that we
❑ When the source receives a “route reply,” it selects the lowest cost path and just came from?
sends the packet That would be an optimization. As
❑ If a node cannot forward the packet, it sends a “Route Error” back to the presented here, it goes to all.
source, which will re-initiate route discovery.

Next 24c
AODV Routing
❑ Routing Table: The path is not stored. Only next hop.
➢ Entry = <destination, next node, "sequence #" (timestamp)> Student Questions
❑ Route Discovery: Flood a route request (RREQ) to all ❑What are Src seq # and Dest seq
# for?
neighbors. Neighbors broadcast to their neighbors To distinguish old requests from
Src Req Dest Src Dest Hop new ones. Like time stamps.
Addr ID Addr Seq # Seq # Count
❑ Request ID is the RREQ serial number. Used to discard
duplicates.
Source sequence # is a clock counter incremented when RREQ
is sent.
Destination sequence # is the most recent sequence from the
destination that the source has seen. Zero if unknown.
AODV Routing (Cont)
❑ Intermediate nodes can reply to RREQ only if they have a route
to the destination with a higher destination sequence #
Student Questions
❑ Route reply (RREP) comes back “unicast” on the reverse path ❑If AODV only supports
symmetric, what does Zigbee
Src Dest Dest Hop Life PRO (with an asymmetric link)
Addr Addr Seq # Count Time use?
The path is used only in one
❑ Destination Sequence # is from the Destination’s counter direction. Reverse traffic finds
another path.
Lifetime indicates how long the route is valid
❑ Intermediate nodes record nodes from both RREP and RREQ if
it has a lower cost path  the reverse path
❑ Backward route to Destination is recorded if the sequence
number is higher or if the sequence number is the same and
hops are lower
❑ Old entries are timed out
AODV Routing: Example
❑ Node 1 broadcasts RREQ to 2, 3, 4:
Student Questions
"Anyone has a route to 10 fresher than 1. This is my ❑What does "fresher than 1"
broadcast #1" mean?
Here, 1 is the sequence number or
❑ Node 2 broadcasts RREQ to 1, 5, 7 time stamp.
❑What is the problem we are
❑ Node 3 broadcasts RREQ to 1, 5 trying to do here?
Node 1 is trying to find a route to
❑ Node 4 broadcasts RREQ to 1, 6 Node 10.

2 7

1 3 5 9 10

4 6 8
AODV Example (Cont)
Pkt # Pkt # Req Src Dest New Table Entry
In Out From To Message ID Seq # Seq # Hops Action at Receipient Dest Seq Hops Next
1 1 2 RREQ 1 1 1 1 New RREQ. Broadcast 1 1 1 1 Table entry at 2
2 1 3 RREQ 1 1 1 1 New RREQ. Broadcast 1 1 1 1 for node 1
3 1 4 RREQ 1 1 1 1 New RREQ. Broadcast 1 1 1 1 Table entry at 4
1 4 2 1 RREQ 1 1 1 2 Duplicate Req ID. Discard for node 1 Student Questions
1 5 2 7 RREQ 1 1 1 2 New RREQ. Broadcast 1 1 2 2 ❑ What is the packet number "in" doing?
1 6 2 5 RREQ 1 1 1 2 New RREQ. Broadcast 1 1 2 2 So you can co-relate it with packet#-out and follow the
2 7 3 1 RREQ 1 1 1 2 Duplicate ID. Discard path of a packet.
2 8 3 5 RREQ 1 1 1 2 Duplicate ID. Discard ❑ "Can you go over the table again? I was following
3 9 4 1 RREQ 1 1 1 2 Duplicate ID. Discard up to where table at 10 is updated, but not quite
after this part. Especially on how the time count is
3 10 4 6 RREQ 1 1 1 2 New RREQ. Broadcast 1 1 2 4
6.
5 11 7 2 RREQ 1 1 1 3 Duplicate ID. Discard 6 happens to be the sequence # at 10 at the time. It is
5 12 7 9 RREQ 1 1 1 3 New RREQ. Broadcast 1 1 3 7 arbitrary.
6 13 5 3 RREQ 1 1 1 3 Duplicate ID. Discard ❑ Also, what does the first column Pkt# In mean?
6 14 5 2 RREQ 1 1 1 3 Duplicate ID. Discard See above.
6 15 5 9 RREQ 1 1 1 3 Duplicate ID. Discard
6 16 5 8 RREQ 1 1 1 3 New RREQ. Broadcast 1 1 3 5 ❑What do "Dest,” "Seq," and
10 17 6 4 RREQ 1 1 1 3 Duplicate ID. Discard
18
"Next" mean in this example?
10 6 8 RREQ 1 1 1 3 Duplicate ID. Discard
12 19 9 8 RREQ 1 1 1 4 Duplicate ID. Discard These are new routing table entries
12 20 9 5 RREQ 1 1 1 4 Duplicate ID. Discard at the “To-node”. For example,
12 21 9 7 RREQ 1 1 1 4 Duplicate ID. Discard
12 22 9 10 RREQ 1 1 1 4 New RREQ. Respond 1 1 4 9
Row 1 says that the best path from
16 23 8 6 RREQ 1 1 1 4 Duplicate ID. Discard 2 to 1 is 1-hop via 1.
16 24 8 5 RREQ 1 1 1 4 Duplicate ID. Discard ❑Why is the dest seq number 6 in
16 25 8 9 RREQ 1 1 1 4 Duplicate ID. Discard
22 26 10 9 RREP 1 1 6 1 New RREP. Record and forward 10 6 1 10 the final four lines? Node 10 is
Table entry at 9
26 27 9 7 RREP 1 1 6 2 New RREP. Record and forward 10 6 2 9 for node 10 only 4 hops from node 1.
27 28 7 2 RREP 1 1 6 3 New RREP. Record and forward 10 6 3 7 Table entry at 2 Time at 10 is 6.
28 29 2 1 RREP 1 1 6 4 New RREP. Record and forward 10 6 4 2 for node 10
Washington University in St. Louis ©2022 Raj Jain
13-24a
AODV Example (Cont)
Pkt # Pkt # Req Src Dest New Table Entry
In Out From To Message ID Seq # Seq # Hops Action at Receipient Dest Seq Hops Next
1 1 2 RREQ 1 1 1 1 New RREQ. Broadcast 1 1 1 1 Table entry at 2
2 1 3 RREQ 1 1 1 1 New RREQ. Broadcast 1 1 1 1 for node 1
3 1 4 RREQ 1 1 1 1 New RREQ. Broadcast 1 1 1 1 Table entry at 4
1 4 2 1 RREQ 1 1 1 2 Duplicate Req ID. Discard for node 1 Student Questions
1
1
5
6
2 7 RREQ
2 5 RREQ
1
1
1
1
1
1
2 New RREQ. Broadcast
2 New RREQ. Broadcast
1
1
1
1
2
2
2
2
❑The line in red: is the table entry
2 7 3 1 RREQ 1 1 1 2 Duplicate ID. Discard at 10 for node 9? Is the
2 8 3 5 RREQ 1 1 1 2 Duplicate ID. Discard destination 1?
3 9 4 1 RREQ 1 1 1 2 Duplicate ID. Discard
3 10 4 6 RREQ 1 1 1 2 New RREQ. Broadcast 1 1 2 4
The entry is for destination 1. All
5 11 7 2 RREQ 1 1 1 3 Duplicate ID. Discard messages to 1 should be sent thru 9.
5 12
13
7 9 RREQ 1 1 1 3 New RREQ. Broadcast 1 1 3 7
❑The line in red: what if we have
6 5 3 RREQ 1 1 1 3 Duplicate ID. Discard
6 14 5 2 RREQ 1 1 1 3 Duplicate ID. Discard two nodes that reach the
6 15 5 9 RREQ 1 1 1 3 Duplicate ID. Discard destination node? Do we discard
6 16 5 8 RREQ 1 1 1 3 New RREQ. Broadcast 1 1 3 5
10 17 6 4 RREQ 1 1 1 3 Duplicate ID. Discard
the second arrival request? If so,
10 18 6 8 RREQ 1 1 1 3 Duplicate ID. Discard do we always choose the (next) to
12 19 9 8 RREQ 1 1 1 4 Duplicate ID. Discard be the first hop to reach the
12 20 9 5 RREQ 1 1 1 4 Duplicate ID. Discard
12 21 9 7 RREQ 1 1 1 4 Duplicate ID. Discard destination request?
12 22 9 10 RREQ 1 1 1 4 New RREQ. Respond 1 1 4 9 The second arrivals are late and so
16 23 8 6 RREQ 1 1 1 4 Duplicate ID. Discard
16 24 8 5 RREQ 1 1 1 4 Duplicate ID. Discard
not optimal. If two arrive at the
16 25 8 9 RREQ 1 1 1 4 Duplicate ID. Discard same time, either one could be
22 26 10 9 RREP 1 1 6 1 New RREP. Record and forward 10 6 1 10 Table entry at 9 recorded.
26 27 9 7 RREP 1 1 6 2 New RREP. Record and forward 10 6 2 9 for node 10
27 28 7 2 RREP 1 1 6 3 New RREP. Record and forward 10 6 3 7 Table entry at 2
28 29 2 1 RREP 1 1 6 4 New RREP. Record and forward 10 6 4 2 for node 10
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-22/ ©2022 Raj Jain
13-24b
AODV Example (Cont)
Pkt # Pkt # Req Src Dest New Table Entry
In Out From To Message ID Seq # Seq # Hops Action at Receipient Dest Seq Hops Next
1 1 2 RREQ 1 1 1 1 New RREQ. Broadcast 1 1 1 1 Table entry at 2
2 1 3 RREQ 1 1 1 1 New RREQ. Broadcast 1 1 1 1 for node 1
3 1 4 RREQ 1 1 1 1 New RREQ. Broadcast 1 1 1 1 Table entry at 4
1 4 2 1 RREQ 1 1 1 2 Duplicate Req ID. Discard for node 1 Student Questions
1 5 2 7 RREQ 1 1 1 2 New RREQ. Broadcast 1 2 2
1 6 2 5 RREQ 1 1 1 2 New RREQ. Broadcast
1
1 1 2 2
❖ Why the time at 10 is 6?
2 7 3 1 RREQ 1 1 1 2 Duplicate ID. Discard That happens to be an example. You
2 8 3 5 RREQ 1 1 1 2 Duplicate ID. Discard can use any other value.
3 9 4 1 RREQ 1 1 1 2 Duplicate ID. Discard
3 10 4 6 RREQ 1 1 1 2 New RREQ. Broadcast 1 1 2 4
❖How are the packet # IN and #
5 11 7 2 RREQ 1 1 1 3 Duplicate ID. Discard OUT numbers assigned in the
5 12 7 9 RREQ 1 1 1 3 New RREQ. Broadcast 1 3 7
13
1
AODV table?
6 5 3 RREQ 1 1 1 3 Duplicate ID. Discard
6 14 5 2 RREQ 1 1 1 3 Duplicate ID. Discard In # is repeated as many times as
6 15 5 9 RREQ 1 1 1 3 Duplicate ID. Discard the number of neighbors. Out #s
6 16 5 8 RREQ 1 1 1 3 New RREQ. Broadcast 1 1 3 5
10 17 6 4 RREQ 1 1 1 3 Duplicate ID. Discard
are sequential.
10 18 6 8 RREQ 1 1 1 3 Duplicate ID. Discard ❖Tthe Des Seq# cannot be less
12 19 9 8 RREQ 1 1 1 4 Duplicate ID. Discard than the prev dest seq#.
12 20 9 5 RREQ 1 1 1 4 Duplicate ID. Discard
12 21 9 7 RREQ 1 1 1 4 Duplicate ID. Discard No, the seq # belongs to the node
12 22 9 10 RREQ 1 1 1 4 New RREQ. Respond 1 1 4 9 first starting the message. They can
16 23 8 6 RREQ 1 1 1 4 Duplicate ID. Discard
16 24 8 5 RREQ 1 1 1 4 Duplicate ID. Discard
be lower or higher than those from
16 25 8 9 RREQ 1 1 1 4 Duplicate ID. Discard other nodes.
22 26 10 9 RREP 1 1 6 1 New RREP. Record and forward 10 6 1 10 Table entry at 9
26 27 9 7 RREP 1 1 6 2 New RREP. Record and forward 10 6 2 9 for node 10
27 28 7 2 RREP 1 1 6 3 New RREP. Record and forward 10 6 3 7 Table entry at 2
28 29 2 1 RREP 1 1 6 4 New RREP. Record and forward 10 6 4 2 for node 10
©2022 Raj Jain
Next 30b
Multicast Route Discovery
❑ Similar to unicast route discovery
Student Questions
❑ If a node receives an RREQ but is not a member of the
group or does not have the route to any member of the
group, it creates a reverse-route entry and broadcasts
the request to other neighbors
❑ If the node is a group member, it sends an RREP
message to the source and forwards it to other
neighbors. Intermediate nodes make a note of this and
set up a forward path

http://www.cse.wustl.edu/~jain/cse574-22/
Multicast Discovery Example
❑ D and E are members. B and C are not.
Student Questions
❑ A concludes that the paths are ABD and ACE ❑Why is the path ACD not
included in concludes?
We make a tree. ACD will cause a
loop.

B D
RREQ
A
RREP
C E

http://www.cse.wustl.edu/~jain/cse574-22/
Route Maintenance in AODV
❑ Each node keeps a list of active neighbors (replied to a
hello within a timeout) Student Questions
❑ If a link in a routing table breaks, all active neighbors
are informed by “Route Error (RERR)” messages
❑ RERR is also sent if a packet transmission fails
❑ RERR contains the destination sequence # that failed
❑ When a source receives a RERR, it starts route
discovery with that sequence number.
❑ Disadvantage: Intermediate nodes may send more up-
to-date but still stale routes.
❑ Ref: RFC 3561, July 2003
Dynamic Source Routing (DSR)
❑ On-Demand (reactive) routing using "Source Route. “
❑ Source Route = List of routers along the path in the packet.
❑ Routing database: Complete route to recent destinations Student Questions
❑ Each entry has an expiration period and is timed out ❑ So would the RREP be the same packet with source
and destination address flipped?
❑ If a route is not available, send a "route request" to all Almost yes. The packet type may also need to be changed
from request to reply.
neighbors
❑I wonder why Zigbee is not
Src Broadcast RREQ Req Dest Route using DSR?
Addr 255...255 ID Addr Record See AODV vs. DSR comparison in
Slide 13-32.
❑ Each neighbor adds itself to the route in the request and
forwards it to all its neighbors (only the first receipt). Does not
change the source address.
❑ If a node knows the route, it appends the rest of the route and
returns the "route reply (RREP). “
❑ RREP goes back along the recorded path
❑ All nodes record paths in RREP and RREQ. Multiple routes
cached.
DSR: Example
❑ Node 1 sends RREQ to 2, 3, 4:
"Any one has a route to 10” Student Questions
❑ Nodes 2 send RREQ to 5, 7. Note: RREQ not sent to 1.
❑ Node 3 sends RREQ to 5
❑ Node 4 sends RREQ to 6

2 7

1 3 5 9 10

4 6 8
http://www.cse.wustl.edu/~jain/cse574-22/
DSR Example (Cont)
Pkt # Pkt # From To Message Req Route Record
In Out Node Node Type ID Hops Action at Receipient in Packet
1 1 2 RREQ ew RRE1 QN.Record and forward
1 1-2
2 1 3 RREQ 1 1 New RREQ. Record and forward. 1-3
3 1 4 RREQ 1 1 New RREQ. Record and forward. 1-4
1 4 2 5 RREQ 1 2 New RREQ. Record and forward. 1-2-5
1 5 2 7 RREQ 1 2 New RREQ. Record and forward. 1-2-7
2
3
6
7
3
4
5 RREQ
6 RREQ
1
1
2 Duplicate ID. Same hops. Record and forward.
2 New RREQ. Record and forward.
1-3-5
1-4-6
Student Questions
4 8 5 8 RREQ 1 3 New RREQ. Record and forward. 1-2-5-8 ❑ Is the slide updated in the 2020 version? I don't
4 9 5 9 RREQ 1 3 New RREQ. Record and forward. 1-2-5-9 understand why packet 18 has 1-2-5-9-7 in Route
5 10 7 9 RREQ 1 3 New RREQ. Same hops. Record and forward. 1-2-7-9
Record in Packet field. Can we go over the table
6 11 5 8 RREQ 1 3 Duplicate ID. Longer Path. Discard. 1-3-5-8
again when the packet reaches node 10?
6 12 5 9 RREQ 1 3 New RREQ. Record and forward. 1-3-5-9
7 13 6 8 RREQ 1 3 New RREQ. Same hops. Record and forward. 1-4-6-8
You are right. The record in packet 18 should be 1-2-5-9-
8 14 8 6 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-5-8-6 10. Now it has been corrected.
8 15 8 9 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-5-8-9
9 16 9 8 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-5-8-9 ❑Why from node 9 to node 5
9 17 9 7 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-5-9-7
9 18 9 10 RREQ 1 4 New RREQ. Respond through route 10-9-5-2-1 1-2-5-9-10 RREQ is discarded? Is it not a
10 19 9 10 RREQ 1 4 New RREQ. Respond through route 10-9-7-2-1 1-2-7-9-10
10 20 9 8 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-7-9-8
longer path?
10 21 9 5 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-7-9-5 Node 5 discarded RREQ because it
12 22 9 10 RREQ 1 4 New RREQ. Respond through route 10-9-5-3-1 1-3-5-9-10
12 23 9 8 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-3-5-9-8 saw that RREQ in row 4. Then it
12 24 9 7 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-3-5-9-7
13 25 8 5 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-4-6-8-5 was only two hops.
13
18
26
27
8
10
9 RREQ
9 RREP
1
1
4 Duplicate ID. Longer Path. Discard.
1 Record and forward along return path
1-4-6-8-9
10-9 (1-2-5-9-10)
❑What if 9 received RREQ from
19 28 10 9 RREP 1 1 Record and forward along return path 10-9 (1-2-7-9-10) node 5 before node 7?
22 29 10 9 RREP 1 1 Record and forward along return path 10-9 (1-3-5-9-10)
27 30 9 5 RREP 1 2 Record and forward along return path 10-9-5 (1-2-5-9-10) Both are the same hops. Both are
28 31 9 7 RREP 1 2 Record and forward along return path 10-9-7 (1-2-7-9-10)
29 32 9 5 RREP 1 2 Record and forward along return path 10-9-5 (1-3-5-9-10)
recorded and forwarded regardless
30
31
33
34
5
7
2 RREP
2 RREP
1
1
3 Record and forward along return path
3 Record and forward along return path
10-9-5-2 (1-2-5-9-10)
10-9-7-2 (1-2-7-9-10)
of the order.
32 35 5 3 RREP 1 3 Record and forward along return path 10-9-5-3 (1-3-5-9-10) ❑How to decide in the exam?
33 36 2 1 RREP 1 4 Record and forward along return path 10-9-5-2-1 (1-2-5-9-10)
34 37 2 1 RREP 1 4 Record and forward along return path 10-9-7-2-1 (1-2-7-9-10) There is no arbitrary answer to
35 38 3 1 RREP 1 4 Record and forward along return path 10-9-5-3-1 (1-3-5-9-10)
http://www.cse.wustl.edu/~jain/cse574-22/ ©2022 Raj Jain
decide.
Pkt # Pkt # From To Message Req Route Record
In Out Node Node Type ID Hops Action at Receipient in Packet
1
2
3
DSR Example (Cont)
1
1
1
2 RREQ
3 RREQ
4 RREQ
ew RRE1 QN.Record and forward
1
1
1
1 New RREQ. Record and forward.
1 New RREQ. Record and forward.
1-2
1-3
1-4
1 4 2 5 RREQ 1 2 New RREQ. Record and forward. 1-2-5
1 5 2 7 RREQ 1 2 New RREQ. Record and forward. 1-2-7
2 6 3 5 RREQ 1 2 Duplicate ID. Same hops. Record and forward. 1-3-5
3 7 4 6 RREQ 1 2 New RREQ. Record and forward. 1-4-6
4 8 5 8 RREQ 1 3 New RREQ. Record and forward. 1-2-5-8
4 9 5 9 RREQ 1 3 New RREQ. Record and forward. 1-2-5-9
5
6
10
11
7
5
9 RREQ
8 RREQ
1
1
3 New RREQ. Same hops. Record and forward.
3 Duplicate ID. Longer Path. Discard.
1-2-7-9
1-3-5-8 Student Questions
6 12 5 9 RREQ 1 3 New RREQ. Record and forward. 1-3-5-9
7 13 6 8 RREQ 1 3 New RREQ. Same hops. Record and forward. 1-4-6-8 ❖In the exam, is it all right to stop
8 14 8 6 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-5-8-6
8 15 8 9 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-5-8-9 calculating table entries once the
9 16 9 8 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-5-8-9
9 17 9 7 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-5-9-7 node of interest has been
9
10
18
19
9
9
10 RREQ
10 RREQ
1
1
4 New RREQ. Respond through route 10-9-5-2-1
4 New RREQ. Respond through route 10-9-7-2-1
1-2-5-9-10
1-2-7-9-10
explored, or do we still need to
10 20 9 8 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-7-9-8 explore all other possible routes?
10 21 9 5 RREQ 1 4 Duplicate ID. Longer Path. Discard. 1-2-7-9-5
12 22 9 10 RREQ 1 4 New RREQ. Respond through route 10-9-5-3-1 1-3-5-9-10 Stop
12
12
23
24
9
9
8 RREQ
7 RREQ
1
1
4 Duplicate ID. Longer Path. Discard.
4 Duplicate ID. Longer Path. Discard.
1-3-5-9-8
1-3-5-9-7
❖Will there be AODV and SDR
13
13
25
26
8
8
5 RREQ
9 RREQ
1
1
4 Duplicate ID. Longer Path. Discard.
4 Duplicate ID. Longer Path. Discard.
1-4-6-8-5
1-4-6-8-9
tables in Exam 3?
18 27 10 9 RREP 1 1 Record and forward along return path 10-9 (1-2-5-9-10) Why not?
19 28 10 9 RREP 1 1 Record and forward along return path 10-9 (1-2-7-9-10)
22 29 10 9 RREP 1 1 Record and forward along return path 10-9 (1-3-5-9-10)
27 30 9 5 RREP 1 2 Record and forward along return path 10-9-5 (1-2-5-9-10)
28 31 9 7 RREP 1 2 Record and forward along return path 10-9-7 (1-2-7-9-10)
29 32 9 5 RREP 1 2 Record and forward along return path 10-9-5 (1-3-5-9-10)
30 33 5 2 RREP 1 3 Record and forward along return path 10-9-5-2 (1-2-5-9-10)
31 34 7 2 RREP 1 3 Record and forward along return path 10-9-7-2 (1-2-7-9-10)
32 35 5 3 RREP 1 3 Record and forward along return path 10-9-5-3 (1-3-5-9-10)
33 36 2 1 RREP 1 4 Record and forward along return path 10-9-5-2-1 (1-2-5-9-10)
34 37 2 1 RREP 1 4 Record and forward along return path 10-9-7-2-1 (1-2-7-9-10)
35 38 3 1 RREP 1 4 Record and forward along return path 10-9-5-3-1 (1-3-5-9-10)
Route Maintenance in DSR
❑ If a transmission fails, route error (RERR) is sent to
the source. It contains hosts at both ends of the link. Student Questions
❑ Can you explain how cache poisoning may occur?

❑ Intermediate nodes remove or truncate all routes with


❑What does "Source-route
that link. overhead in each packet" mean?
The packets become long if the
❑ Source may re-initiate the route discovery. source route is long.

❑ Caching multiple routes results in a faster recovery.


But the routes may be stale, resulting in cache
poisoning at other nodes.
❑ Not suitable for high-mobility environments.
❑ Source-route overhead in each packet.
❑ Ref: RFC 4728, February 2007

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-22/ ©2022 Raj Jain


13-31
AODV vs. DSR
❑ In DSR, a single RREQ can result in routes to several
destinations Student Questions
❑ In DSR, RERR messages are sent to the source, not broadcast
 Many nodes are unaware of the failure
❑ In DSR, route discovery is delayed until all cached entries have
been tried  Not suitable for high mobility
Feature DSR AODV
Routing Table Route Next Hop
Packet Route No route
Replies Multiple First only
Route Fast Slow
Deletion Local Global
Tree Hierarchical Routing
❑ All leaf nodes send the packet to their parent
Student Questions
❑ Each parent checks the address to see if it is in its ❑What does "A" mean in the
example?
subrange. A=Address
❑Why, in this example we skipped
➢ If yes, it sends to the appropriate child. 4 addresses for each router?
Address assignment was done with
➢ If not, it sends to its parent C=5 to allow 5 children per router.
We can add 3 more devices to each
❑ Example: A12 to A30. A12 → R1 → Coordinator → router in future.

R4 → A30 C
10
R1 R2 R3 R4
11 17 23 29
L L L L L L L L
A12 A13 A18 A19 A24 A25 A30 A31
Many-to-One Routing
❑ Used for sensor data collection. All data goes to a
Student Questions
concentrator or a gateway ❑Is Many-to-One Routing the
same as Source Routing?
❑ Gateway has a large memory and can hold complete No. Source routing = Complete
routes to all nodes route stored in each packet. Many-
to-one is the opposite of multicast,
which is one-to-many.
❑ But each node only remembers the next hop toward
gateway
A B C

D G
Gateway
Zigbee RF4CE
❑ Radio Frequency for Consumer Electronics (RF4CE)
consortium developed a protocol for remote control using Student Questions
wireless (rather than infrared, which requires line of sight) ❑Is the pairing process done on the
❑ RF4CE merged with Zigbee and produced the Zigbee RF4CE MAC layer?
Pairing is an application.
protocol ❑What are channels 15, 20, and 25
❑ Operates on channels 15, 20, and 25 in 2.4 GHz in 2.4 GHz? are they known?
The 2.4 GHz band is divided into 1
❑ Maximum PHY payload is 127 bytes MHz channels for frequency
hopping.
❑ Two types of devices: Remotes and Targets (TVs, DVD
Player,…)
❑ Status Display: Remote can show the status of the target
❑ Paging: You can locate the remote control using a paging
button on the target
❑ Pairing: A remote control works only with certain devices
Ref: CSA, “White paper – Understanding Zigbee Rf4ce,”
Zigbee 2030.5
❑ Formerly known as “Zigbee Smart Energy 2.”
Student Questions
❑ Monitor, control, and automate the delivery and use of
energy and water
❑ Adds plug-in vehicle charging, configuration, and
firmware download
❑ Developed in collaboration with other smart grid
communication technologies: HomePlug, WiFi, …
❑ IP based  Incompatible with previous Zigbee
Zigbee IP
❑ Uses standard IPv6 frame format.
 Allows connecting sensors directly to the Internet w/o
gateways Student Questions
❑Since Zigbee uses IPv6, does this
❑ Uses 802.15.4 PHY, MAC and Zigbee 2030.5 mean that there are not many
❑ IPv6 headers are compressed using 6LowPAN applications/uses in the United
States?
❑ RPL Routing to discover the topology All computers now come with IPv6
❑ All Internet protocols: UDP, TCP, HTTP, … can be used worldwide. IPv4 nodes can talk to
IPv6 nodes through a router.
❑ Multicast forwarding and Service discovery using multicast
DNS (mDNS) and DNS Service Discovery (DNS-SD)
❑ Security using standard protocols: TLS (Transport Layer
Security), EAP (Extensible Authentication Protocol), PANA
(Protocol for carrying Authentication for Network Access)
❑ Not compatible with other versions of Zigbee since they use a
different network layer frame format
 Need a gateway between Zigbee and Zigbee IP.
Z-Wave
❑ No relationship to Zigbee but competes with it in
Student Questions
many applications and so often confused with it ❑Is there an advantage to using Z-
Wave over Zigbee or the other
❑ Search for Zigbee devices on Amazon shows many way around?
products that support only Z-Wave, not Zigbee Zigbee is standard.

❑ Originally a proprietary protocol developed for remote


control. Now used for IoT.
❑ Now standardized by Z-Wave Alliance
❑ Uses 915/868 MHz band
❑ Many IoT hubs support Z-Wave along with Zigbee
Summary
1. Zigbee is an IoT protocol for sensors, industrial automation, Student Questions
and remote control using IEEE 802.15.4 PHY and MAC ❑ I think it would be beneficial to go over slides 3-6,
as the delayed audio made it a bit more difficult to
2. Zigbee PRO supports stochastic addressing, many-to-one follow.
Slides were discussed 2,4,5,6,3 but inserted 2,3,4,5,6. A
routing, fragmentation, and mesh topologies. corrected version has been uploaded.
❑I was wondering when did they
3. Several application profiles have been defined with control publish the latest Zigbee
and management provided by ZDOs. standard. Because I see the
Zigbee alliance changed its name
4. Application Support layer provides data and command to Connectivity Standards
communication between application objects Alliance.
5. Network layer provides addressing and routing. Addressing Starting in 2019, they started work
on Matter protocol. Matter 1.0 was
can be assigned using distributed or stochastic schemes. released on October 4, 2022.
Routing is via AODV, DSR, Tree Hierarchical, or many-to- Allows working with Amazon Alexa,
one routing. Apple Home, Google Home, etc.
❑Some links are invalid because
6. Zigbee RF4CE and Zigbee SEP2 are Zigbee protocols they point to the old name.
designed specifically for remote control and smart grid, All links have been updated today.
respectively.
Homework 13A
C
20 Student Questions
❑ When is homework 13 due?
Next Monday
R1 R2 R3

L L L L L L L L L

❑ Assuming that IEEE 802.15.4 network is being planned with a


maximum of 5 children per node to a depth of 2 levels and a
maximum of 4 routers. Compute sub-ranges to be assigned to
each router and the addresses assigned to each node in the
network, assuming the coordinator has an address of 20.
Acronyms (Cont)
❑ ISM Instrumentation, Scientific, and Medical
❑ kB Kilo byte Student Questions
❑ MAC Media Access Control
❑ MHz Mega Hertz
❑ NPDU Network Protocol Data Unit
❑ NPDU Network Service Data Unit
❑ PHHC Personal, Home, and Hospital Care
❑ PHY Physical Layer
❑ RF4CE Radio Frequency for Consumer Electronics
❑ RFC Request for Comment
❑ RFID Radio Frequency ID
❑ RREP Route Reply
❑ RREQ Route Request
❑ UWB Ultra Wide-Band
❑ WiFi Wireless Fidelity

You might also like