The era in which a network engineer only had to manage or configure one device at a time is quickly disappearing. With the growth of network devices, the adoption of cloud, and the desire of companies to be more flexible for a competitive edge in their market, the old ways of performing network management do not work anymore.
If you examine the way devices have been managed for 20 years, you can see that there has been no good way to manage machine-to-machine communication with the network. Usually, device configuration by network engineers generally looked like the process below:
- Connect to a single device through the console port, by Telnet, or by SSH.
- Configure the device.
- Copy the configuration to Notepad.
- Search the configuration for all the parameters that need to be changed on each device.
- Edit the parameters for a particular device
- Connect to the device and copy the edited configuration back to the device.
- Repeat these steps for the next N devices.
While this method has been used for many years, it is absolutely clear that it is not optimal for larger networks. Configuring one device at a time via the CLI is extremely slow because the speed is based on human interaction as you copy and modify configurations for multiple devices. Moreover, it is not possible to avoid errors in this process and it can’t be repeatable because it involves copying and manipulating configurations for multiple devices.
Consider a network engineer who manages a small network. The engineer can manage the network devices through the CLI without too much trouble. But what happens as the network grows and more services are added? When managing so many things such as routing protocols, Spanning Tree, security policies, segmentation, and quality of service (QoS), the engineer face the issues described above.
To manage large network efficiently another approach was required. First, the engineers started to use scripts along with the CLI, later on new ideas appeared and complex network configurations were done with programming/scripting languages. Network Programmability and Automation can help engineers to solve administration problems when their network growth significantly. The common solution across the industry seems to be revolving around providing application programming interfaces (APIs), sample code, and reliable software development kits (SDKs).
Network programmability and automation sounds to be an ideal job for computers. To interact with the computers, we need a programming/scripting languages and the most favorite of them is Python.
If you are tired of logging in and typing a bunch of commands to configure your network, Python is for you. If you need to be certain that the network configuration is solid and repeatable, Python is for you. If you need to monitor, in real-time, what is happening on the network, well, Python is also for you.
- Python is an interpretive language. Interpretive means that the code executes line by line, making it easier to test and debug because you don’t have to compile the code.
- Python is flexible. Python scripts can run on a computer (Windows, macOS, or Linux), on a server, in a VM, in a container, in the cloud, and on some Cisco IOS devices. You can use Python to create scripts that can run in various places to fit the needs of your use case.
- Python is a full-featured object-oriented programming language with a standard library that includes everything needed to rapidly build powerful network applications. In addition, it has a multitude of third-party libraries and packages that extend Python to every sphere of network programming.
- Python is developed under an OSI-approved open-source license. This licensing makes it freely usable and distributed for commercial use, making it popular with developers. You can also download the source code to inspect, modify, and enhance it.
I think that after all these explanations, you have no doubts how to answer a simple question like:
Should network engineers learn Python?
Yes, definitely! Python enables you to build scripts to automate network configuration. It is the most commonly used programming language for network automation, and is a critical skill for network engineers today.
Python is a great language to automate complex network configurations. Cisco has adopted Python as their language of choice to automate network devices. Moreover, Cisco provides you an authorized course to get started with Python:
Knowledge Club Slovakia also offers some courses where you can study Python and significantly improve your skills in Python programming:
- BPP – Basic Python 3 Programming Essentials
- ILPP – Intermediate Level Python 3 Programming Language
- APP – Advanced Python Programming
- APFEN-Advanced Programming For Enterprise Networks with Python v3.0