0% found this document useful (0 votes)
5 views

Performance_Analysis_on_Network_Automation_Interaction_with_Network_Devices_Using_Python

This document analyzes the performance of network automation using Python for configuring Cisco devices, highlighting the significant time and error reductions achieved through automation. The study found that automated configuration took only 120 seconds for 36 devices, compared to 5797 seconds for manual configuration, with zero errors in the automated process. The findings emphasize the efficiency and reliability of using Python for network automation, making it a practical solution for network administrators.

Uploaded by

Nomaqhiza Andile
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Performance_Analysis_on_Network_Automation_Interaction_with_Network_Devices_Using_Python

This document analyzes the performance of network automation using Python for configuring Cisco devices, highlighting the significant time and error reductions achieved through automation. The study found that automated configuration took only 120 seconds for 36 devices, compared to 5797 seconds for manual configuration, with zero errors in the automated process. The findings emphasize the efficiency and reliability of using Python for network automation, making it a practical solution for network administrators.

Uploaded by

Nomaqhiza Andile
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Performance Analysis on Network Automation

Interaction with Network Devices Using Python


Aladhami Mahmood Mazin, Ruhani Ab Rahman, Murizah Kassim, Abd Razak Mahmud
Faculty of Electrical Engineering, Universiti Teknologi MARA, 40450 UiTM Shah Alam, Selangor, MALAYSIA.
[email protected], [email protected]

Abstract—Recent research has shown that 95% of network and can be used for web development on the server-side,
2021 IEEE 11th IEEE Symposium on Computer Applications & Industrial Electronics (ISCAIE) | 978-1-6654-0338-2/21/$31.00 ©2021 IEEE | DOI: 10.1109/ISCAIE51753.2021.9431823

tasks are monitored manually. This has consumed a lot of money software development, mathematics, and system scripting.
and time. Many workers need to be employed for the same tasks Python has several advantages over other programming
in network deployment. This analysis aims to identify the best languages, python works on different platforms such as
method that can improve the efficiency of scripting in Windows, Mac, Linux, Raspberry Pi, and more. It has a
configuring network devices and to find the differences in simple syntax like the English language and has a syntax that
performance in the time needed to configure network devices allows developers to write programs with fewer lines than
between manual method and automation. Network topology was some other programming languages. Pythons codes are
designed that contains 36 Cisco devices with different IOS
readable, less complicated, and easy to be learned by users [5,
versions. The topology was designed precisely to implement
automation in a practical way that can reduce the time needed
6].
for configuration with no errors. Based on data analysis from With the use of python programming for network
the emulator that mimics a realistic network environment, it is automation and abstraction, the study illustrates new methods
identified that automation is a superior method in configuring in configuring network devices by using automation and
Cisco devices because automation can save up to 99% of the time python programming language, reducing time for equipment
needed. The performance presents the automation method configuration and easier maintenance[7]. It also improves
required only 120 seconds to configure all Cisco devices network security by detecting and fixing security
compared to the manual method that required 5797 seconds.
vulnerabilities hence improving network stability. Likewise,
Besides, zero errors were reported in automation, while 2 errors
were identified in the manual method. This research is
Research shows that the used python programming language
significant and practical in helping the network administrators to implement automation to upgrade remote network devices;
to handle network configurations and automation in the procedure of upgrading network devices is time-
deployments of the network systems in an organization. consuming since the user needs to enter each Device Under
Test (DUT) and upgrade it individually. This paper provided
Keywords—Performance analysis, network automation, an automated method to upgrade remote network devices, the
python scripting, Software-defined network, Cisco DevNet. result of the study was that automation reduced the rate of
errors, and the time needed to complete the work[8]. The
I. INTRODUCTION number of devices in a network is increasing dramatically;
the traditional methods used for network equipment
Automation is becoming a trend these days due to its configuration are time-consuming and error-prone process,
tremendous benefits, especially with the increasing numbers so it is not considered a suitable option anymore, hiring new
of network devices. The word automatic is defined as acting employees to do the work is extremely expensive for large
or operate in a manner independent of external influence and companies. Hence, more and more companies nowadays are
human control[1]. Network automation offers thousands of encouraging the use of automation since it provided them
benefits to companies; it allows the configuration of many with the speed, agility, consistency, and efficiency they are
devices within minutes, eliminates the chance of miss- seeking [9].
configuration originated from human error thus can reduce The aim of this paper is to identify the best method that
operational expenses, improve security, increase productivity can improve the efficiency of scripting using Python in
rates, and most importantly, it is a cost-effective approach configuring network devices and to find the differences in the
that yields consistent results and offers flexibility and time needed to configure network devices. This analysis aims
resilience [2]. The Incident has happened in 1997 shows a to analyze the performance of the automate network
misconfiguration was reported by Florida Internet Exchange deployment that can improve the efficiency of configuring
which resulted in the period of disruption was extended network devices and to find the differences in performance in
throughout the internet. Recently, a Border Gateway Protocol the time needed to configure network devices between
(BGP) misconfiguration occurred in Pakistan resulted in manual method and automation. The performance in time and
blocking the access of YouTube worldwide for errors will be discussed based on the analyzed result which
approximately two hours[3]. would impact in Quality of Service (QoS) and management
Automation was achieved through certain uses of a in computer network.
programming language such as python language. Python has
become the most popular programming language in II. LITERATURE REVIEW
automation because it is not as complicated as java and C.
Python was selected as the year's programming language in Today, many methods for network or system automation
2007, 2010, and 2018 [4]. Python was first introduced in 1991 have been developed and the use of Python Programming

978-1-6654-0338-2/21/$31.00 ©2021 IEEE 360


Authorized licensed use limited to: Walter Sisulu University. Downloaded on June 04,2024 at 22:05:21 UTC from IEEE Xplore. Restrictions apply.
methods has been popular. One research has presented the
results from the development and testing shows that it is
possible to develop the network automation program in
Python that offers different kinds of automation in a multi-
vendor environment [10]. Trends of using the automation
concepts help very much specially to reduce time and manual
workers in computer network deployment. A recent mobile
network such as mobile operators who are planning a
transition from 4G to 5G will need to consider building a
mobile network that is more standard-based and fully
automated with a control on the complete network or
software control [11]. The virtual network function Fig. 1. The topology on the EVE-ng
deployment and service automation to provide end-to-end
quantum encryption has been designed [12]. This is due to the A. Emulator Overview
nature of network services and system automation have Emulated Virtual Environment-Next Generation (EVE-
drastically changed in recent years. New demands require NG) provides tools to be used in virtual devices to connect,
new capabilities, forcing the infrastructure to dynamically with physical and other virtual devices. EVE-NG features can
adapt to new scenarios thus many automations areas required significantly ease usability, re-usability, manageability,
such as security automation [13]. Novel network paradigms, interconnectivity, and distribution. Hence, EVE-NG will
such as software-defined networking (SDN) and network decrease the cost and time. EVE-NG is a clientless network
functions virtualization, have appeared to provide flexibility emulator that offers a user interface by browser, from the
for network management and services[14]. libraries and templates users can create network nodes that
can be connected and configured. Prerequisites: CPU: Intel
Managing network has been developed from time to time and CPU supporting Intel® VT-x /EPT virtualization Operating
it is crucial cause the demand of network is increased from System: Windows 7, 8, 10 or Linux Desktop VMware
Workstation 12.5 or later VMware Player 12.5 or later. The
time to time. Network automation on the QoS, dynamic
minimal Laptop/PC hardware requirements are illustrated in
design and control also have been implemented[15]. Building
Table. I [17].
a reliable communication network is a challenging task as the
medium for control and data acquisition networks. There TABLE I. The minimal Laptop/PC hardware
could be multiple design challenges to build such networks
Process Time
such as total-traffic, compact node design, bandwidth
limitations, packet retransmissions, delays, and drops. A CPU Intel i5/i7 (4 Logical processors), Enabled Intel
virtualization in BIOS
research has implemented a reliable HTTP based automation RAM 8Gb
network of large, interconnected microcontroller-based HDD Space 40Gb
nodes with a careful design of hardware, firmware Network LAN/WLAN
components, and a new application-layer faulty-node-filter-
algorithm. The tested system is distributed within a private B. Topology
Local Area Network (LAN) of more than 50 embedded Fig. 2 demonstrates Open shortest Path First (OSPF)
servers each of which is built out of on-chip Transfer Control topology. The network topology consists of a data center,
Protocol/Internet Protocol (TCP/IP) stacks implemented on backbone, area 1, 2, 3, and cloud. To ensure devices
Advanced RISC Machines (ARM) processors as nodes, for a connectivity Open Shortest Path First (OSPF) protocol was
successfully implemented cryogenic control network of used; OSPF is a well-known link-state IGP routing protocol
superconducting linear accelerator at inter-university and it is based on the shortest path first technology. Routing
accelerator center, New Delhi, India [16]. packets can be secured with various authentication methods,
hence only trusted routers can exchange routing information
III. METHODOLOGY [18].

Fig. 1 shows the network topology that has been


implemented to carry out the research objectives. The
network topology designed must support network automation
and not depending on the traditional way of network
configuration only. The topology needs to be configured and
verified before performing appropriate network testing.

361
Authorized licensed use limited to: Walter Sisulu University. Downloaded on June 04,2024 at 22:05:21 UTC from IEEE Xplore. Restrictions apply.
I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2,
version I86BI_LINUX-ADVENTERPRISEK9-M, Version
15.4, and I86BI_LINUX-ADVENTERPRISEK9-M, Version
15.7(3). The aim of using different router versions is to
imitate a real company scenario.

Fig. 2. OSFP demonstration Fig. 5. Multi-Area OSPF

Fig. 3 illustrates the backbone area which has two routers Fig. 6 illustrates the data center consists of three main
(R1, R5) to connect between the data center, areas 1,2,3, and devices which are console to check network connectivity,
gateway to the internet. TACACS is a connection-oriented Access Control Protocol
(ACP) that provides authorization for network administrative
operations on the network infrastructure itself [19].

Fig. 3. Backbone area components

Fig. 4 illustrates the R5 that has the Network Address


Translation (NAT); the primary function of NAT is to enable
private IP networks to connect to the internet.
Fig. 6. Datacenter components

Linux Ubuntu was used as an operating system, then it


was used to install python programming language and
libraries; python was used as a scripting language in this
study [20]. The final part of the topology is the cloud which
supplies the network with an internet connection.
C. Python installation
Fig. 7 shows the Python programming language that was
hosted by Linux.

Fig. 4. Network Address Translation (NAT)

Fig. 5 shows the automation which was implemented in Fig. 7. Python installation commands
the second part of the topology which is areas 1,2 and 3. The
routers consist of different versions which are the

362
Authorized licensed use limited to: Walter Sisulu University. Downloaded on June 04,2024 at 22:05:21 UTC from IEEE Xplore. Restrictions apply.
D. Cron
The next step to achieve automation is to use Cron which
is a Linux program, to allow the scheduled execution of
scripts and commands. The schedule used is on weekly basis.
Cron was configured using the crontab -e command to
execute the python script. Fig. 8 shows the first step is to run
the script automatically every week by Linux, then only
pingable IP addresses in the subnet have executed the script.
The script was used the Secure Shell (SSH) only with
pingable IP addresses.

Fig. 8. SSH connection to a Cisco IOS device

Fig. 9 shows an overview of the full process. Then


automation was executed on pingable IP addresses by
obtaining the hostname of the devices, the device version in
image, and uptime. Then the old enable password was
changed as well as the username and password. The data were
saved in an excel sheet and send via email as an attachment.

Fig. 9. Flow chart for an automation process

IV. RESULT AND ANALYSIS


Cisco routers and switches were configured to make a
comparison between automated configuration and manual
process in terms of time consumption, errors, and
applicability. 36 Cisco devices were configured manually,
and another 36 Cisco devices were configured automatically,
and 765 Cisco devices was checked if it was active by using
python program. The results are completely reliable because
the Cisco devices configuration was conducted in a real
scenario environment. A stopwatch was started when login to
SSH into the first Cisco device and stopped when the last
Cisco device was configured. This procedure was applied
exactly for both manual and automated configuration
process.
A. Manual configuration
The total time from the start to the end of Cisco devices
configuration in seconds was 5797 seconds which is equal to
96.6 minutes. This shows that the average time needed to
configure one Cisco device is 161.02 seconds. The detailed
time needed for each step is illustrated in Table II. During this
configuration process, two configuration errors were
identified after double-checking the configuration, the first

363
Authorized licensed use limited to: Walter Sisulu University. Downloaded on June 04,2024 at 22:05:21 UTC from IEEE Xplore. Restrictions apply.
error was an extra space in the device password, the second
error was mixed enable password in the excel sheet.

CIsco Devices
TABLE II. The time needed for the manual configuration process. 3.3 Sec
Process Time 161 Sec
Step 1 check the IP Address if pingable or not 12 Sec
Step 2 SSH (Log in) the Cisco device 21 Sec
Step 3 Change the password for the Cisco device 41 Sec 0 50 100 150 200
Step 4 Change the enable Password 23 Sec
Step 5 Show the version, hostname, and Uptime 2 Sec
Time(Second)
Step 6 Save IP Address and previous steps in 61 Sec
Excel sheet Automated configuration Manual configuration
Step 7 Send excel sheet attachment by email 37 Sec
The total time of all steps except step (7) 160 Sec
in one device
Total time × 36 Device 5.797 Sec = Fig. 11. Average time needed to configure one device.
96.61 Min

B. Automated configuration
Automation was implemented to check 765 Cisco device

Cisco Devices
activity and to configure 36 different Cisco devices; the 120 Sec
whole process from the start until the end took 120 seconds;
which means that the average time needed to configure one 5797 Sec
Cisco device is 3.33 second. No errors were identified in the
configurations by using the automation method. Fig. 10
shows the result of the excel sheet that was sent automatically 0 2000 4000 6000 8000
by email.
Time (Second)

Automated configuration Manual configuration

Fig. 12. Average time needed to configure all Cisco devices.

During the deployment in 36 Cisco devices,


misconfiguration has occurred twice. Thus, in the case of
1020 devices the risk of misconfiguration was greater, and it
is identified that 57 is the approximate estimate of
misconfiguration in a medium-sized network as shown in Fig.
13. The result presents the performance indicate that
automation can has improved by deployed the efficiency of
Fig. 10. Automated Excel Sheet from e-mail. python scripting in configuring network devices for speed
and error compared to the manual method. The performance
C. Comparison of Manual and Automated results shows the automation can save up to 5677 seconds of work
Configuration of 36 Cisco devices using the automation to configure 36 Cisco devices in a real environment. The time
method by python program saved 5677 seconds; In other saving is a crucial element that would improve the speed of
words, automation takes only 2% of the time needed to work that has been done, hence increasing productivity. Also,
configure 36 Cisco devices manually and send it by email. according to our results automation was superior to the
Fig. 11 and Fig. 12 show the comparison between automation manual method in terms of errors and misconfigurations, in
and manual procedure in terms of time needed to configure the manual method 2 errors were identified during the
36 Cisco devices. According to Cisco medium-size network configuration of 36 Cisco devices, whereas zero errors were
Provides services for 200 to 1,000 devices. Hence, for a reported by using the automation method. In a real scenario,
medium-size network containing 1020 devices, it took errors can lead to many complications and these errors need
approximately 2720 minutes, which equals 45.62 hours to to be identified and solved as a result more time will be
configure all devices. On the other hand, the same task can be consumed, hence automation method is the preferred method
achieved by using automation and it took only 2.6 minutes to configure Cisco devices because automation offers high
which equals 0.04 hours. As a result, automation can save efficiency, this method saves a lot of time and more
45.28 working hours, 99% of the time can be saved by using importantly avoids errors.
automation.

364
Authorized licensed use limited to: Walter Sisulu University. Downloaded on June 04,2024 at 22:05:21 UTC from IEEE Xplore. Restrictions apply.
3
relationship between network complexity and a high rate of
human errors, which increases the urge for implementing
automation, especially at medium and large service
Number of Errors

2 providers.
2
Manual
V. CONCLUSION
configuration
This research aimed to identify the best method that can
1 Automated improve the efficiency of scripting in configuring network
configuration devices. It also aimed to find the difference in the time needed
to configure network devices between manual method and
0
0
automation. Network topology was designed to contain 36
Type of Configuration Cisco devices. The topology was designed precisely to
implement automation in a practical way that can reduce the
time needed to configure Cisco devices and avoid errors.
Based on analysis it can be concluded that automation can
Fig. 13. Comparison between manual and automated error. tremendously improve the efficiency of the scripting in
configuring network devices in term of speed and error
It is important to note that the significance of our compared to the manual method. The performance shows the
study does not rely only on automation. In our study, the automation is a superior method in configuring Cisco devices
modern automation method saved more time compared with because automation can save up to 99% of the time needed to
the usual automation method. The reason behind this result is configure Cisco devices. For future studies, it is
the thread program that allows python to check and change recommended to implement network automation for more
passwords and report the results of each Cisco device advanced and complex network configurations. More
individually. Compared to the traditional automation method number of network devices should be included in the
cannot deal with all devices at the same time the command designed topology to resemble real enterprise networks.
was implemented on Cisco devices one by one which led to
more time consumption. Changing the passwords and enable ACKNOWLEDGMENT
passwords for a medium or large network is a challenging
task and it cannot be done regularly because the manual The authors would like to thank the Faculty of Electrical
process requires a lot of time. Based on our results, it can be Engineering for the support grant in publishing this research.
concluded that a medium network size enterprise can achieve REFERENCES
this challenging task by using automation and it took only 160
seconds for the network to contain 1020 devices. Hence [1] M. Dyer et al., "Deployment support network," in European
enterprises can change their passwords and enable passwords Conference on Wireless Sensor Networks, 2007: Springer, pp.
195-211.
regularly for example on weekly basis. This action will
[2] B. A. A. Nunes, M. Mendonca, X.-N. Nguyen, K. Obraczka,
guarantee high security for enterprise networks since the new
and T. Turletti, "A survey of software-defined networking:
passwords will be complex and consist of 12 characters. Past, present, and future of programmable networks," IEEE
Communications surveys & tutorials, vol. 16, no. 3, pp. 1617-
Our data show that by configuring 36 Cisco devices 1634, 2014.
manually 2 errors were identified which in the real world [3] G. Aceto, A. Botta, A. Pescapé, M. F. Awan, T. Ahmad, and
there are many types of misconfigurations happened. The S. Qaisar, "Analyzing internet censorship in pakistan," in 2016
first type renders a related service to be completely non- IEEE 2nd International Forum on Research and Technologies
for Society and Industry Leveraging a better tomorrow
functional, the second type renders functional but degraded
(RTSI), 2016: IEEE, pp. 1-6.
services, and the third type is the inappropriate utilization of [4] M. F. Sanner, "Python: a programming language for software
resources such as sub-optimal routing design that can lead to integration and development," J Mol Graph Model, vol. 17,
high traffic on a single link, hence leading to high loss rate. no. 1, pp. 57-61, 1999.
The primary goal of the enterprise is to minimize the rate of [5] S. Hörning and B. Haese, "RMWSPy (v 1.1): A Python code
misconfigurations and errors occurrence, which depends on for spatial simulation and inversion for environmental
several factors such as the size of the network, problem applications," Environmental Modelling & Software, p.
duration, and the time of day. However, a more effective 104970, 2021.
solution is to prevent the occurrence of these errors rather [6] J. Goerzen, T. Bower, and B. Rhodes, Foundations of Python
Network Programming: The comprehensive guide to building
than detecting and fix them because these errors and
network applications with Python. Apress, 2011.
misconfiguration are very costly. After all, they need to be [7] P. Mihăilă, T. Bălan, R. Curpen, and F. Sandu, "Network
debugged and solved by the network engineers where the Automation and Abstraction using Python Programming
process of error identification and solving is time-consuming. Methods," MACRo 2015, vol. 2, no. 1, pp. 95-103, 2017.
Oppenheimer et al have claimed that up to 75% of the time [8] K. Jambunatha, "Design and implement Automated
spent to repair is due to human errors [21]; Barroso et al. have Procedure to upgrade remote network devices using Python,"
revealed that misconfiguration is one of the main reasons in 2015 IEEE International Advance Computing Conference
behind the service–level failure at one of Google's service (IACC), 2015: IEEE, pp. 217-221.
[22]. Similarly, Amazon's cloud services, Microsoft Azure, [9] A. S. Bouhouras, G. T. Andreou, D. P. Labridis, and A. G.
Bakirtzis, "Selective automation upgrade in distribution
and Facebook had experienced multiple service disruptions
networks towards a smarter grid," IEEE Transactions on
because of misconfiguration that affected millions of their Smart Grid, vol. 1, no. 3, pp. 278-285, 2010.
clients. Hence it can be concluded that there is a direct

365
Authorized licensed use limited to: Walter Sisulu University. Downloaded on June 04,2024 at 22:05:21 UTC from IEEE Xplore. Restrictions apply.
[10] J. Larsson, "Network Automation in a Multi-vendor
Environment," ed: Digitala Vetenskapliga Arkivet, 2020.
[11] R. S. Shetty, "Automation in 5G," in 5G Mobile Core
Network: Springer, 2021, pp. 277-300.
[12] A. Aguado, V. Lopez, J. Martinez-Mateo, M. Peev, D. Lopez,
and V. Martin, "Virtual network function deployment and
service automation to provide end-to-end quantum
encryption," Journal of Optical Communications and
Networking, vol. 10, no. 4, pp. 421-430, 2018.
[13] M. A. Zainal Arifin, M. Kassim, A. R. Mahmud, and S. Izwan
Suliman, "Automation security system with laser lights alarm
on web pages and mobile apps," in ISCAIE 2019 - 2019 IEEE
Symposium on Computer Applications and Industrial
Electronics, 2019, pp. 287-292, doi:
10.1109/ISCAIE.2019.8743998.
[14] M. Ehrlich et al., "Software-defined networking as an enabler
for future industrial network management," in 2018 IEEE
23rd International Conference on Emerging Technologies
and Factory Automation (ETFA), 2018, vol. 1: IEEE, pp.
1109-1112.
[15] F. A. Daud, R. Ab Rahman, M. Kassim, and A. Idris,
"Performance of encryption techniques using dynamic virtual
protocol network technology," in ICSET 2018 - 2018 IEEE 8th
International Conference on System Engineering and
Technology, Proceedings, 2019, pp. 29-34, doi:
10.1109/ICSEngT.2018.8606381.
[16] J. Antony and T. Maity, "Analysis of Ethernet Control
Network," IETE Journal of Research, pp. 1-9, 2021.
[17] EVE-ng, "virtual-machine-install," Webpage, 2020.
Accessed: 5 Jan 2021. [Online]. Available: https://www.eve-
ng.net/index.php/documentation/ installation/virtual-
machine-install/
[18] D. Teare, B. Vachon, and R. Graziani, Implementing Cisco IP
routing (ROUTE) foundation learning guide:(CCNP ROUTE
300-101). Cisco Press, 2014.
[19] P. T. Davis, Securing and controlling CISCO Routers. CRC
Press, 2002.
[20] M. Tabassum and K. Mathew, "Software evolution analysis
of linux (Ubuntu) OS," in 2014 International Conference on
Computational Science and Technology (ICCST), 2014:
IEEE, pp. 1-7.
[21] D. Oppenheimer, A. Ganapathi, and D. A. Patterson, "Why
do Internet services fail, and what can be done about it?," in
USENIX symposium on internet technologies and systems,
2003, vol. 67: Seattle, WA.
[22] L. A. Barroso, J. Clidaras, and U. Hölzle, "The datacenter as
a computer: An introduction to the design of warehouse-scale
machines," Synthesis lectures on computer architecture, vol.
8, no. 3, pp. 1-154, 2013.

366
Authorized licensed use limited to: Walter Sisulu University. Downloaded on June 04,2024 at 22:05:21 UTC from IEEE Xplore. Restrictions apply.

You might also like