Episode Transcript
Available transcripts are automatically generated. Complete accuracy is not guaranteed.
Speaker 1 (00:00):
Welcome to the deep dive. We're here to cut through
the noise and get straight to what matters. And today, Wow,
we're jumping into a really big shift happening right now
in it specifically network engineering. The old roles, the way
things were always done, it's all changing and changing really fast.
So our mission today is basically to give you a
shortcut a way to understand this whole transformation. We're looking
(00:22):
at how Python Linux are becoming well essential tools for
automating networks. We're drawing on insights from introduction to Python
network automation and you know, other solid sources. Think of
this as your guide to the skills, the mindset, and yeah,
the practical stuff you need to become what people are
calling a hybrid engineer. Okay, so let's unpack this. Think
back maybe ten years, maybe a bit more, the traditional
(00:43):
network engineer role. What did that look like. You were
probably you know, knee deep in installing kit, configuring lands wands,
a real master of OSPF, e I, g RP, BGP,
all that good stuff. Your world was pretty much OSI
layers one through four, right happy in that specific bubble.
Speaker 2 (01:00):
Yeah, definitely. And Cisco Systems, I mean they were the
name the one stop shop for pretty much everything network
related for a long long time. Absolutely, but it's it's
fascinating how quickly things started to shift. You had these
disruptive forces appearing. Virtualization started getting big software to define
networking SDN, those concepts started bubbling up, and then for
some open source tools really took off. Now automation itself,
(01:23):
I mean that's not new, right, goes way back to
the Industrial Revolution, nineteen hundred stuff. But today, yeah, it's
the hot topic, not just networking, but security, data center, cloud,
you name it. It's fundamental now.
Speaker 1 (01:36):
Yeah, it really is. And here's something our sources really
drive home. Kind of a stark reality. If you're just
relying on let's say, passive learning in this market, the
future looks a bit grim. It feels like history repeating itself.
You know, adapt or well or get left behind. Yeah, exactly.
And the core change is that network devices themselves are
moving from physical boxes to virtual things. And here's the kicker.
(01:58):
They're increasingly controlled by AP application programming interfaces. Think about
VMware's NSX or Cisco's ACI. These aren't just products. They
show this massive shift in.
Speaker 2 (02:09):
Architecture precisely and That's exactly why this idea of a
hybrid engineer isn't just like a nice to have anymore.
It's becoming essential. We're talking about people who, yes, have
their deep knowledge in their main areas a networking, but
then they stretch, they build skills in other vital areas
like Linux and coding, Python, maybe go. It creates the
sort of T shaped knowledge profile, deep expertise but broad
(02:33):
adaptability T shaped.
Speaker 1 (02:35):
I like that. It paints a good picture. Okay, so
let's focus on the tool that seems to be at
the absolute center of this. Python. Its popularity has just exploded.
I mean some reports show at overtaking Java, JavaScript and
developer preference. From your perspective, what is it about Python
that makes it the go to language for network automation.
Speaker 2 (02:53):
Well, it's a combination of things. Really. Python hits this
sweet spot between being simple enough to get started but
powerful enough to do complex things. It's got that reputation
for a low barrier to entry, right, anyone can basically
start learning. But and this is important, there's a misconception
there easy to start, yes, truly proficient that takes real persistence, passion,
(03:16):
Even you can't just watch videos passively. You need projects,
you need real problems you want to solve with code.
That's what keeps you going because fundamentally automation means writing
code lines of instructions. AI is amazing, but it's not
yet at the point where it can just replicate the
intuition and experience of a seasoned network engineer. You still
need the logic.
Speaker 1 (03:36):
That's a really critical point. So the human understanding the
logic crafting that's still key even with AI coming along.
It's about using code to solve problems intelligently exactly. So
to do that you need Python's building blocks. What are
some of those core concepts that really give a network
engineer automation power.
Speaker 2 (03:53):
Okay, think of it this way. Python is how you
talk to your network now and when you get data
back from devices. It comes in different shait papes for
network tasks. Honestly, two data structures are your absolute work courses,
lists and dictionaries.
Speaker 1 (04:08):
Lists and dictionaries.
Speaker 2 (04:09):
A list is perfect when you need an ordered sequence,
like say, all the interface names on a switch, just
a simple list. A dictionary, though, is perfect for configuration.
You have a key like host name and a value
like rooter one or lan ten, name is the key,
sales is the value.
Speaker 1 (04:26):
Ah key value pairs, got it right.
Speaker 2 (04:28):
If you get comfortable manipulating those two lists and dictionaries,
you've honestly tackled maybe eighty percent of the data wrangling
you'll do in network automation.
Speaker 1 (04:36):
That makes immediate sense. Lists for sequences, dictionaries for configs
very practical. What about making scripts smart? Making decisions?
Speaker 2 (04:43):
Right, that's where your control statements and loops come in
super important. You've got if, l if and else that
lets your script decide, okay, if this interface status is down,
then I need to log it and maybe send an.
Speaker 1 (04:54):
Alert conditional logic exactly.
Speaker 2 (04:56):
And then you have loops like four loops and wild loops.
These are amazing for repetitive stuff. Imagine configuring the same
description on say fifty switch ports. A four loop handles
that beautifully. No more copy pasting fifty times.
Speaker 1 (05:11):
Oh yeah, I can see the appeal there immediately.
Speaker 2 (05:13):
These loops and conditions they make your scripts dynamic, They react,
they repeat intelligently. They're not just static command centers.
Speaker 1 (05:20):
So building intelligence into the script itself, and as scripts
get bigger, organization must become pretty important. Right. That's modules
and packages.
Speaker 2 (05:27):
Absolutely critical, especially if you're working in a team or
just want to reuse your code later. Think of a
module as basically just a single Python file, a dot
piy file. It might contain a few functions you wrote
for a specific task, like getting neighbor information from a router.
Speaker 1 (05:43):
Okay.
Speaker 2 (05:43):
A package is like a folder full of related modules.
It helps you structure bigger projects. Maybe you have a
package for Cisco iOS tasks, another for Juniper Geno's tasks.
Keeps things neat reusable.
Speaker 1 (05:54):
Like libraries of your own tools.
Speaker 2 (05:56):
Exactly. One more thing here, error handling. It absolutely must
learn how to use try and accept blocks. Networks are messy,
devices might not respond, files might be missing. Your script
needs to handle that gracefully with try accept, not just
you know, crash and burn makes your automation robust.
Speaker 1 (06:14):
Robustness yeah, key for anything production. Okay, So Python gives
us the language, the data, structure, is the logic, the organization.
But where does this code actually live and run? That
leads us to Linux, doesn't it? And I have to
admit I really wish I'd taken Linux more seriously much
earlier in my career. It felt like this niche thing back.
Speaker 2 (06:33):
Then you're definitely not alone there. It's a common regret
because while Windows, yeah, it dominates desktops, linuxes without a
doubt the default OS for serious enterprise level automation period.
Speaker 1 (06:44):
Why is that? What makes it the go to?
Speaker 2 (06:45):
It's a flexible, it's usually more performance for server tasks,
it's often more cost effective and has a really strong
security posture when configured right. It's just built for running
these kinds of back end services, automation engines, and yeah,
your Python scripts.
Speaker 1 (07:00):
So for a network engineer who isn't aiming to become
a full time Linux ADMN, what are the must know
fundamentals the essentials?
Speaker 2 (07:08):
Great question. You need to be comfortable on the command line,
that's number one. Knowing a bit about its U and
IX roots helps because many commands are the same across
different versions or distributions like a Buntu or cinos.
Speaker 1 (07:22):
Right, the different flavors exactly.
Speaker 2 (07:24):
You need to navigate the directory structures. Nowhere common config
files live because on Linux almost everything is a text file,
which means you need to get good with a command
line text editor like v or Nano. Essential for making
quick changes on a server without a GUI.
Speaker 1 (07:38):
Okay, command line directories, text editors, what else.
Speaker 2 (07:41):
Basic system checking and management commands things like l's t
CE files cat or less to view files, seep A copy,
MB to move or rename standard stuff. Then networking commands
are vital ep editors to see interface configs, replacing the
older if can fig and netstat is super useful for
seeing what ports are open, what services.
Speaker 1 (07:59):
Are listening, checking connectivity listening ports yea.
Speaker 2 (08:02):
And crucially, you'll likely need to install and manage some
basic network services on your Linux box to support your automation,
things like a TFTP server I mean an FTP server
using vsftpd and definitely an NTP server using Krony to
keep time synchronized. This lets you build your own little
all in one lab server, which is often what your
(08:24):
network devices will interact with for things like image transfers
or can fig backups.
Speaker 1 (08:29):
So the goal isn't Linux mastery necessarily, not at all.
It's about having the confidence and the core skills to
operate that Linux environment where your automation runs right without
breaking things.
Speaker 2 (08:40):
That's the sweet spot exactly. You need to be competent
enough to manage your automation platform effectively.
Speaker 1 (08:45):
Okay, makes sense now, you the listener might be thinking
this sounds powerful, but theory is one thing, and our
sources really hammer this home. If you do not build
your lab yourself, then you will not know how everything works.
Just watching videos that passive learning it's not good enough.
You absolutely have to get your hands dirty build it yourself.
Speaker 2 (09:03):
Couldn't agree more. And virtualization is your absolute best friend here.
It's how you build that playground. You need to understand
the basic types. There are Type one hypervisors, the bare
metal ones like VMware ESXi you find in data centers,
and then type two, which run like an application on
your desktop OS, perfect for labs and experiments. VMware Workstation
Pro is a really popular powerful Type two option lets
(09:26):
you build complex labs just on your own PC.
Speaker 1 (09:28):
Okay, so workstation pro for the environment. What about the
network devices themselves? Can you run routers and switches virtually?
Speaker 2 (09:35):
Absolutely? That's where tools like GNS three come in. Genius
theory is fantastic. It started with dynamips for emulating older
Cisco hardware, but now it's a full graphical environment. You
can load actual Cisco iOS images into it, older ones
like the twelve on one x train or newer virtual
images like the ones from Cisco Modeling Labs, the c
amount pe images for L two L three functionality.
Speaker 1 (09:54):
So you're running real Cisco code.
Speaker 2 (09:55):
Exactly real code, emulated hardware. You can graphically connect virtual routers, switches,
even little virtual PCs vpcs to test connectivity. You could
even bridge this virtual network to your actual PCs network
using things like Microsoft loop back adapters. It creates this
amazing self contained sandbox.
Speaker 1 (10:15):
Wow. So this integrated lab environment running Linux, running GNS
three with virtual devices, that really sounds like the key.
It's the closest you can get to actually practice and
experience everything that occurs in the real network environment. Right, build, break, fix,
automate all safely, precisely.
Speaker 2 (10:31):
It's where the Python knowledge, the Linux skills, it all
comes together in a practical way. It's indispensable for learning
this stuff properly.
Speaker 1 (10:38):
Okay, let's pivot now to the real world application. How
does Python actually talk to network devices? Because let's face it,
even with APIs growing a ton of gear out there
still relies on the command line via telnet and SSH.
Speaker 2 (10:49):
That's very true, and Python is excellent for automating those
interactions too. There are standard libraries like telnet live built in,
but more often you'll use more powerful third party libraries.
Is a popular one for SSH at a lower level.
And then there's Netmeko, which builds on paramco and is
specifically designed for network devices. It'd understand different vendor prompts, handles,
(11:10):
pagination makes life much.
Speaker 1 (11:12):
Easier netnico Okay, so what can you do with.
Speaker 2 (11:14):
These ah tons of repetitive tasks? Think about configuring the
same VLAN on say twenty different access switches. Instead of
logging into each one, you write a simple Python loop
using netmeico connect configure, disconnect next switch. Done in seconds.
Speaker 1 (11:29):
That alone sounds like a huge time saver it is.
Speaker 2 (11:32):
Or backing up configurations, schedule a Python script to log
into all your core devices every night and save the
running config to your Linux server via SEP or TFTP.
Speaker 1 (11:41):
Nice. And what about security? You mentioned telnet earlier.
Speaker 2 (11:44):
Yeah, this is a big one. Telnet is insecure, sends
passwords in clear text. You can write a Python script
to scan your network ranges, check if telnet is enabled
on devices and if it finds telnet open. Use Python
with netmeko again to log in via SSH, disable the
Telnet service and maybe be ensure SSH is properly configured.
It's automating security policy enforcement.
Speaker 1 (12:04):
That's moving beyond convenience into really critical operational security, powerful stuff.
What about monitoring, keeping an eye on device health?
Speaker 2 (12:12):
For that, SNNP is still king the Simple Network Management Protocol.
It's been around forever but is still widely used. You
need to grasp the basics the idea of polling, where
your management station asks devices for data versus traps, or
devices send alerts automatically if something bad happens.
Speaker 1 (12:29):
Okay, polling versus traps.
Speaker 2 (12:31):
In the terminology, SMI is the structure of management information,
how data is organized. The MIIB management information based of
like the database of things you can monitor on a device,
and crucially oid's object identifiers. These are like unique addresses
for specific pieces of data like one point three point
six two point one, put one to one point one
put one point one point one. Did is typically system
(12:54):
uptime or specific Cisco ID like one put through six
point four point nine and nine put one button on
one point five might be this five minute CPU load average.
Speaker 1 (13:05):
There's a great Python module called pi sm it lets
you easily perform sn mp gt request to fetch specific OIDs,
or even SMMP set request change configuration, though that's less
common and needs care. You can also use command line
tools on Linux like simp walk to explore devices m
ib and find useful OIDs.
Speaker 2 (13:23):
So give us a practical example. How could you use this?
Speaker 1 (13:25):
Okay, imagine this. You write a Python script using pizmpm
to pull your main router's CPU utilization o ID every
few minutes using secure sm mpv three. The script checks
the return value if the CPU load goes above, say ninety.
Speaker 2 (13:37):
Percent right, instead of just logging it. The script could
then use the twili o API, maybe running inside a
lightweight dock or container, send an SMS alert straight to
your phone.
Speaker 1 (13:47):
Proactive alerting via text message that beats a three am
phone call waking you.
Speaker 2 (13:52):
Up, doesn't it, jest. It's about getting ahead of problems.
It's efficiency, yes, but it's also about sanity.
Speaker 1 (13:58):
Sanity definitely value and to make that check happen regularly automatically.
That's Linux's KRON again precisely.
Speaker 2 (14:06):
Pron is the simple, super reliable Linux scheduler. You write
a kron tab entry that just says, run this Python
script every five minutes, set it and forget it. Your
monitoring is now automated and persistent.
Speaker 1 (14:17):
Perfect. Now there are even more advanced tools out there too, right,
we should probably mention them briefly.
Speaker 2 (14:21):
Yeah, definitely beyond direct scripting with netmko or piesapp, you'll
quickly run into tools like antsable. Ansable is huge for
configuration management. It's agentless, mainly uses SSH and you define
the desired state in simple yamo files called playbooks. Very
powerful for ensuring consistency across many devices. It has modules
like iOS facts to gather device info easily email playbooks.
Speaker 1 (14:45):
Right, and Cisco has their own stuff too.
Speaker 2 (14:47):
We do piats often used with its parsing library called Genie.
It's a Cisco endorsed Python framework really geared cords, network
testing and validation. You can use gene to parse complex
show command put like show version into structured Python data,
dictionaries and lists. Again makes it easy to grab say
the uptime or serial number. You can even export that
(15:09):
data to Excel, maybe visualize it with matt.
Speaker 1 (15:11):
Plotlob data extraction and testing. Okay, and Docker you mentioned
for the SMS alert Right.
Speaker 2 (15:17):
Docker isn't strictly automation, but it's containerization. It lets you
package your Python script and all its dependencies into a small,
isolated container. This ensures your script runs the same way everywhere,
whether it's on your laptop or a server. Great for
deploying small focused tools like monitoring scripts or alert handlers.
Speaker 1 (15:34):
Okay, so we have scripting, monitoring, configuration, management, testing frameworks.
If we try to tile this together, where does it
really culminate. What's a complex, high value task that this
approach can tackle.
Speaker 2 (15:46):
Well, if we connect this to the bigger picture, I
think one of the classic high stress tasks is manually
upgrading Cisco iOS software in a live production network. Think
about it, two four seven environment tight change windows, the
immense pressure not to cause an adage. There were distinct phases,
the pre checks, the actual upgrade, the critical post checks.
(16:08):
It's incredibly labor intensive and nerve wracking.
Speaker 1 (16:10):
Oh absolutely, I've been there. It's stressful. So how can
Python help break down that labor intensive workflow?
Speaker 2 (16:16):
This is where all the pieces come together beautifully, that complex,
stressful process. Python can turn it into manageable, automatable, modular steps.
You could have a Python script that first connects via
sash net miko to run pre checks. Is there enough
flash space for the new image. What's the current boot variable?
Save the current can.
Speaker 1 (16:34):
Fig okay the verification stage.
Speaker 2 (16:36):
Then another part of the script could securely transfer the
new iOS image using SEP or maybe TFTP from your
Linux server. It can even verify the MTFI hash of
the transferred file to ensure it wasn't.
Speaker 1 (16:47):
Correct integrity checks nice.
Speaker 2 (16:49):
Then configure the boot system variables to point to the
new image, save the config and then initiate the reload.
Speaker 1 (16:57):
The point of no return.
Speaker 2 (16:58):
Well hopefully not is after the device reboots. Your script
connects again to run post checks. Did it boot the
right image? Or the interfaces up? Can it? Pin key neighbors?
Is routing working all verified automatically?
Speaker 1 (17:11):
Wow? Breaking that massive task down into automated, verifiable steps
that really highlights the power exactly.
Speaker 2 (17:17):
It takes that high stress, error prone manual process and
makes it far more reliable, repeatable, and faster. This is
where all those Python basics, Linux skills, netmko s and
mp checks maybe they all converge to solve a really
significant operational.
Speaker 1 (17:31):
Challenge that really crystallizes the goal, doesn't it. It's not
about kicking engineers out, not at all. It's about deeply
understanding what engineers do, their decision processes, their checks and balances,
and then building tools that amplify their effectiveness, tools that.
Speaker 2 (17:44):
Make their work more efficient, way more accurate, and less
prone to simple human error during repetitive tasks. It fundamentally
allows engineers to scale their impact to do more work
using an application programming interface.
Speaker 1 (17:58):
Essentially, they shift from being purely manual operators to being
the architects and overseers of intelligent automation.
Speaker 2 (18:05):
That's a great way to put it.
Speaker 1 (18:06):
Well, what a journey we've covered today. Seriously. We started
with this rapidly changing network engineering landscape, the absolute need
now to become this hybrid engineer. Then we dove into
Python basics, the core data types and logic needed, navigated
essential Linux skills for running our automation, talked about building
those crucial virtual labs with GNS three and VMware to
get hands on practice, and finally brought it all together
(18:29):
with real world automation using Python for SSH, SNMP, monitoring,
scheduling with Kron, and even tackling something as complex as
iOS upgrades. So what does this all really mean for
you listening right now?
Speaker 3 (18:41):
I think the key takeaway is that making this transition
becoming that cross functional engineer with solid networking plus links
chops plus coding ability. It's not just a nice to
have for your CV anymore. It really feels like a
necessity now for staying relevant for career growth in this
IT world that's just shifting so quickly under our feet.
Speaker 2 (18:56):
Absolutely, and maybe here's a final thought to leave you
with something to chew on. Take a hard look at
your own day to day work right now, what specific task,
even a small one, could you potentially automate using some
of these ideas, And then flip the question, Even with
that automation, what unique human insight, what critical thinking or
complex problem solving skill that you possess would still be
(19:17):
absolutely essential because the real power here, the future of
network programmability isn't just the raw automation. It's the intelligent
application of it, the smart processing and interpretation of the
data it provides, and that intelligence, that guidance that still
comes best from experienced engineers like you.
Speaker 1 (19:35):
Powerful thoughts, indeed, focus on where you add unique human value.
Excellent point to end on. Thanks so much for joining
us on this deep dive. Until next time, keep learning,
keep exploring that automation potential and keep diving deep