<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Developing a flexible virtual networking laboratory platform for education</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Catalina A´lvarez</string-name>
          <email>catalin@uchile.cl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>In: Proceedings of the IV School of Systems and Networks (SSN 2018)</institution>
          ,
          <addr-line>Valdivia</addr-line>
          ,
          <country country="CL">Chile</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universidad de Chile</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Giving hands-on networking experiences to engineering students is important as it strengthens knowledge and it gives a better idea of the challenges they will find in practice; it is, however, expensive and impractical to have physical equipment for the students to practice with. Hence, the idea to simulate complete physical networking laboratories using virtualization technology for use in networking education. There are a number of existing virtual laboratory alternatives, but all of them are limited in the machine images they can use. This work presents the main aspects of the design and implementation of a more flexible virtual networking laboratory platform.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>One of the biggest challenges in teaching networking is
how to bridge theory and practice. It is usual for
students to feel that both aspects of the area are
disconnected: on one side, they see protocols and algorithms,
on the other, machines and links that they simply use.
Hence, hands-on experience is valuable, and desirable,
to produce well qualified professionals that will
maintain and develop technologies in the future. Moreover,
even professionals in related areas, such as software
engineering, can benefit from experience in practical
networking, allowing them to see better how the
software they develop communicates.</p>
      <p>Laboratories are the most common way to teach
hands-on networking, either using physical equipment
or virtual versions. Both alternatives have their pros
and cons: physical laboratories allow students to touch
and interact with the same equipment they will see on
field, while virtual ones can be considered more
abstract, and are harder to visualize. On the other hand,
constructing and maintaining a physical laboratory up
to date is expensive, and, depending on the number of
students and the required courses, the time each
student can interact with the equipment is limited.</p>
      <p>Virtual networking laboratories come in two flavors:
proprietary and open source. Proprietary laboratories,
such as Cisco’s, are usually paid, and mostly focused
on teaching their own technology stack, showing
configurations, but without theorical background (as most
protocols are proprietary). Open source laboratories
are varied, with a number of objectives.</p>
      <p>
        Among famous open source networking
laboratories, we can name Marionnet[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], Netkit[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], Mininet[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
GNS-3[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], among others. Each of them, however, with
its own limitations; evaluating each platform is out
of the scope of this document, but it suffices to say
that all current virtual laboratories are limited to a
set of operating system (OS) images, mostly
Linuxbased and some networking systems such as Cisco’s
IOS or some open source alternatives.
      </p>
      <p>This fact is important because of two reasons: First,
it limits the uses of the laboratories to those of a
physical testbed, meaning, they allow the creation of
topologies and use of the protocols already installed in the
operating system, but does not allow changing those
protocols and recompiling the kernels. Second, as the
images are fixed, one either relies on the community to
keep the images up to date, or takes the matter into
their own hands and creates those images, which is
possible, but could be hard depending on one’s
knowledge and the laboratories documentation.</p>
      <p>Considering the points established previously, we
decide to design and implement an open source
networking laboratory that is flexible enough for the use
of any kernel, even custom ones, and allows the easy
inclusion of new operating system images.
3</p>
    </sec>
    <sec id="sec-2">
      <title>Related work</title>
      <p>Most of the existing networking laboratories can be
divided in two categories:
• Simulators, which model network behavior but do
not keep the internal functionalities of the
hardware; among these we can name GNS-3 and
OMNeT++. In networking, simulators mostly use
mathematical models of traffic, channels and
protocols to predict network behavior. As they only
mimic and are unable to faithfully represent all
aspects of networking, they are not interesting for
our ends.
• Emulators, which differ from simulators in the
fact that they do appear, and act as, a real
network; emulators use software to duplicate the
conditions of the original system, fact that make them
slower, but more realistic, than simulators.</p>
      <p>We focus our investigation on emulators, as they
give a more realistic approach to networking. We
present a summary of the evaluated emulators, but
first we present a small comment on virtualization
technologies, relevant to virtual laboratories. There
are several virtualization platforms and techniques,
but they all can be roughly divided in two categories:
full-virtualization platforms and para-virtualization
ones. Para-virtualization allows the guest machine to
use portions of the host machine’s kernel, including
I/O, thread and memory management, among
others, instead of emulating these operations via
software; on the other hand, full-virtualization engines
emulate the entirety of the guest machine kernel,
including costly operations such as the previously
mentioned, making this technique considerably more
resource intensive and the guests, slower. There are,
however, several advantages to full-virtualization, such
as the fact that it can virtualize all OS, with no
modifications whatsoever; on the other hand to
paravirtualize an OS it must be explicitly ported to the
para-API, which makes standard OS unable to run on
top of para-virtualization platforms. Moreover,
paravirtualization, as it uses portions of the host kernel, is
not able to emulate a different hardware architecture;
this point is critical as a number of networking
equipment, such as routers, switches and firewalls, do not
use the x86 architecture commonly found in personal
computers. Hence, we decide to use full-virtualization,
because we desire to be able to emulate as much types
of network equipment as possible, without being
restricted by the architecture or the need to port the
para-virtualization API.</p>
      <p>
        Continuing with our related work investigation;
first, we explore Xen Worlds[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and NVLab[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], both
based on Xen server, the technology used in Amazon
Web Service; all emulators based on Xen are discarded
due to the fact that Xen is a bare-metal hyper-visor,
meaning, it runs directly on hardware, with no host
operating system, which makes virtual machine
administration harder. Xen is both a para-virtualization and
full-virtualization platform, which is ideal since it
functions with para-virtualization with compatible kernels
and full-virtualization with those that are not;
however, running Xen requires a compatible kernel (which
not all Linux versions are) or the use of a commercial
version, such as Citrix’s Xen Server. Moreover, both
projects based on Xen were found to be quite old and
with no continued development or even available code.
      </p>
      <p>Next, we consider Netkit, a popular teaching
laboratory based on UML (User Mode Linux); it has a
number of pre-made laboratories, which are
considered as a base for our own, and active community
participation. However, it is not useful in protocol
experimentation, as UML uses the same kernel as the
host machine, which, naturally, means that all
laboratories are bounded to the networking implementations
found in Linux kernels, which, as mentioned before, is
not what we are looking for.</p>
      <p>Third, we explore Mininet, a network emulator
focused on SDN and Open Flow learning with an active
community and a number of fork projects. It uses
network namespaces (a containerization mechanism of the
Linux kernel that provides a way to copy the network
stack of the Linux kernel) and process based
emulation, so it only has as many tools as the Linux
kernel on top of which it is running, without support for
any stack based on Windows, BSD, or any other OS;
Mininet is a good alternative, because of its
community support, but if we want a laboratory able to
emulate all different equipment found in real networks,
we need an alternative more flexible in what operating
systems it supports.</p>
      <p>
        Finally, we find Nemu[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], based on QEMU and with
mobile simulation capabilities; it is evaluated
favorably, but presented two problems that we find pivotal
in the decision of developing a new networking
laboratory: First, its development was halted midway and
much of the functionality is unstable or poorly
documented; moreover, it is basically impossible to run,
and even its website was put down during our
development, implying that the work has been halted or
canceled. Second, as the previous emulators, uses fixed
pre-configured virtual machine images, which do not
have the flexibility desired.
      </p>
      <p>We conclude from our investigation that, in order
to allow our students to experiment with all types of
network equipment (including those which operating
system is not based on Unix platforms) we should
develop our own virtual laboratory platform.
4</p>
    </sec>
    <sec id="sec-3">
      <title>Development of the platform</title>
      <p>The platform is open-source and available for
download in https://github.com/niclabs/VirtualLabs.</p>
      <p>We decide to use QEMU/KVM for virtualization
for a number of reasons: first, in combination, they
are a full-virtualization platform that allows custom
kernels and can emulate different architectures.
Second, differently from Xen Server, QEMU/KVM work
on top of a Linux-based operating system, which
allows for easier administration of the virtual machines.
This way, the virtual laboratory platform can be run
on almost any host machine (the laboratory “server”),
as long as it has a Linux-based OS and supports
virtualization.</p>
      <p>
        The most extensive part of the design stage was
deciding how the different elements in a network topology
would be modeled; in particular, we decide to model
the most common elements find in a network:
terminals (end users), switches, routers and the links that
connect them. At this stage of the development, we
focus on open-source solutions, so we choose
Linuxbased OS for the terminals, LISA (Linux Switching
Appliance[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]) for switches, VyOS (a fork of the
Vyatta project) for routing, and standard Linux bridges
for links.
      </p>
      <p>It is important to mention that we are extremely
conscious throughout the modeling stage, and later the
implementation, that we must avoid the main pitfall
found in current virtual laboratories, their
restrictiveness, so we design the system so that it is easy to
include new networking elements such as load balancers,
firewalls, NAT servers, etc.</p>
      <p>Once we define how the different elements involved
are modeled, we design how these models are to be
implemented; in particular, how we will create the
elements of the network, meaning, the virtual machines
that are to be terminals, switches and routers. A first
approach would be to simply keep an iso image for
each operating system, but installing a virtual
machine from scratch each time one needs a terminal is
simply too time consuming. Luckily, KVM provides
“templates”, virtual machines with an installed
operating system which can be “cloned“ as many times as
necessary; machines created from the same template
do not share configurations nor disk, so they are, in
essence, different machines. Using these templates,
we can provide a number of ready to use base
terminals, switches and routers, which can be copied as
many times as necessary; moreover, including new
elements to our laboratories is just a matter of creating
new template images. The virtual machines
communicate with each other using Linux bridges defined in the
host machine, virtual network interfaces which the
machines associate to using the bridged networking mode
included in KVM. Finally, to interact with the virtual
machines, we take advantage of KVM, which provides
a VNC server to all virtualized machines.</p>
      <p>Besides the networking elements themselves, we
include the concept of a “laboratory”, which is a network
topology plus all the virtual machines with some
configurations. The network topology is represented by
an XML file, which details the network elements,
including name, type of element (terminal, router, etc.),
template the machine is based on, number of network
interface cards (which can either be named or referred
by a numerical index). The XML file also details the
links between the elements, using the network interface
cards defined in each element as the two endpoints;
it is possible to add shaping properties to each of the
links, such as delay, jitter, limited bandwidth and loss,
which are added to the bridge that models the link. To
add connection to the internet, a special type of link
is included, called an “external link”, with only one
endpoint, which, in turn, connects to a bridge that
is also associated to the physical interface of the host
machine that has internet connection.</p>
      <p>The machines of a laboratory are copied from a
template, but can be latter accessed to and modified; they
have an explanatory name (a combination of the
laboratory name and the name of the element itself) and
are kept in the hard drive of the host machine, so the
laboratory can be started and paused several times.
A possible extension to the platform is the inclusion
of start-up scripts with the machines configuration,
which would make keeping the machines unnecessary,
as each time one starts the laboratory new machines
would be created from a template, and then configured
as required.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>We present the problem of hands-on experience in
networking teaching, particularly related to the bridge
between theory and practice, and then briefly describe
why current solutions do not suffice for all ends. Then,
we present some of the current alternatives, further
detailing their characteristics and why they are
discarded; exploring this alternatives has the double
purpose of focusing our objectives and serve as inspiration
in the design and implementation of our virtual
laboratory. We present a summary of the steps taken during
development, detailing the tools used, how we choose
to model the problem and some details of the
implementation, including a summary of the most relevant
concepts require understanding the use of the virtual
laboratory platform.
6</p>
    </sec>
    <sec id="sec-5">
      <title>Future work</title>
      <p>In the future, we have three concrete objectives:
• Design a number of pre-made laboratories with
different teaching objectives in mind. We think
Netkit’s approach to laboratories is interesting,
and expect to follow similar guidelines.
• Test the virtual laboratory, using the previous
laboratory experiences, in a networking course,
and continue refining it depending on the
student’s feedback. We plan to focus in an undergrad
course since the students usually come with little
or no networking background; hence we theorize
that the students would most benefit from
practical laboratory experience when compared with
graduate students.
• Design and implement a GUI for the creation,
administration and interaction with the
laboratories, since, as commented previously, for now
we rely on VNC to interact with the virtual
machines.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Loddo</surname>
            <given-names>J</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saiu</surname>
            <given-names>L</given-names>
          </string-name>
          .
          <article-title>Marionnet: a virtual network laboratory and simulation tool</article-title>
          .
          <source>First International Conference on Simulation Tools and Techniques for Communications, Networks and Systems</source>
          .
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Pizzonia</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rimondini</surname>
            <given-names>M.</given-names>
          </string-name>
          <article-title>Netkit: network emulation for education</article-title>
          .
          <source>Software: Practice and Experience</source>
          ,
          <volume>46</volume>
          (
          <issue>2</issue>
          ),
          <fpage>133</fpage>
          -
          <lpage>165</lpage>
          .
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Huang</surname>
            <given-names>T</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jeyakumar</surname>
            <given-names>V</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lantz</surname>
            <given-names>B</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Feamster</surname>
            <given-names>N</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Winstein</surname>
            <given-names>K</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sivaraman</surname>
            <given-names>A</given-names>
          </string-name>
          .
          <article-title>Teaching computer networking with mininet</article-title>
          .
          <source>ACM SIGCOMM</source>
          .
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Peng</surname>
            <given-names>C</given-names>
          </string-name>
          , Liu B.
          <article-title>Application of GNS3 at Computer Network Teaching</article-title>
          .
          <source>Theory Research</source>
          ,
          <volume>20</volume>
          ,
          <fpage>136</fpage>
          .
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Anderson</surname>
            <given-names>B</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Joines</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daniels</surname>
            <given-names>T.</given-names>
          </string-name>
          <article-title>Xen worlds: leveraging virtualization in distance education</article-title>
          .
          <source>ACM SIGCSE Bulletin</source>
          (Vol.
          <volume>41</volume>
          , No.
          <issue>3</issue>
          , pp.
          <fpage>293</fpage>
          -
          <lpage>297</lpage>
          ).
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Autefage</surname>
            <given-names>V</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Magoni</surname>
            <given-names>D.</given-names>
          </string-name>
          <article-title>Network emulator: a network virtualization testbed for overlay experimentations</article-title>
          .
          <source>Computer Aided Modeling and Design of Communication Links and Networks (CAMAD)</source>
          ,
          <year>2012</year>
          IEEE 17th International Workshop on (pp.
          <fpage>266</fpage>
          -
          <lpage>270</lpage>
          ).
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Wannous</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nakano H. NVLab,</surname>
          </string-name>
          <article-title>a networking virtual web-based laboratory that implements virtualization and virtual network computing technologies</article-title>
          .
          <source>IEEE Transactions on Learning Technologies</source>
          ,
          <volume>3</volume>
          (
          <issue>2</issue>
          ),
          <fpage>129</fpage>
          -
          <lpage>138</lpage>
          .
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Rendec</surname>
            <given-names>R</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nicu</surname>
            <given-names>I</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Purdila</surname>
            <given-names>O</given-names>
          </string-name>
          .
          <article-title>Linux multilayer switching with LiSA</article-title>
          .
          <source>Proceedings of the 5th RoEduNet IEEE International Conference</source>
          .
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>