Most network protocols use the concept of layers to separate different components and functions into independent modules that can be assembled in different ways. ZigBee is built on the Physical (PHY) layer and Medium Access Control (MAC) sub-layer defined in the IEEE 802.15.4 standard. These layers handle low-level network operations such as addressing and message transmission/reception. The ZigBee specification defines the Network (NWK) layer and the framework for the application layer. The Network layer takes care of the network structure, routing, and security. The application layer framework consists of the Application Support sub-layer (APS), the ZigBee Device Objects (ZDO) and user-defined applications that give the device its specific functionality.