Why network engineer should learn Python - Lesson I
Network engineers think their job responsibilities are based on only the network-related stuff and no need to work with programming and coding. Today we are going to discuss, why should network engineers learn python programming language. The main reason is to automate manual tasks. Let's define it by an example. Let's think your network has more than 50 devices and you need to get the inventory of every device. To complete the task, you have to log in to every single device and run the '#show inventory' command to get the details of every device. Then copy the output to the Excel sheet and make it to a readable format. When considering a large network, this isn’t practical. By Python, you can code a script and execute it to get the inventory list and upload it into a data sheet automatically. Thus, python will save you time and a lot of manual effects. Now, let's see another example.
You have a number of switches and you need to configure VLANs and interfaces. If you follow the traditional way to configure those, it will take a longer time to complete. To simplify the configuration for all switches, we can use Python to automate the task and eliminate repetitive works by reducing the manual implementation of switch configuration. Likewise, we will be able to do network devices health checks, IOS version checks, interface status such as which interface having more network drops by Python programming.
Python can interact with SDN controllers which means you can make applications using python and API to run on SDN controllers. Visit the link to know more details about SDN > What is SDN (Software Defined Network) Next-Generation Networks. In brief, SDN separates network control and data plane. SDN controller makes network optimized as needed. The wireless controller can control APs likewise SDN controller functionality. You can manage network devices like routers and switches from a centralized location by using the SDN controller. SDN controller ex: Cisco’s APIC-EM (Enterprise SDN controller for traditional devices), APIC (Nexus 9k series) or OpenDaylight. You can write your own app to fulfill the business requirement by using python and API. Then that application can be used in the SDN controller to optimize your network.
You can also execute the Python interpreter shell on the devices such as Cisco Catalyst 3650/3850 and Nexus series. It will able to do real-time monitoring and event triggering. Python 2.x and 3.x versions are available and a concept similar to C++ OOP. This free, open-source language can be run on any platform. Linux, MAC come with pre-installed python. You have to install python for Windows > How to Install Python on Windows in 3 Simple Steps - Lesson II, However, it is not a big deal and very simple to install. The network technologies are developing rapidly and now its time to keep in touch with a programming language like python. You can easily learn Python and no program language knowledge needed.
Cheers!
No comments