Skip to main content

Network Engineer should Learn Python

Network Engineer should Learn Python

Suppose you are a Network Administrator or Engineer in a company which has 20 - 30 Network devices like Cisco , Juniper or some other vendors devices. How would you manage these Devices ? Yes you do Telnet or SSH to these devices and do your configuration etc. This is a happy happy situation.

Now lets consider second scenario. Suppose you are handling multi-site company with different offices which are  distributed geographically across country and world too. You have to manage around 1000 different network devices spread around different locations. One day your boss come to you and ask you to change or add new NTP server to these network devices. Aaahhh... Yes he actually means to these 1000 devices!!! Now what will be your first reaction ? How it is possible to Login to each network device and enter the NTP command ? Yes it is possible to just grab your chair and SSH to each and every device manually and put NTP command. What an idiotic and boring thing is this ? Just to enter one command over and over again to different devices, you have to sit all day long.

Here comes the roll of Programming skills which proves to be real life savior in such scenarios. You just have to make one program which automatically login to every device and put NTP command. Seriously Dude you just have to make one program instead of doing this boring task yourself for one complete day. And yes this program can be use to enter any number of  commands to any number of devices. This is like you made it once and use forever.

OK. I think now you know what is the roll of programming skills in Networking. But second question which comes to your mind is that which programming language is best to learn for this. Today, there are hundreds of programming languages. Each language can do anything which other language can do using different syntax or logic. But Programming language are use to solve specific problem and they should be efficient in solving  that same kind of problems.

There are Programming language which are popular and efficient for WEB Applications or website like you have heard of ASP , PHP , HTML etc. Some programming languages that are used to make desktop applications are C# , JAVA etc. Some are used in embedded systems or Chips etc like C or C++.  Some programming language are used for scripting like Perl , BASH or PYTHON. Let me remind you once again that "Each language can do anything which other language can do using different syntax or logic. But Programming language are use to solve specific problem and they should be efficient in solving that same kind of problems".

Now Why to learn Python ?

I know most of the Network engineers do not have any or very less knowledge of programming languages. But Python can be your first programming language to learn. You can learn any language for networking but Python is best suited for Network engineer. Why ? Reasons are below :

  1. Python Learning curve is less. You can learn it easily.

  2. It is scripting language and can be very efficient to work with Network devices.

  3. Yes it is Free.

  4. Very large Community support which are behind Python development.

  5. You may get ready made plugins which can be use with your Python program.

  6. It can be run on Windows , Linux , Android , Mac or virtually any OS.

  7. Python Code is easy to read and it is very human friendly to read.

  8. Some Network Vendor devices come with built-in Python language Juniper, Cisco Nexus 9000 etc.

  9. Many many more.....

That's why Python can be used to manage all your Network devices whether they are less in numbers or in 1000 of numbers. Python can be used to automatically Login to your device via SSH or Telnet and run desired script or in network engineer language - Commands.

End Note: Friends You can google and find lots and lots of resources to learn Python. In near future I will post more regarding Python and how to use it to manage our Network Devices. Till than Enjoy. :)


  1. Very nicely explained. Thanks for sharing the article Sam.

  2. Good one ,,,,,,,,,, waiting for your Article

  3. Thanks for sharing about python

  4. Thanks for comment...!! Soon I will post one...!!

  5. Thanks for comment...!!!!

  6. Nice article...

  7. Thanks for comment…!!!! :)

  8. thanks for this explain

  9. Thanks for this :)

    Any suggestions where to get good materials for Python ?


Post a Comment

Popular posts from this blog

SuperPuTTY for EVE-NG

To use SuperPuTTY as default client for telnet in Eve-NG for multi tab console When we click on Router or Switch in EVE-NG by default console open in CMD. Here I posting a method to use SuperPutty with EVE-NG so that you can use TAB function of SuperPutty. You need to edit registry  Enable handling of telnet://hostname:port/ URLs on the command line. With this feature, you can now set SuperPuTTY as the default handler for Telnet URLs  If you run the Registry Editor (Start->Run->regedit.exe) and set the value in: HKEY_CLASSES_ROOT\telnet\shell\open\command to be: "\path\to\SuperPutty.exe" (with the full pathname of your SuperPuTTY executable) In my case it like this : C:\Program Files (x86)\SuperPuTTY\SuperPutty.exe %1 Second most important thing : Select "Only allow single instance of SuperPutty to run" in SuperPutty options (Tools > Options) And in GUI options , select Tab Text : "Dynamic" And Fin

Install Linux in Eve-NG

Install Linux in Eve-NG : You can choose any of Linux image from the pack below and simply upload into EVE. Download your preferred image from this link: Download Linux Images Here   (This Link is Provided by EVE - NG)     2. Download your desirable image     3. Using WinSCP or FileZilla SSH (TCP 22) to your EVE and upload downloaded image to the location:  /opt/unetlab/addons/qemu/     4. Using Putty or other telnet client, CLI SSH (TCP 22) to your EVE and go to location: cd /opt/unetlab/addons/qemu/     5. Unzip your uploaded image file, make sure you are using right name of uploaded image. Example for ubuntu desktop image below. tar xzvf linux-ubuntu-desktop-16.04.4.tar.gz     6. Remove raw zipped image file from EVE rm -f linux-ubuntu-desktop-16.04.4.tar.gz    7. Fix permissions /opt/unetlab/wrappers/unl_wrapper -a fixpermissions    6. Repeat this procedure for each downloaded image, expecting right image name in commands Ready to go images recommen

NAT Cloud in EVE-NG

NAT Cloud in EVE-NG I want to share with you how to create a NAT cloud in the EVE-NG community edition. Essentially, this is a virtual network with a DHCP server, which will allow NAT connections over the management interface of the EVE-NG VM for Internet access. Interface, DHCP Server and NAT First of all, we need to create a network which can be used in the topology. I’ll be using the predefined pnet9 interface (Cloud 9 network) for this, but any other interface will do. 1 2 3 ip address add / 24 dev pnet9 echo 1 > / proc / sys / net / ipv4 / ip_forward iptables - t nat - A POSTROUTING - o pnet0 - s / 24 - j MASQUERADE This will assign an IP address to the device, enable IP forwarding in the kernel and establish an iptables rule to NAT the traffic to the pnet0 interface, which has the management IP address assigned. Technically, the pnet devices are bridges, but for the sake of this note this does no

copy IOS from FTP server for cisco switch upgrade

These are the commands to copy IOS from FTP to Flash: Filezilla SERVER : copy ftp://username:password@ftp-server-ip/IOS-name.bin flash: Example : copy  ftp://cisco:cisco@  flash: SolarWinds SFTP & SCP Server (When we need to copy IOS to Flash using Secured channel like SCP or SFTP: copy scp://<User>:<Password>@<Server-IP>/<File-name> flash0://<File-Name>

Radius and Tacacs server for Authentication

Radius and Tacacs server for Authentication When we study for certification regarding Cisco, we encounter topic like Radius or Tacacs Server many times. You all know what are these and when to use them. But will it be beneficial to setup Radius or Tacacs authentication in real production network ? Suppose you have 20 - 30 devices and there are three network administrator handling those devices in your company. One day you get a news that one of the network engineer is leaving an organization. To comply with company's security policy, you need to delete his/her Login credentials from all 20 - 30 devices. It hardly takes 20 - 30 Min to do that. No problem ! All is well till now. Now imagine a different scenario in which you are working in even bigger organization which has around 2000 devices and has large network team around 15 - 20 Network admins. Each one of them has different access permissions on the network devices and some of them only have access permissions to limite

Eat that Frog Chapter - 1

Eat That Frog!: 21 Great Ways to Stop Procrastinating and Get More Done in Less Time by Brian Tracy Chapter - 1 - Set the Table Recently, I have started reading the book " EAT THAT FROG " by Brian Tracy. So here I am giving you the summary of the first chapter which I have recently completed. The title of the first chapter is "Set your Table" which means  Clarity of the goal that you set. Clarity is described by the author as the most important part for personal productivity. Why some people are ultra productive and other are very less productive. The reason behind is thst the ultra productive people are well focused on their goals and tasks. A major reason for procrastination to do the work is the cloud and haziness of the goal in front of your eyes. We don't have clarity about the goal. We are not certain about what we have to do and in which order . To over come this habit of procrastination, Brain Tracy has described seven step method as mentioned