## 3 Proposed Method
### Proposed Architecture  
The proposed architecture (Figure 1) extends the computing functionalities usually available in remote edge and cloud datacentres in traditional VANETs architecture [11] to connected vehicles in 5G VANETs. The open network interfaces of new network paradigms like 5G VANETs enable vehicles to act as edge transport nodes with embedded network management functionalities [10].  
In contrast to the traditional VANETs architecture, vehicles are SDN-enabled in the proposed architecture. Although three main classes of IoT communications, enhanced Mobile Broadband (eMBB), massive Machine-Type Communication (mMTC), and URLLC, are found in 5G networks [13], the proposed architecture is specifically directed towards URLLC in 5G VANETs. URLLC or the critical IoT data under this category are time-sensitive and require ultra-reliable communication. In addition, the diverse nature of the traffic characteristics and sensor patterns under this category requires further classification to satisfy their unique requirements.  
Figure 1: Proposed architecture. Coloured dots on vehicles represent critical IoT sensors (e.g., Camera, LiDAR, and RADAR) commonly embedded in connected vehicles.  
The proposed architecture integrates NFV and SDN into connected vehicles in 5G VANETs to optimise QoS for the Camera, LiDAR, and RADAR sensors required for autonomous driving and other emergency scenarios, like collision avoidance. Instead of transmitting vehicular data directly to the gNB, all data generated by vehicular sensors are forwarded to a local SDN gateway embedded within the vehicle's On-Board Unit (OBU).  
The SDN gateway (Figure 2) is responsible for the initial management of vehicular sensor data using a pre-installed SDN controller algorithm. This includes packet inspection, prioritisation, and the preparation of data for further processing at the gNB. The SDN Controller algorithm ensures that packets are efficiently processed using specified QoS and forwarding logic; these are unique to the critical vehicular sensor data that are currently handled being on the network. Whilst the SDN gateway is responsible for the flow of data in the user plane, our proactive SDN controller algorithm centrally orchestrates and manages the control plane of the SDN-Enabled Vehicular Network.  
The majority of research in this field has explored QoS and resource management optimisation in 5G VANETs by placing edge datacentres at the gNB. Network slicing is at the heart of these designs, optimising QoS and resource management via the integration of NFV and SDN at gNB. The most common SDN solutions employ OpenFlow protocol at the gNB to proactively and reactively manage network operations. To extend the coverage of the edge and cloud datacentres, SDN overlay protocols like VXLAN and Internet Protocol Security (IPSEC) are often used [14].  
The extension of VXLAN technology to connected vehicles in 5G VANETs, as demonstrated in this study, offers better scalability and reliability. The implementation of fully virtualised, and distributed 5G VANET architectures involves the joint management of the VNFs deployed across various geographical locations via matching implementation policies at each location. The proposed architecture applies a novel SDN Controller algorithm via a VXLAN underlay network to enable seamless communication between VNFs hosted  
Figure 2: SDN-Enabled Vehicular Edge Network. Differently coloured sensor nodes represent service differentiation for critical IoT sensors with varying QoS requirements. Solid arrows illustrate the possible direction of communication flow on the network, whilst dotted arrows indicate local real-time data processing.  
with SDN-Enabled or Software-Defined Vehicles (SDVs) and application servers located at the gNB.