## 1 Introduction  
Recent advances in Wireless Sensor Networks (WSNs) [1; 2], have taken a huge leap forward to achieve strict Quality of Service (QoS) requirements, consolidating it as a key technology for the Critical Infrastructure Protection (CIP) field [3]. Infrastructures such as power distribution and generation, nuclear power plants, railways, water distribution and management, can take advantage of WSN deployments to improve safety and detect structural health deficiencies. Proof of this is that the U.S. Department for Homeland Security stated, in the 2004 National Plan for Research and Development in Support for CIP, that one of the strategic goals was \"to provide a National Common Operating Picture (COP)\" for Critical Infrastructures, where the core of the systems would be an intelligent, self-monitoring, and self-healing sensor network. The Australian government, by means of the Cooperative Research Center for Security (CRC-SAFE), examined and developed solutions to security problems in CIP systems, including WSNs [4]. Finally, European projects related to CIP have also grown considerably in the last five years [5; 6]. A good example of a Critical Infrastructure where WSNs can be applied is that of railways. In these structures, it is common to check the state of the structure using specialized equipment or even install a permanent monitoring system, e.g., fiber optic instrumentation with BOTDA (Brillouin Optical Time Domain Analysis) or distributed sensor instrumentation. One of the main disadvantages of these systems is their high cost, which means that they can only be installed at a few sites. Moreover, if there is no mobile coverage then data acquired by the system cannot be sent to the remote control center to be processed or analyzed. The architecture presented in this paper can be applied to any kind of railway infrastructure, but the prototype we have developed is especially tailored to be used in a slab track system. Slab tracks are currently being studied as substitutes for traditional ballasted tracks for railways due to their advantages such as a high stability, no maintenance or long life cycle but at the expense of a higher price. Our system can be used as a permanent monitoring system and considerably reduce the cost of installation and maintenance since no wiring is required. In addition, our approach can cope with the network coverage problem and tackle the transfer of large quantities of data reliably. Sensor nodes are deployed along the infrastructure, forming clusters, taking periodic readings on the structural health and sending this information to trains passing through, which are used as data mules which in turn means that no direct connectivity to the Internet is required for the WSN. Data collected by the trains are sent to a scalable time series database that is integrated in an application which analyzes the data and shows up-to-date information about the infrastructure, detects defect evolution, warns about abnormalities, and so forth. The definition of the monitoring system was divided into two stages. The first stage was the sensor platform design. A previous paper presented the sensor platform [7] for our system. That paper described our experiences in the process to select a sensor platform which meets the system requirements. Efficient energy consumption sensors and energy harvesting systems were studied to guarantee the requirements in both the slab installation phase and the maintenance monitoring stage. The second stage which coincides with the proposal of this paper is the communication architecture definition. In this paper we propose different communication schemes and we carry out the necessary tests, meeting the system requirements, to validate the architecture. Both real and simulated results [8] have been considered. Both papers are part of a project entitled Fastrack [9] funded by the European Regional Development fund program.