Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Python Networking

You're reading from   Mastering Python Networking Utilize Python packages and frameworks for network automation, monitoring, cloud, and management

Arrow left icon
Product type Paperback
Published in Jan 2023
Publisher Packt
ISBN-13 9781803234618
Length 594 pages
Edition 4th Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Eric Chou Eric Chou
Author Profile Icon Eric Chou
Eric Chou
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Review of TCP/IP Protocol Suite and Python 2. Low-Level Network Device Interactions FREE CHAPTER 3. APIs and Intent-Driven Networking 4. The Python Automation Framework – Ansible 5. Docker Containers for Network Engineers 6. Network Security with Python 7. Network Monitoring with Python – Part 1 8. Network Monitoring with Python – Part 2 9. Building Network Web Services with Python 10. Introduction to Async IO 11. AWS Cloud Networking 12. Azure Cloud Networking 13. Network Data Analysis with Elastic Stack 14. Working with Git 15. Continuous Integration with GitLab 16. Test-Driven Development for Networks 17. Other Books You May Enjoy
18. Index

What this book covers

Chapter 1, Review of TCP/IP Protocol Suite and Python, reviews the fundamental technologies for internet communication today, from the OSI and client-server model to the TCP, UDP, and IP suites. The chapter will review the basics of the Python language, such as types, operators, loops, functions, and packages.

Chapter 2, Low-Level Network Device Interactions, uses practical examples to illustrate how to use Python to execute commands on a network device. It will also discuss the challenges of having a CLI-only interface in automation. The chapter will use the Pexpect, Paramiko, Netmiko, and Nornir libraries in the examples.

Chapter 3, APIs and Intent-Driven Networking, discusses the network devices that support Application Programming Interfaces (APIs) and other high-level interaction methods. It also illustrates tools that allow the abstraction of low-level tasks while focusing on the intent of the network engineers. A discussion about and examples of Cisco NX-API, Meraki, Juniper PyEZ, Arista Pyeapi, and Vyatta VyOS will appear in the chapter.

Chapter 4, The Python Automation Framework – Ansible, discusses the basics of Ansible. Ansible is an open source, Python-based automation framework. The framework moves one step further from APIs and focuses on declarative task intent. In this chapter, we will cover the advantages of using Ansible and its high-level architecture and see some practical examples of Ansible with network devices.

Chapter 5, Docker Containers for Network Engineers, explores containers and explains how Docker is the new standard in application development. In this chapter, we will introduce Docker as a tool by introducing the overall concepts and building example applications with it.

Chapter 6, Network Security with Python, introduces several Python tools to help you secure your network. It will discuss using Scapy for security testing, using Ansible to quickly implement access lists, and using Python for network forensic analysis.

Chapter 7, Network Monitoring with Python – Part 1, covers monitoring the network using various tools. The chapter contains some examples using SNMP and PySNMP for queries to obtain device information. Matplotlib and Pygal examples will be shown for graphing the results. The chapter will end with a Cacti example using a Python script as an input source.

Chapter 8, Network Monitoring with Python – Part 2, covers more network monitoring tools. The chapter will start with using Graphviz to graph the network from LLDP information. We will move to use examples with push-based network monitoring using NetFlow and other technologies. We will use Python to decode flow packets and ntop to visualize the results.

Chapter 9, Building Network Web Services with Python, shows you how to use the Python Flask web framework to create API endpoints for network automation. The network API offers benefits such as abstracting the requester from network details, consolidating and customizing operations, and providing better security by limiting the exposure of available operations.

Chapter 10, Introduction to Async IO, covers Async IO, the new Python 3 package that allows us to perform tasks at the same time. We will cover topics such as multiprocessing, parallelism, threading, and other concepts. We will also cover examples from the Scrapli project.

Chapter 11, AWS Cloud Networking, shows how we can use AWS to build a virtual network that is functional and resilient. We will cover virtual private cloud technologies such as CloudFormation, VPC routing tables, access lists, Elastic IP, NAT gateways, Direct Connect, and other related topics.

Chapter 12, Azure Cloud Networking, covers the network services by Azure and how to build network services with the service. We will discuss Azure VNet, Express Route and VPN, Azure network load balancers, and other related network services.

Chapter 13, Network Data Analysis with Elastic Stack, shows how we can use Elastic Stack as a set of tightly integrated tools to help us analyze and monitor our network. We will cover areas from installation, configuration, data import with Logstash and Beats, and searching data using Elasticsearch, to visualization with Kibana.

Chapter 14, Working with Git, illustrates how we can leverage Git for collaboration and code version control. Practical examples of using Git for network operations will be used in this chapter.

Chapter 15, Continuous Integration with GitLab, uses GitLab to automatically create operations pipelines that can save us time and increase reliability.

Chapter 16, Test-Driven Development for Networks, explains how to use Python’s unittest and pytest to create simple tests to verify our code. We will also see examples of writing tests for our network to verify reachability, network latency, security, and network transactions.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image