万本电子书0元读

万本电子书0元读

顶部广告

Mastering Python Networking电子书

售       价:¥

2人正在读 | 0人评论 9.8

作       者:Eric Chou

出  版  社:Packt Publishing

出版时间:2017-07-07

字       数:55.1万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Become an expert in implementing advanced, network-related tasks with Python. About This Book ? Build the skills to perform all networking tasks using Python with ease ? Use Python for network device automation, DevOps, and software-defined networking ? Get practical guidance to networking with Python Who This Book Is For If you are a network engineer or a programmer who wants to use Python for networking, then this book is for you. A basic familiarity with networking-related concepts such as TCP/IP and a familiarity with Python programming will be useful. What You Will Learn ? Review all the fundamentals of Python and the TCP/IP suite ? Use Python to execute commands when the device does not support the API or programmatic interaction with the device ? Implement automation techniques by integrating Python with Cisco, Juniper, and Arista eAPI ? Integrate Ansible using Python to control Cisco, Juniper, and Arista networks ? Achieve network security with Python ? Build Flask-based web-service APIs with Python ? Construct a Python-based migration plan from a legacy to scalable SDN-based network. In Detail This book begins with a review of the TCP/ IP protocol suite and a refresher of the core elements of the Python language. Next, you will start using Python and supported libraries to automate network tasks from the current major network vendors. We will look at automating traditional network devices based on the command-line interface, as well as newer devices with API support, with hands-on labs. We will then learn the concepts and practical use cases of the Ansible framework in order to achieve your network goals. We will then move on to using Python for DevOps, starting with using open source tools to test, secure, and analyze your network. Then, we will focus on network monitoring and visualization. We will learn how to retrieve network information using a polling mechanism, ?ow-based monitoring, and visualizing the data programmatically. Next, we will learn how to use the Python framework to build your own customized network web services. In the last module, you will use Python for SDN, where you will use a Python-based controller with OpenFlow in a hands-on lab to learn its concepts and applications. We will compare and contrast OpenFlow, OpenStack, OpenDaylight, and NFV. Finally, you will use everything you’ve learned in the book to construct a migration plan to go from a legacy to a scalable SDN-based network. Style and approach An easy-to-follow guide packed with hands-on examples of using Python for network device automation, DevOps, and SDN.
目录展开

Title

Copyright

Mastering Python Networking

Credits

Foreword

About the Author

About the Reviewer

www.PacktPub.com

Why subscribe?

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

Review of TCP/IP Protocol Suite and Python Language

The internet overview

Servers, hosts, and network components

The rise of datacenter

Enterprise datacenters

Cloud datacenters

Edge datacenters

The OSI model

Client server models

Network protocol suites

The Transmission Control Protocol (TCP)

Functions and Characteristics of TCP

TCP messages and data transfer

User Datagram Protocol (UDP)

The Internet Protocol (IP)

The IP NAT and security

IP routing concepts

Python language overview

Python versions

Operating system

Running a Python program

Python built-In types

The None type

Numerics

Sequences

Mapping

Sets

Python operators

Python control flow tools

Python functions

Python classes

Python modules and packages

Summary

Low-Level Network Device Interactions

The challenges of CLI

Constructing a virtual lab

Cisco Virtual Internet Routing Lab (VIRL)

VIRL tips

Cisco DevNet and dCloud

GNS3

Python Pexpect Library

Installation

The Pexpect overview

Our first Expect program

More Pexpect features

Pexpect and SSH

Putting things together for Pexpect

The Python Paramiko library

Installating Paramiko

The Paramiko overview

Our first Paramiko program

More Paramiko features

Paramiko for Servers

Putting things together for Paramiko

Looking ahead

Downsides of Pexpect and Paramiko compared to other tools

Idempotent network device interaction

Bad automation speeds bad things up

Summary

API and Intent-Driven Networking

Infrastructure as the Python code

Screen scraping versus API structured output

Data modeling for infrastructure as code

The Cisco API and ACI

Cisco NX-API

Lab Software Installation and Device Preparation

NX-API examples

Cisco and YANG model

The Cisco ACI

The Python API for Juniper networks

Juniper and NETCONF

Device Preparation

Juniper NETCONF examples

Juniper PyEZ for developers

Installation and preparation

PyEZ examples

The Arista Python API

The Arista eAPI management

The eAPI preparation

eAPI examples

The Arista Pyeapi library

The Pyeapi installation

Pyeapi examples

Vendor neutral libraries

Summary

The Python Automation Framework - Ansible Basics

A quick Ansible example

The control node installation

Your first Ansible playbook

The Public key authorization

The inventory file

Our first playbook

The advantages of Ansible

Agentless

Idempotent

Simple and extensible

The vendor Support

The Ansible architecture

YAML

Inventories

Variables

Templates with Jinja2

Ansible networking modules

Local connections and facts

Provider arguments

The Ansible Cisco example

The Ansible Juniper example

The Ansible Arista example

Summary

The Python Automation Framework - Ansible Advance Topics

Ansible conditionals

The when clause

Network module conditional

Ansible loops

Standard loops

Looping over dictionaries

Templates

The Jinja2 template

Jinja2 loops

The Jinja2 conditional

Group and host variables

Group variables

Host variables

The Ansible vault

The Ansible include and roles

The Ansible include statement

Ansible roles

Writing your own custom module

The first custom module

The second custom module

Summary

Network Security with Python

The lab setup

Python Scapy

Installing Scapy

Interactive examples

Sniffing

The TCP port scan

The ping collection

Common attacks

Scapy resources

Access lists

Implementing access lists with Ansible

MAC access lists

The syslog search

Searching with regular expressions

Other tools

Private VLANs

UFW with Python

Summary

Network Monitoring with Python - Part 1

Lab setup

SNMP

Setup

PySNMP

Python visualization

Matplotlib

Installation

Matplotlib - the first example

Matplotlib for SNMP results

Additional Matplotlib resources

Pygal

Installation

Pygal - the first example

Pygal for SNMP results

Additional Pygal resources

Python for Cacti

Installation

Python script as an input source

Summary

Network Monitoring with Python - Part 2

Graphviz

Lab setup

Installation

Graphviz examples

Python with Graphviz examples

LLDP neighbor graphing

Information retrieval

Python parser script

Final playbook

Flow-based monitoring

NetFlow parsing with Python

Python socket and struct

ntop traffic monitoring

Python extension for ntop

sFlow

SFlowtool and sFlow-RT with Python

Elasticsearch (ELK stack)

Setting up a hosted ELK service

The logstash format

Python helper script for Logstash formatting

Summary

Building Network Web Services with Python

Comparing Python web frameworks

Flask and lab setup

Introduction to Flask

The HTTPie client

URL routing

URL variables

URL generation

The jsonify return

Network static content API

Flask-SQLAlchemy

Network content API

Devices API

The device ID API

Network dynamic operations

Asynchronous operations

Security

Additional resources

Summary

OpenFlow Basics

Lab setup

Introducing OpenFlow

Basic operations

OpenFlow 1.0 vs 1.3

Mininet

The Ryu controller with Python

Open vSwitch commands

The Ryu firewall application

Layer 2 OpenFlow switch

Planning your application

Application components

The POX controller

Summary

Advanced OpenFlow Topics

Setup

OpenFlow operations with Ryu

Packet inspection

Static router

Mininet topology

Ryu controller code

Ryu flow installation

Ryu packet generation

Final result

Router with API

Ryu controller with API

API usage examples

BGP router with OpenFlow

Lab router setup

Python with the BGP speaker library

Ryu BGP application

Firewall with OpenFlow

Summary

OpenStack, OpenDaylight, and NFV

OpenStack

OpenStack overview

Networking in OpenStack

Trying out OpenStack

OpenDaylight

OpenDaylight programming overview

OpenDaylight example

Summary

Hybrid SDN

Preparing the network

Familiarize yourself with the existing framework and tools

Network standardization

Create minimum viable products

Relentlessly experiment

Greenfield deployment

Controller redundancy

Multiple controller example

BGP migration example

Migration segmentation

VIRL and Mininet setup

Cisco device configuration

Ryu BGP speaker

Mininet and REST Router

Result and verification

More BGP example

Examine the JSONRPC over WebSocket

Monitoring integration

Secure TLS connection

Physical switch selection

Lab OpenFlow switches

Incumbent vendor switches

Whitebox Switches

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部