cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1107
Views
28
Helpful
8
Replies

Suggestions on the importance of learning Python over Linux or both

hfakoor222
Spotlight
Spotlight

I'm going to be moving on to learning either Linux or Python or both and I am unclear on how deep to learn either one or both. I've asked this question before and it's been suggested to learn Python over Linux as a network engineer, but isn't Python deployed using Linux?

 

I have a pretty strong desire to learn Linux as I'm looking at things such as RADIUS servers, and wrapping openware inside Linux code to help it run as Firewalls and other virtual security devices. 

 

I want to learn both Linux and Python, but I want to understand, beyond Python automation scripting (I.e plugging in Python code to update multiple routers at a time, logging for multiple routers) what else can Python be used for? What else is it used for in Network engineering other than batch updates of devices configurations/logging? 

 

1 Accepted Solution

Accepted Solutions

Claudia de Luna
Spotlight
Spotlight

Hi @hfakoor222 

I think you already know its not a simple question to answer but here is how I like to break it down.  This is from a network engineers perspective.

 

First, these two are not equivalent (Linux is an operating system and Python is a programming language) and so the answer depends on what you want to do.  Given what you describe in your message you need to learn both

 

As a network engineer, even without the details you provided, I will always recommend a network engineer learn both.

 

I believe having some Unix/Linux skills is invaluable. Much of what we work on starts out as (an often stripped down version of) Linux or FreeBSD or some other UNIX variant.  Having this familiarity really gives you a head start.  More to your point, if you want to stand up a DHCP server or a RADIUS server or some other tool that is only available on Linux or simpler to deploy on Linux, you are all set.   If you have to help a user who is running Linux with their network configuration or even just to check their IP address...you will have the knowledge to do that and differentiate yourself from those who do not have that background.

 

Python is one of many programming languages available to you.  For network automation today, I firmly believe that Python is the de facto standard with the widest range of modules to help you in your automation pursuits.  It has already been pointed out that Python runs on many operating systems, including Linux.

So there you have it,  BOTH! but for different reasons and to achieve different ends.

View solution in original post

8 Replies 8

@hfakoor222 no you do not need linux to run python, you can install python on windows. Learn both, as python and linux will certainly come in useful as a network enginer (IMO).

balaji.bandi
Hall of Fame
Hall of Fame
I have a pretty strong desire to learn Linux as I'm looking at things such as RADIUS servers, and wrapping openware inside Linux code to help it run as Firewalls and other virtual security devices. 

You have a strong desire to learn Linux and Python, which is good if you can able to make it. in the future you see more and more Linux-based systems like Kubernetes / Dockers ...Cloud more to come using Linux based, this is due to cost.

 

Linux has many advantages and Python run in a simple small footprint, until windows you need a License and more installation dll (so on)

 

with Linux, you can test ( firewall(iptables) - Syslog server, radius, DNS, DHCP, CA Server...many if you looking to test).

 

Python used for many not only for automation, but you can also use or replace any other programming Language integrating with your frontend (that will be your home work what you looking to do with Python beyond)

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Claudia de Luna
Spotlight
Spotlight

Hi @hfakoor222 

I think you already know its not a simple question to answer but here is how I like to break it down.  This is from a network engineers perspective.

 

First, these two are not equivalent (Linux is an operating system and Python is a programming language) and so the answer depends on what you want to do.  Given what you describe in your message you need to learn both

 

As a network engineer, even without the details you provided, I will always recommend a network engineer learn both.

 

I believe having some Unix/Linux skills is invaluable. Much of what we work on starts out as (an often stripped down version of) Linux or FreeBSD or some other UNIX variant.  Having this familiarity really gives you a head start.  More to your point, if you want to stand up a DHCP server or a RADIUS server or some other tool that is only available on Linux or simpler to deploy on Linux, you are all set.   If you have to help a user who is running Linux with their network configuration or even just to check their IP address...you will have the knowledge to do that and differentiate yourself from those who do not have that background.

 

Python is one of many programming languages available to you.  For network automation today, I firmly believe that Python is the de facto standard with the widest range of modules to help you in your automation pursuits.  It has already been pointed out that Python runs on many operating systems, including Linux.

So there you have it,  BOTH! but for different reasons and to achieve different ends.

hfakoor222
Spotlight
Spotlight

okay thank you,

one more question

 

Beyond network automation can any one provide an example or 2 of how Python is used in Network Engineering?  Thanks

 

@hfakoor222 I've mainly used python in my job to apply configuration in bulk to multiple devices, including:-

Read a CSV file and bulk import of 1000+ network objects into a Cisco FTD (FDM) and ISE.

Login to a list of switches and apply configuration.

Login to a list of devices to backup devices.

 

Hi @hfakoor222 

 

This is my favorite question! (you might consider posting it on its own rather than hiding it in the Linux vs Python question)

 

Yes...Python as it relates to network automation is well established by now.

 

Other interesting uses:

- Documentation - I"m a consultant so I often have to review a network of some type and develop a report describing it.
- Customized text - These days you wind up working with many teams and getting a particular team exactly the information they need without any extraneous stuff is usually much appreciated.  For example, you are standing up a new site and you get a batch of subnets and you have to share that with say the WAN team and the Firewall team and the server team.  Usually you either send everyone everything or you have to manually peel off say the firewall subnet and the subnets that go behind the firewall and the WAN uplink /30 and the server /30..we have python scripts that will take all the subnets and generate 'mini reports' for each organization 
- Diagrams - its often handy to crawl CDP or LLDP and put together a quick diagram
- QA text to close out a Change Request
- Change Request text

Those are just some of the different ways Python can be used.

 

And here is a bit of a nutty one...I had to take two different spreadsheets of locations and try to match then except there was no common field. Even the addresses were slightly different!  check out FuzzyWuzzy.

If you can package your data, whatever it might be, in a structured way, you can use Python to apply your logic!

Don't get me started on what you can do with Python and REST!

Super helpful,  Thank you

That was an interesting piece, the fuzzy variable in Panda could be used to iterate over remaining non-matched values with a less strict match % and **bleep**;ysed for further matches. I will keep all of this in mind, for now then I'm going to continues with learning both Linux and Python

 

 

Thank you

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: