𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Python Networking Solutions Guide: Leverage the Power of Python to Automate and Maintain your Network Environment

✍ Scribed by Tolga Koca


Publisher
BPB Publications
Year
2023
Tongue
English
Leaves
395
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


This book shows the Python programming language's importance and power to automate network devices such as routers, switches, firewalls, system devices like Linux servers, and cloud devices like the AWS platform. It shows to manage and configure thousands of devices with a single script, saving time and preventing faults. This book covers network automation with Python specifically for Network, System, and DevOps engineers. It explains the Python basics from scratch with various features and modules. It covers the most helpful connection methods to login to multiple devices concurrently and manages them with scripts. It explains creating a customized network automation tool with many scripts. This book is divided into 11 chapters. It covers network automation and Python basics, connecting devices with Python, managing devices by scripts, creating a network automation tool, etc.

✦ Table of Contents


  1. Introduction to Network Automation
    Structure
    Objectives
    Introduction to network automation
    Benefits of network automation
    Future of networking
    Introduction to Python
    Python usage area
    Python installation
    Python for Windows
    Python for Linux
    Python for MAC
    Running Python codes
    Pycharm installation for Windows
    Install and import Python modules
    Conclusion
    Multiple choice questions
    Answer
    Questions
  2. Python Basics
    Structure
    Objectives
    Print and Δ±nput functions
    Print()
    Input ( )
    Data types
    String and integer
    String methods
    List
    List methods
    Dictionary
    Dictionary methods
    Statements and conditions
    If condition
    For statement
    While statement
    Break and continue statement
    Range statement
    For else statement and nested loops
    Try…except statement
    Conclusion
    Multiple choice questions
    Answers
    Questions
  3. Python Networking Modules
    Structure
    Objectives
    File handling
    Open function
    OS module
    Word files
    Excel files
    RE modules
    RE module functions
    Special sequences
    Sets in the RE module
    Advanced topics of Python
    Functions
    Functions with parameters
    Functions with default parameters
    Call variables from functions
    Creating modules
    Classes
    Conclusion
    Multiple choice questions
    Answers
    Questions
  4. Collecting and Monitoring Logs
    Structure
    Objectives
    Connection modules
    SSH connection
    Paramiko module For SSH
    Connect 1 device with Paramiko
    Running configuration commands with Paramiko
    Connect to multiple devices with Paramiko
    Netmiko module for SSH
    Connect a single device with Netmiko
    Connect to multiple devices with Netmiko
    Telnet connection
    Telnetlib module for telnet
    Connect to multiple devices with telnetlib
    Netmiko module for telnet
    Collecting logs
    Collecting version and device information
    Collecting CPU levels
    Finding duplicated IP address
    Collecting logs with multithreading
    Tools and calculators
    IP address validator
    Subnet calculator
    Conclusion
    Multiple choice questions
    Answers
    Questions
  5. Deploy Configurations in Network Devices
    Structure
    Objectives
    Configure network devices
    Configuration of interfaces
    Replacing configurations on files
    Configure devices with Jinja2 template
    Introduction to Jinja2 template
    Introduction to YAML language
    Rendering Jinja template with a YAML file
    Configure devices with Jinja
    If statement in Jinja
    Configure devices with Napalm module
    Collect logs from devices with NAPALM
    Configure devices with NAPALM
    Configure devices with Nornir module
    Configure inventory in Nornir
    Connection to devices with Nornir-Netmiko
    Connection to devices with Nornir-NAPALM
    Configure devices by Nornir and Jinja template
    Conclusion
    Multiple choice questions
    Answers
    Questions
  6. File Transfer and Plotting
    Structure
    Objectives
    File transfers
    Backup configuration file with SSH
    File transfer with FTP connection
    File transfer with SFTP connection
    File transfer with Netmiko SCP connection
    Netmiko SCP connection with concurrent module
    File transfer with Nornir SCP connection
    Backup configuration file with SCP
    Plotting data
    Plotting CPU levels
    Plotting interface bandwidth
    Conclusion
    Multiple choice questions
    Answers
    Questions
  7. Maintain and Troubleshoot Network Issues
    Structure
    Objectives
    Upgrade network devices
    Alert alarms in devices
    Collect logs with SNMP
    Send logs via email
    Reachability test to network devices
    Ping test script
    Traceroute test script
    Conclusion
    Multiple choice questions
    Answers
    Questions
  8. Monitor and Manage Servers
    Structure
    Objectives
    Implement server environment
    Download VMware player and Ubuntu
    Install Ubuntu on VMware
    Activate SSH connection
    Maintain Linux servers
    Collect logs via syslog
    Login servers with secure password
    Collect CPU and memory levels
    Collect interface information
    Collect type and permission of files
    Server configurations
    Create users in servers
    Install packages
    Transfer files with Paramiko
    Reboot servers concurrently
    Stop running processes by script
    Conclusion
    Multiple choice questions
    Answers
    Questions
  9. Network Security with Python
    Structure
    Objectives
    Activate security services
    Install and activate the β€œFirewalld” service on servers
    Configure firewall settings on servers
    Create access lists in network devices
    Manipulate network packets with scapy
    Check logs and configurations
    Check CPU levels periodically with Crontab
    Check router configuration for insecure passwords
    Check port security configuration in routers
    Collect packets from ports with Pyshark
    Conclusion
    Multiple choice questions
    Answers
    Questions
  10. Deploying Automation Software
    Structure
    Objectives
    Introduction to InquirerPy module
    Automation tool design
    Create main tool script
    Create subtask scripts
    Network device scripts
    Server scripts
    Other remaining scripts
    Conclusion
    Multiple choice questions
    Answers
    Questions
  11. Automate Cloud Infrastructures with Python
    Structure
    Objectives
    Cloud environment deployment
    Introduction to AWS
    Installation of Boto3 and AWS CLI
    EC2 instance management
    Manage EC2 instances with Python
    Connection to EC2 instances
    S3 bucket management
    EBS volume management
    Manage EBS volumes
    Create snapshots of EBS volumes
    Attach EBS volume to EC2 instance
    IAM user management
    Conclusion
    Multiple choice questions
    Answers
    Questions
    Index

πŸ“œ SIMILAR VOLUMES


Python Networking Solutions Guide: Lever
✍ Tolga Koca πŸ“‚ Library πŸ“… 2023 πŸ› BPB Publications 🌐 English

<p><span>Automate Your Network Configuration, Management, and Operation Tasks with Python</span></p><p></p><p></p><p></p><p><span>Key Features</span></p><p><span>● Get familiar with the basics of network automation.</span></p><p><span>● Understand how to automate various network devices like Routers

Python Networking Solutions Guide: Lever
✍ Tolga Koca πŸ“‚ Library πŸ“… 2023 πŸ› BPB Publications 🌐 English

Python is the de-facto standard for automated network operations nowadays. With the power of Python, network devices can be automated easily with basic scripts. Written in direct and intuitive language, this practical guide will help you to automate your network with Python. In this book, you wil

Practical Network Automation: Leverage t
✍ Abhishek Ratan πŸ“‚ Library πŸ“… 2017 πŸ› Packt Publishing 🌐 English

Key Features β€’ Get started with network automation (and different automation tasks) with relevant use cases β€’ Apply software design principles such as Continuous Integration and DevOps to your network toolkit β€’ Guides you through some best practices in automation Book Description Network auto

Mastering Python Networking: Your one-st
✍ Eric Chou πŸ“‚ Library πŸ“… 2020 πŸ› Birmingham, UK 🌐 English

New edition of the bestselling guide to mastering Python Networking, updated to Python 3 and including the latest on network data analysis, Cloud Networking, Ansible 2.8, and new libraries Key Features β€’ Explore the power of Python libraries to tackle difficult network problems efficiently and e

Mastering Python Networking: Your One-St
✍ Chou, Eric πŸ“‚ Library πŸ“… 2018 πŸ› Packt Publishing Ltd 🌐 English

Network automation and programmability has become the central point of revolutionary change in the last few years. As the hype and marketing sets in, the topics has become confusing and theoretical. This practical guide will show how to use Python to simplify your daily network tasks. You will learn