
Dive into Python for network engineers and explore data center use cases with practical techniques and foundational concepts.
Focuses on data center networking with Python automation via hands-on scripts and API basics. Targets network engineers and developers; covers Nexus 9000, Arista, F5 Big-IP, Linux, JSON, and REST APIs.
Meet Dean Armada, a certified instructor with Cisco, F5, and Arista expertise, sharing data center use cases, containerization with Docker and Kubernetes, and IT certifications.
Explore use cases that automate zero touch provisioning and remote device configuration, from downloading configs and pushing VLANs and security settings to automated image upgrades and mlag/vpc with vxlan.
Explore data center networking with spine and leaf topology, Cisco Nexus 9000, F5 Big-IP, Arista switch, and Python basics for scalable API-driven provisioning.
Explore the essentials of data center networking and how these concepts apply to real data center use cases for network engineers, with practical Python workflows.
Analyze the legacy three-tier network design for data centers, its north-south vs east-west traffic implications, and scaling bottlenecks affecting leaf and spine deployments.
Explore spine and leaf architecture as a scalable cloud network model with two layers, leaves and spines. Leaves connect to servers and to spines, enabling consistent, low-latency east-west traffic.
Arista switch solution uses merchant silicon for scalable, ultra-low-latency data center and cloud networks, with familiar command line and near 90% command similarity to Nexus 9000.
Discover the Cisco Nexus 9000 solution, a high-performance data center switch family with nx-os and aci modes, programmable automation, and vxlan/vpc with devops tooling and OpenStack DCNM integration.
Explore the F5 big-ip solution, a high performance application delivery controller available in hardware or virtual form, featuring LTM, GTM DNS, WAF, APM, AFM, and a full proxy architecture.
Builds a spine-leaf data center lab topology with two spines and four leaves, using consistent interface patterns and a central management server on a 10.0.0.0/24 network.
Set up a data center lab with Arista and Cisco Nexus, Ubuntu, ssh, and sftp. Download and organize six directories for deployment.
Learn Python basics overview tailored for network engineers, focusing on data center use cases and practical scripting for automation and network efficiency.
Explore Python concepts for network automation, including its role as a versatile interpreted language, its versions 2.x and 3.x, and cross-platform availability.
Learn to execute Python code using the interactive Python shell or by running a script with a shebang, and use built-in utilities like help to inspect objects and exit.
Explore Python strings, including quotes, variables, and immutability, then learn to print values, concatenate strings, and apply built-in methods like upper, replace, startswith, format, and split to manipulate data.
Learn how integers represent numbers in Python and perform basic math with integers and floating point, including 7×8=56, 89−6=83, and how 100/3 yields 33 while 100.0/3 yields 33.333...
Learn how Python uses lists to hold multiple values, including nested items, and how to access them by index starting at zero, print specific elements, and check length with len.
Explore how dictionaries use keys like hostname, management, and neighbors to retrieve values, compare them to lists, and see how a dictionary value can itself be a list.
Demonstrate Python basics for network engineers using the shell and scripts, covering variables, prints, string operations, lists and dictionaries, and script execution with shebangs and permissions.
Explore booleans, true and false values, and how they drive conditions in programming. Learn and, or, and not operators with practical examples and truth-table logic.
Explore how conditions use operators to evaluate true or false, including equal, not equal, greater than, less than, greater than or equal to, membership, identity, and boolean operators.
Explore Python conditional statements, including if, elif, and else, and how indentation guides code blocks. Build a simple script that checks conditions like Nexus presence and assigns values accordingly.
Use for loops to iterate over lists and ranges, printing values with minimal code, and compare for and while loops, including converting a while loop to successive if statements.
Learn Python basics with conditional logic, variables, lists, and loops through hands-on Linux shell demos. Build and run scripts using if, elif, else, in, and for loops.
Learn how to collect user input in Python, compare raw_input and input across Python 2.7 and 3.x, and securely handle passwords with getpass without echoing to the terminal.
Discover how functions in Python help network engineers in data center use cases reuse code by defining blocks that run on call, accept parameters, and return results, with printing examples.
Explore python modules, including built-in and custom modules, to reuse code across scripts. Import platform and OS tools, print system and Python version, and organize functions in central modules.
Implement a python script that prompts for yes/no input, prints a processing configuration message, and loops on invalid input to test knowledge of section five basics.
This project demonstrates building a Python script that prompts for yes/no input, converts to lowercase, and uses a loop with if-else to validate responses.
Start with x = 1 and loop to three pings of 10.0.0.1, 10.0.0.2, and 10.0.0.3, printing fail or successful after each reachability test.
Create a Python script that uses a for loop to ping multiple hosts, builds host IPs by concatenating strings, imports os, calls os.system, and prints per-host connection status.
Programmability and APIs overview for Python in network engineering, focusing on data center use cases.
Programmable networks let software drive device behavior and reprogram network devices, enabling automation, flexibility, and customization in software defined networks and sd-wan, using Python.
Explore the difference between programmability and automation in network environments, and learn how scripts enable multi-device configuration, testing, and monitoring to save time and reduce errors.
Explore how application programming interfaces enable software to communicate using rest APIs over http, with json as the data format and basic authentication options such as api keys and tokens.
Compare restful and network-based APIs through a hotel search engine analogy, then show how data center management centralizes monitoring and configuration with multi-vendor network devices via netconf and restconf.
Api communications enable client-server interaction across osi layers, using application and transport protocols, json rpc, and ip addresses, and encode data with json and xml formats for parsing into structures.
Demonstrate API communications using Postman to test an API server, create requests and collections, apply bearer token authentication, and filter response data from Udemy course endpoints.
Explore Netconf, a network configuration protocol that retrieves or pushes device configuration via XML RPC, supports notification subscriptions, and uses a client–server model with a data store and secure transport.
Explore restconf, a http based protocol that combines netconf with restful patterns, supporting xml and json, and using http methods to read, insert, update, and delete data.
Compare proprietary Cisco, NX API, and Arista API with standard Netconf and Restconf, noting RPC versus HTTP and XML versus JSON encoding.
Gain a practical overview of zero touch provisioning (ZTP) in data center use cases, and explore how Python for network engineers supports automated provisioning.
Demonstrates zero touch provisioning by automatically configuring new switches connected to the management switch, assigning hostnames and management IPs (10.0.0.x), and verifying configurations via SSH.
Configure a spine-leaf data center by adding Arista leaves with zero-touch provisioning. Verify management interfaces, xcp script deployment, and show run configurations for interfaces and hostname.
Explore ZTP mode on Xdr-tb: default enabled on new Arista switches, with zero touch cancel to bypass boot provisioning and zero touch disable to disable and reset to factory defaults.
Zero touch provisioning uses dhcp options 66 and 67 to fetch http or tftp files for configuration and scripts, identified by a shebang, enabling automatic startup configs and ios images.
Explore advanced Python modules for network automation, including the subprocess interface for running CLI commands, zfill for string formatting, string.Template for template-based substitution, and robust file handling with open.
Demonstrate Python coding on a Linux server with zfill padding and a Template substitute, then show file handling with open, read, write, and close.
Learn how a ZTP Python script uses show lldp neighbors to find the management interface, uses a template to generate config for spine or server, and writes to startup config.
showcases a ztp python code demo using the xdr-tb script to generate and apply startup configurations for spine and leaf switches via template substitution, with testing and validation.
Learn how Cisco POAP enables quick device provisioning in data center use cases, with Python-based approaches for network engineers to automate provisioning tasks.
Explore day zero provisioning with pull up on Nexus OS to automatically push configurations, download software images, and create startup configs for automated multi-device provisioning.
Explore pull up concepts for network devices using DHCP, TFTP, and a web-based configuration server to generate per-switch startup configs via pull up script.py and template-driven YAML.
Pull up configuration activates dhcp, tftp, and script servers to deliver per-switch images and configs to Nexus 9K devices with empty startup configs, using pod_vars.yaml and configuration templates.
Learn the pull up process with configuration logs to troubleshoot a Nexus switch boot, covering DHCP discovery, HTTP and TFTP file transfer, MD5 validation, and startup configuration.
Coordinate dhcp option 66, tftp or http boot, and boot file and pop servers to automatically provision the switch with pull_up_script.py, retrieve its image, and generate a serial-number based configuration.
Explore tooling options beyond Python scripts that automate day zero provisioning and upgrades, including Cisco DCNM’s unified topology, VXLAN management, multi fabric support, and Ignite.
Explore the eAPI overview within Python for network engineers, highlighting data center use cases and how to access resources programmatically.
Learn how Arista ERP enables remote, programmable access to Arista switches without screen scraping, using Python scripts and JSON outputs, with web and http/https options for automation.
Enable eAPI on the Arista switch, configure credentials and ports, and install json libraries for Python. Resolve self-signed certificates and test the API in a lab.
Connect to an Arista switch using a Python API, import json, and retrieve MAC address, version, and model name from show version output formatted as json.
Practice sending multiple commands with a second API Python script to an Arista switch, enabling privileged and configuration modes to rename the host to test_hostname, printing done.
Learn to automate interface descriptions with a for loop in a Python eAPI script, applying descriptions to Ethernet 1–10 and validating with show interface status.
Revise the Fort ERP Python sample script to convert Json output to readable text by updating the print response, producing a human readable show running config.
Learn to configure eAPI and run Python scripts that connect to four leaf switches from a Linux host, testing connectivity with a PIN command in a data center.
Learn to ping switches in the 10.0.0.x range and print hostnames with IPs using a Python API script and show hostname on Arista devices.
Enhances the sixth python sample by adding username and password input, replacing raw input with getpass to hide credentials when connecting to Arista switches, and verifies host reachability.
Demonstrate a Python script that configures and deletes vlans 10, 13, 20, 30 across four leaf switches using getpass and enable password, with verification via show vlan.
Create and configure interfaces across multiple switches with Python eAPI, using centralized user and switch variables, then verify with show ip interface brief and delete interfaces across leaf switches.
Automate data center switch software upgrades with a Python script that downloads an image, updates boot configs, saves settings, and reloads multiple leaf switches.
Discover how Cisco NX-API enables automating data center tasks with Python. Leverage programmatic access to Cisco devices to streamline network engineering workflows.
Discover how Cisco nx-api provides programmatic access to Nexus switches over http(s), using Python and other languages to run cli commands and return json rpc outputs.
Configure the NX-OS API on Nexus switches using JSON RPC and CLI conf for show and configuration commands, then build a Python script to push commands from a Linux server.
Build a Cisco Nexus 9000 lab in eve-ng after finishing the Arista data center lab with a host, allocate 24 gb total memory, and download the 9300v or 9500v image.
Build and provision a Nexus 9K lab by uploading the qcow2 image, booting the node, enabling NX-API, and configuring the management IP for API access via Python scripts.
Learn to create a first nx-api python script that connects to a nexus 9k, runs show version, parses json, and prints hostname, chassis id, version, and image name.
Use a for loop and a last-octet list to manage multiple Nexus 9K switches with NX-API and HTTP port 80, then wrap the script in a function for reuse.
Explore NX-API script 3 in Python, testing switch reachability with ping, handling API errors with request exception handling, and adapting messages when the API is disabled.
Run the NX-OS Python script that prompts for credentials with getpass and uses a centralized nx os var file and custom module to automate device checks.
Use a python nx-api script to create vlan 57, enable lldp, and push configurations to Nexus 9k switches, handling credentials and command errors while validating changes with show commands.
Learn to troubleshoot nx-api python scripts by parsing json-rpc error responses, extracting the error code with dict.get, and using continue to handle invalid commands across multiple devices.
Explore the F5 iControl REST API overview and its data center use cases for network engineers.
Configure the F5 iControl REST API for big-ip using python or curl, install the F5 SDK with pip, and manage pools and virtual servers via http methods.
Demonstrate configuring f5 big-ip via icontrol rest api for data center use cases, creating a virtual server and pools, adding pool members, and verifying configurations with curl and jq.
Introduce a Python sample script that queries virtual servers and pools on a F-5b IP device via a control REST API, showing JSON output and dot raw usage.
Create and configure objects with the f5 sdk in python to build an ftp virtual server and its ftp pool, specify destination and port, then verify by re-running the script.
update a virtual server's pool with the iControl REST API using a Python script, loading the server state and assigning ftp_pool and https_pool on the F5 big-ip device.
Automate deleting F5 big-ip application objects with Fort Python by loading virtual server and pool state, then deleting them, and adding a user input driven script for automatic deletion.
Develop and automate network provisioning with a Python script that creates virtual servers, pools, and multiple pool members using the iControl REST API and dictionary-driven configuration.
Learn how MLAG creates two switches as one logical device to prevent oversubscription and blocking ports, using peer links and port channels for active-active redundancy.
Learn how a peer link enables mlag with two switches in a port channel, exchanging mac addresses and keepalives, supporting data paths and orphan ports in single-attached hosts.
Mlag enables two switches to act as one logical device, creating a non-blocking data center fabric. It uses lag peer links to coordinate mac information and keepalives for active-active operation.
Master MLAG operations part 2: select primary and secondary switches via system id and switch advertise; the lowest mac in bpdu becomes primary and port channel 12 syncs ethernet 21/22.
Configure mlag across two switches by creating vlans and svis with shared subnets, and establish a trunk port channel as the peer link while disabling stp for the vlan.
Configure mlag with spines and leaves to form port channels, verify spanning tree and root bridge roles, and observe blocking ports in a triangle topology.
Automate mlag setup in a spine-leaf data center: delete legacy port channels, run scripts to reset spines, configure vlan 4094 with an svi for keepalives, then verify with show commands.
Automate mlag pair configuration with the Magpie Python script, wiring spine and leaf switches, bundling interfaces into port channel 1000, and establishing the mac peer link.
Automate mlag interface configuration in a data center using Python scripts, creating port-channel bundles for leaf and spine switches (ports 21–22) with IDs 1 and 3 in trunk mode.
Demonstrate configuring an mlag pair with Python scripts, verifying lag, vlan, and svi on spine and leaf switches, and automating mlog configuration.
Automate mlag interface configuration across spines and leaves using python scripts to configure port-channel and log interfaces and verify with show log interfaces.
Demonstrates a MLAG cleanup demo in Python that automates show log outputs and maps log IDs to port channel IDs, removing lag configurations across spines and leaves.
Welcome to Python for Network Engineers Series
In this course will be focusing on Automating Data Center Networks using Python.
The approach of this course is to learn Data Center Networking Technologies, then understand how we apply automation and programmability using high end Data Center Network Appliances such as Cisco Nexus 9000, F5 BIG-IP and Kubernetes.
Learn the basics of Python and understand how API works! This course provides you at least 40 python sample scripts designed to automate hundreds of network devices!
The set-up is simple. We have few switches a Linux server where all the python scripts are hosted.
Easiest way to understand Python Network Automation. No need to learn Netmiko, Napalm, Ansible and Paramiko. Automation is all about API!
Lastly, we will also learn how automate complex configuration such as MLAG/VPC and VXLAN.
Some the python scripts used are designed for an extremely large data center environment!
Target Audience
Network Engineers
Aspiring Network Engineers
Network Automation Engineer
Python Programmers
Infrastructure/Solutions Architect
Expectations
We will not talk about network basics
Will discuss the Data Center technologies
Focus on the use of Programmability and Automation
I will show and demonstrate at least 40 different Python scripts
Simple, easy to understand – Linux, Python, Switches and Application Delivery Controller
Software Technologies
Linux
Python
JSON
Network Vendors and Network-Based API
Cisco Nexus 9000
F5 BIG-IP
Network Based-API
Cisco NX-API
eAPI
F5 iControl REST API