The growth in utilization of sensor networks in every field of science has compelled the research community to device a common addressing technique for sensor networks. To achieve this, we propose an addressing and naming scheme for sensors based on a hierarchical model of the sensor network in this paper. We show that, the complete scheme allows accessing and tracking sensor devices by names and inherently facilitates data aggregation. We study the performance of and optimize the hierarchical architecture and use algorithms for bounding timing delays, width and height. Finally, we suggest a gateway-based architecture to establish a secure layer above the routing protocol to perform safe communication and location tracking. From our analysis it is seen that the methodology can be adopted for various scenarios like disaster areas, habitat monitoring, target tracking, medical monitoring, battlefield, etc.