# Megalos: A Scalable Architecture for the Virtualization of Large Network Scenarios +
## 1 Introduction  
One of the main trends of ICT management nowadays is to move services once provided through physical and dedicated hardware to a virtual environment. To give some examples: firewalls, NATs, and even fully-fledged routing services quite often move from network devices landing into general-purpose hardware [1]. In some cases a significant portion of the network is replaced by its virtual counterpart. Of course, this is not always possible for several reasons, ranging from the intrinsic limitations of general purpose hardware in managing bulks of high-frequency traffic to the reluctance of migrating to the new paradigm legacy networks, which required large investments. Despite these contrary reasons, this tendency keeps growing fast. This depends on the reduced costs that a virtual network has in terms of deployment, scalability, and maintainability. Also, an enabling factor that makes this trend feasible is the presence on the market of cloud providers that allow to run thousands of virtual machines or containers in their clouds. Implementing (even partially) a complex and large network architecture in terms of the virtualization paradigm requires the support of tools that can be used to transform the description of a network scenario into a distributed virtual network composed of a number of interacting entities. This implies a consistent effort of standardization and implementation. However, the currently available platforms that allow to implement network services into a virtual environment have one or more of the following limitations (see also, Section 2.5). 1. [leftmargin=*]
2. Frequently, they are vendor-specific; i.e., they are dedicated to emulating a specific hardware. 2. They are seldom open-source. 3. They usually focus only on the virtualization of specific network functions rather than allowing the virtualization of an entire network device. 4. They usually require platform-specific configurations. Ideally, we would like to move into the virtual environment, in just one step and on an as-is basis, both the interconnections and the device configurations (e.g., their address plans). 5. They seldom allow massive virtualization activities, where huge networks with hundreds or thousands of devices are virtualized. 6. They do not allow a seamless interconnection between the virtual environment and the physical one, based on state-of-the-art and widely adopted protocols. We present Megalos (from the Greek word \(\mu\varepsilon\gamma\delta\lambda\alpha\varsigma\) that stands for \"big\" or \"large\"). It is an open-source framework that overcomes all the above limitations and can be used to virtually implement large and complex network scenarios. Megalos has the following main features. 1. It supports the implementation of large and complex virtual network scenarios consisting of a number of _virtual devices_ (VDs) where each VD may have several L2 interfaces assigned to virtual LANs. 2. It relies on Docker containers to run VDs that correspond to their physical counterparts, allowing the user to directly import their original configuration. 3. It takes advantage of an underlying distributed cluster to scale up with respect to the number of VDs that are run, leveraging Kubernetes for the management of such clusters. 4. It guarantees the segregation of each virtual LAN traffic from the traffic of other LANs, from the cluster traffic, and from Internet traffic, exploiting well known protocols (e.g., VXLAN and EVPN BGP). The paper is organized as follows. Section 2 discusses the state-of-the-art related to Megalos. In Section 3 we model our container-based virtual network and its scalability requirements. In Section 4 we illustrate the Megalos architecture, and in Section 5 we focus on its networking layer. Section 6 illustrates several use cases involving large network scenarios with thousands of VDs and LANs.