In the device-device communication paradigm (D2D) in 5G networks, an efficient infrastructure is created, allowing the use of various smart urban applications, such as public safety. In future smart cities, the tight deployment of wireless sensor networks can be integrated into 5G networks using D2D communications. D2D communication provides direct communication between neighbouring user devices using cellular or special communication channels, thereby improving spectrum utilization, system capacity and network energy efficiency. This paper discusses the hierarchical communication architecture of D2D, in which the centralized Software-Defined Network controller (SDN) interacts with the Cloud Head (CH) to reduce the number of requested LTE communication channels, thereby improving power consumption. This paper considers the reliability and potential of the architecture, presenting a public safety scenario when occurs any disaster, disconnecting a part of the network. © 2018 IEEE.