Automatic Network Configuration in Virtualized Environment Using GNS3
Automatic Network Configuration in Virtualized Environment Using GNS3
Automatic Network Configuration in Virtualized Environment Using GNS3
mantunes@dcc.fc.up.pt
Abstract—Computer networking is a central topic in computer malfunction; iii) students are not able to have these equipments
science courses curricula offered by higher education institutions. at home to practice, which may lead to a learning productivity
Network virtualization and simulation tools, like GNS3, allows loss [1].
students and practitioners to test real world networking configu-
ration scenarios and to configure complex network scenarios by The use of simulators and hypervisors for network equip-
configuring virtualized equipments, such as routers and switches, ments have emerged in the last years [3]. Networking virtual-
through each one’s virtual console. izers, like GNS3, are mostly user-friendly and allow users to
The configuration of advanced network topics in GNS3 re- configure a network device in a virtual machine running the
quires that students have to apply basic and very repetitive IP same operating system as the real network device. Network
configuration tasks in all network equipments. As the network
topology grows, so does the amount of network equipments to simulators (e.g Cisco Packet Tracer) are also graphical but
be configured, which may lead to logical configuration errors. more limited since they usually provide a subset of operating
In this paper we propose an extension for GNS3 network system commands and configuration tasks.
virtualizer, to automatically generate a valid configuration of all Basic networking topology configuration has to follow strict
the network equipments in a GNS3 scenario. Our implementation operations. First we need to define a logical IP configuration
is able to automatically produce an initial IP and routing
configuration of all the Cisco virtual equipments by using the and apply it to all connected interfaces cards of all the equip-
GNS3 specification files. We tested this extension against a set ments. Then we have to configure a routing protocol, such as
of networked scenarios which proved the robustness, readiness RIP or OSPF. Route announcements and node neighborhood
and speedup of the overall configuration tasks. In a learning establishment have to be done manually and must be consistent
environment, this feature may save time for all networking with the logical IP configuration previously made. Finally,
practitioners, both beginners or advanced, who aim to configure
and test network topologies, since it automatically produces there is also a set of general operations that have to be done,
a valid and operational configuration for all the equipments like hostname and remote access levels definition, enabling
designed in a GNS3 environment. logging and access lists definition. Depending on the amount
Keywords-Automatic configuration, GNS3, virtualization, Cisco of interface cards and equipments, these essential and basic
IOS, virtual lab classroom. configuration tasks can be very tedious, repetitive and prone
to human mistakes.
I. I NTRODUCTION For a beginner practitioner these repeated tasks are impor-
Computer networking is actually part of all the relevant tant to explore the command line and to gain experience on
computer science courses curricula that are running in higher configuring a network device. However, for more experienced
education institutions worldwide [1]. In its last revision, ones, who are able to hands-on in more advanced topics, these
ACM curriculum guidelines report for undergraduate degree initial configuration tasks are not challenging and, depending
programs in computer science [2] included Networking and on the amount of equipments involved, may be very time
Communication (NC) as a knowledge area in computer science consuming.
curricula, replacing Net-Centric Computing curricula topic In this paper we propose an extension for GNS3 to auto-
that was introduced in the revision of 2001. This measure matically generate the configuration of all the Cisco network
is explainable by the growing number of computing activities equipments that are part of a virtual topology. We take
and applications that are ubiquitous and strongly depend on advantage of the topology setup configuration files produced
the correct operation of the underlying network [2]. by GNS3 to automatically generate the nodes (e.g. routers
Learning and teaching networking topics in a classroom re- and switches) configuration files, without the need to access
quires an effective access to network equipments (e.g. routers their corresponding consoles. Our implementation is also able
and switches) so the students can have an hands-on experi- to include customized settings, like the routing protocol to be
ence with the configuration and troubleshooting of complex used and which baseline configuration should be applied. This
and heterogeneous scenarios. Such approaches have however extension for GNS3 allows beginner practitioners to produce
some weaknesses: i) setting up a computer networking lab valid configuration files that can be further analysed, repli-
may be expensive; ii) equipments become obsolete and may cated and even applied to real network equipments. For more
Table I
experienced students or practitioners this extension allows to A PPLICATIONS TESTED FOR NETWORK AUTOMATIC CONFIGURATION .
speedup the overall network configuration task in large and
complex network topologies, since they may overtake some Netomata
Solarwinds GEN-IT AutoNetKit
Config Gen.
initial and repetitive IP configuration steps. License GPL GPL Windows GPL
The rest of the paper is organized as follows. We start in Multi-vendor Yes No Yes Yes
Section II by describing and comparing the most relevant auto- Support No Yes No Yes
matic configuration solutions for networks. We then proceed in Effectiveness Yes Yes No Yes
GUI No Yes Yes Yes
Section III by detailing our proposed approach. In Section IV
we explain the major issues regarding the development. In
Section V we present and analyse the results obtained with Gen-IT is available only for Windows, is proprietary and
the use of our application in classroom lab scenarios. Finally, uses spreadsheets and templates for mass configuration. Au-
in Section VI we present the most relevant conclusions and toNetKit uses a graphical user interface for network design
delineate some directions for future work. and virtualization. It has network flow simulation and analysis
II. R ELATED W ORK functions through a web interface, which allows the visu-
alization of the designed network’s nodes and their interac-
Self-study, certification, proficiency and long-life learning tions [11]. Netomata Config Generator uses a command-line
in networking skills can be achieved by using physical equip- approach for network configuration. It is based on python
ments, but it is fundamentally done by using specific and specification files to determine the nodes and their interaction.
dedicated simulators and hypervisors [3]. We have installed, tested and evaluated these applications,
There is an evident difference between virtualization of since they are in some way, in line with our proposal to auto-
network devices [4] and simulation [5]. While simulators can matically generate a network configuration. Table I compares
be a helping hand in the initial learning stages, they become the applications in some essential features.
limited when the network topologies get more complex, both While existing applications for automatic configuration have
in size and in the protocols involved, since only a subset of interesting features, there are still many challenges and im-
features are usually available. Some examples of simulators are provements to be made. Some applications did not have
Cisco Packet Tracer or Huawei eNSP simulator [6] [7] [8]. A any documentation or user and development support. Some
different approach is provided by virtualized applications that of them did not create the bulk configuration to be loaded
are able to manage a set of virtual machines running the same into the devices, while others only allow to configure one
operating system kernel version of the real network device. equipment at a time. An important issue is related with multi-
GNS3 [9] [10] is one of the most commonly used application vendor support, since almost all the applications are only
to virtualize Cisco networks. GNS3 hypervisor, dynamips, available to Cisco operating system (IOS) or did not have any
manages a topology of internetworked Cisco devices and clarification on how can be implemented on a multi-vendor
allows the access to a virtual console port and consequently network topology.
to the Cisco IOS command line. Virtualized network topology After analysing the existing approaches for automatic con-
settings can be changed according to memory and CPU figuration and also identifying the benefits of using GNS3
configuration in the host system. Virtualized devices in GNS3 network virtualizer, we present in next section the proposed
can also interact with real routers and networks connected to approach for our work, which consists on an application that
the host system, providing full integration between virtualized can be integrated on GNS3, to automatically generate initial
and real world scenarios and thus extending the whole network configuration files.
topology [10]. Configuration files are plain text and identical
in both real and virtual routers managed by GNS3. So, GNS3 III. P ROPOSED A PPROACH
allows network practitioners to learn networking technologies In this section we propose an extension to GNS3 network
and to test real world networking configurations without the virtualizer that can automatically generate the initial configu-
need of having physical equipments. ration files of all the routers involved in a network scenario.
Besides network virtualizers and simulators, there is a wide GNS3 graphical interface allows the user to easily design
range of applications that help to automatically produce the the topology, which produces a text specification file with
configuration of network equipments. Some examples are Ne- relevant information for each object. Our application reads this
tomata Config Generator (http://www.netomata.com), configuration file and generates the Cisco IOS configuration
Gen-IT (http://gen-it.net), AutoNetKit file related to each device. The application will produce a valid
(http://autonetkit.org) and Solarwinds Network and working configuration files set, based on some general
Config Generator (http://www.solarwinds.com). settings, like the way IP addresses are chosen and which
These applications use different approaches to automate the routing protocol will be used.
generation of configuration files. Solarwinds Network Config Figure 1 illustrates the proposed architecture. After drawing
Generator only permits one router at a time configuration. the topology with GNS3, the resulting JSON project file
It allows custom templates that can be based on Solarwinds’ (.gns3) has the network topology specification, which in-
Thwack online community templates. cludes all the nodes specification and the relations between
interface __INTERFACE__
ip address __ADDRESS__ __MASK__
description __DESCRIPTION__
no shutdown
IV. D EVELOPMENT
Our application was developed on Perl, a high level all-
purpose programming language that excels on the reading and
processing of data. We took advantage on intrinsic Perl Object
Oriented Programing (OOP) features, since there is a lot of
processing and storage of data. Figure 3 illustrates how the
application is organized and which developed modules are
Figure 1. Proposed architecture.
being used, along with some relevant features.