Daintree Networks

ZigBee Routing

The following is an excerpt from Daintree's popular ZigBee Primer. 


The ZigBee routing algorithm is based on the notion of "Distance Vector" (DV) routing, in which each ZigBee router that participates in the relaying of frames from a particular source to a particular destination maintains a routing table entry for the route. This entry, as a minimum, records both a "logical distance" to the destination and the address of the next router in the path to that destination.

Routing problem 

Routes are established on-demand using a route discovery process in which the originating device broadcasts a route request command and the destination device sends back a route reply. 

Route request        Route reply

Once routing table entries are established the route may be used at will.

Routing table entry 

There are a number of optimizations to the basic algorithm available, which serve to reduce the RAM devoted to routing tables and, in some cases, the network traffic required to establish routes. In a device that implements the ZigBee feature set, network addresses are distributed in a hierarchical manner starting with the ZigBee coordinator (ZC). In this case, devices with little or no routing capacity, or devices whose routing capacity has been exhausted, have the option of using the address hierarchy to provide a less efficient but nonetheless usable route.

Tree routing

In many, perhaps in most, wireless embedded networking applications, there is a distinguished device, often called an "aggregator", to which every other device in the network must send data on a regular basis. The aggregator is shown in blue in the figure below. In order to prevent every device in the network from having to discover the aggregator separately, the ZigBee PRO feature set provides a special case of route discovery, in which a single route request broadcast from the aggregator establishes an entry with the aggregator as a destination in the routing tables of every router in the network.

Many to one

In large networks, problems can also arise when the aggregator needs to address each device in the network separately. Imagine a network in which the aggregator has only a few neighbors, each of which is the next hop in the path from the aggregator to a large number of other devices. The routing tables of these few neighbors will be overburdened simply because of their proximity to the aggregator. The ZigBee PRO feature set introduces another style of routing, known as source routing, to solve this problem. Whereas in DV routing the routing information is stored in routing tables in the devices that participate in relaying the frame, source routing puts the routing information in the frame itself. Thus only the originator of the frame, in this case the aggregator, needs to maintain an entry for the route, but this routing table entry needs to store the entire path from the aggregator to the destination. ZigBee PRO uses a route record command, sent from the intended destination back to the aggregator, to record the path. Thereafter, data frames may be sent along that path using source routing.

Route record