## 3 Architecture Proposed
### Rina L2 VPN  
The proposed RINA L2 VPN networking solution provides a framework to deploy a network overlay on top of a RINA network in the form of Layer two (L2) networks. The L2 VPNoverlay allows non-RINA network services made up of distributed NFs to allocate flows in the underlying RINA network, without making use of the RINA API. In this way, the network service takes advantages of RINA network capabilities without the need to use the RINA APIs. This approach is useful to enable seamless communication between edge nodes and cloud applications or NFs, either in the form of Container Network Functions (CNFs) or Virtual Network Functions (VNFs). Figure 6 shows a network service formed by two NFs. RINA L2 VPN offers horizontal scalability to support several network overlays on top of a RINA network, i.e., the last DIF of the network. In this way, several L2 VPNs overlays can be deployed on top of the same DIF network depending on the network service demands. Furthermore, the solution can group several network services into a network overlay to isolate the traffic generated by these NFs. Figure 7 shows a high level representation of several independent network overlays supported in the same RINA network, as well as network services running on top of these overlays. It is important to note that RINA L2 VPN is implemented on top of netmap [30], a fast packet processing framework that enables high performance packet switching, programmable via a set of APIs at user space. That way, RINA L2 VPN is able to provide higher packet data rates than traditional Linux networking mechanisms. The HTTP-based MAs take a key role in the deployment of the RINAL2 VPN solution on cloud-based applications. These HTTP-based MAs are in charge of (i) slice allocation  
Figure 6: Generic diagram of the relevant layers involved in the RINA L2 VPN solution (front view). Figure 7: Generic diagram of the relevant layers involved in the RINA L2 VPN solution (zenithal view). and de-allocation requests, (ii) managing the creation of L2 switches using the L2 Factory Module--see Figure 8--and (iii) exposing an interface to interact with upper management layers. There is one HTTP-based MA per compute node, and its interfaces are depicted in Figure 8. The HTTP-based MA exposes a well-defined northbound interface (NBI) to the upper management layers, so the RINA SBI can interact with it. On the other hand, the HTTP-based MA exposes an SBI--the IPCP Connector in Figure 8--directly attached to the IPCP, in order to ask to allocate or de-allocate the necessary RINA flows needed to deploy a slice. This SBI is implemented using the netmap API, the endpoints exchange a domain-specific language codified using protocol buffers. The domain-specific language contains the following fields:  
1. opcode. There are six operational codes to identify which operation the remote MA should execute: * for creating an L2 overlay: M_ACK, M_ALLOCATION_REQ, M_ALLOCATION_RSP. * for deleting an overlay: M_NACK, M_DELETE_REQ, M_DELETE_RSP. 2. invoke_id. Sequence number of the message. Every pair of request-response shares the same invoke ID; hence, it is used to handle asynchronous requests and responses. 3. slice_id. Network overlay unique identifier. In RINA terminology, the slice identifier maps to the application entity, which refers to a task within an application process directly involved with exchanging application information with other application processes. In other words, it is used to identify the instance of the network overlay that the message refers to. 4. serialised_flow_msg. Serialized object value that is directly passed without any processing to the IPCP. It contains information that the IPCP needs to allocate the flow within the neighbor IPCP. The SDN controller can control the HTTP-based MAs by using the RINA SBI. The RINA SBI is responsible for requesting the needed resources to every HTTP-based MA involved in the slice. Every slice creation or deletion request is processed with the reception of an HTTP request on the REST endpoint notify of the NBI.