# SDN-Based Secure Common Emergency Service for Railway and Road Co-Existence Scenarios
## 7 Conclusions  
In this paper, we have proposed an SDN-based solution for common emergency service for railway and road coexistence scenarios. To the best of our knowledge, such a solution had never been proposed before and its open-source implementation is available online [23]. Moreover, we aimed to emulate and validate the developed SDN-based application through a realistic level-crossing scenario and different evaluations, involving sending emergency messages and non-emergency data packets between cars, trains, and their respective emergency servers. To validate developed common emergency services two cases were considered. Case 1 is beneficial in the scenario when no cross-communication is available between the road  
Figure 14: Dropping data packets. Figure 15: Dropping data packets. and railway domains. In this case, emergency data are first sent to emergency servers, and emergency servers distribute to all the nodes with the help of the SDN controller. In this case, the end-to-end average latency was in the range of 36.9 to 38.4 ms. In case 2, the emergency data are directly shared with cars and trains, leveraging the dedicated wireless interface to send and receive the emergency messages. In this case, the average end-to-end latency was 7.5 ms. This facilitates efficient and timely transmission of critical information during emergencies. Case 1 has higher latency compared to case 2, this is due to the additional steps involved in case 1, where the emergency packets were first sent to the SDN controller, duplicated, and then forwarded to the assigned emergency servers before being distributed to all nodes at the location. Additionally, tests with non-emergency data packets revealed that cars could only communicate with other cars and their assigned servers, while trains could communicate with other trains and their assigned servers. This shows that the developed SDN application is capable of differentiating the data between the road and railway domains. However, during an emergency situation, the emergency data packets were shared with every node in the network. To minimize the risk of DoS/DDoS situations, and improve security, the SDN-based application checks the sender's IP and MAC addresses with the SDN database and authenticates if a match is found. The node's behavior is monitored for any abnormalities like excessive messaging. If found, the node is marked as malicious and its packets are dropped. Otherwise, the emergency packet is forwarded to the primary server. If a node's IP and MAC are not available in the ONOS database, it is marked as new. Its packet is observed by the ONOS controller and sent to a secondary server. The system watches the node's behavior. If the new node behaves maliciously, such as by flooding the system with emergency messages, the ONOS application identifies this harmful behavior: its packets are dropped, and it is blocked. If it behaves normally and sends messages as per the allowed limit, it is added to the ONOS database, and its packets are processed as usual. In summary, the proposed SDN-based solution leverages the capabilities of SDN, such as centralized network control, precise traffic routing, and advanced data traffic differentiation based on VLAN tagging. This solution effectively differentiates data traffic and mitigates the risk of DoS/DDoS attacks. Future work includes developing edge emergency servers based on node geolocation. Concurrently, additional security aspects will be explored, and functionalities will be enhanced to ensure the delivery of emergency data packets during busy hours or network congestion. Conceptualization, R.S., J.S., T.S., L.M., M.S.B. and M.B. ; methodology, R.S., J.S., L.M. and M.S.B. ; software, R.S. and J.S. ; validation, R.S., J.S., L.M., T.S., M.S.B. and M.B. ; formal analysis, R.S., J.S., L.M. and M.S.B. ; investigation, R.S., L.M. and J.S. ; resources, M.S.B., L.D. and R.S. ; data curation, R.S., M.S.B. and L.M. ; writing--original draft preparation, R.S., L.M., J.S. and M.S.B. ; writing--review and editing, J.S., R.S., L.M., J.S.