Book Image

Python Network Programming

By : Abhishek Ratan, Eric Chou, Pradeeban Kathiravelu, Dr. M. O. Faruque Sarker
Book Image

Python Network Programming

By: Abhishek Ratan, Eric Chou, Pradeeban Kathiravelu, Dr. M. O. Faruque Sarker

Overview of this book

This Learning Path highlights major aspects of Python network programming such as writing simple networking clients, creating and deploying SDN and NFV systems, and extending your network with Mininet. You’ll also learn how to automate legacy and the latest network devices. As you progress through the chapters, you’ll use Python for DevOps and open source tools to test, secure, and analyze your network. Toward the end, you'll develop client-side applications, such as web API clients, email clients, SSH, and FTP, using socket programming. By the end of this Learning Path, you will have learned how to analyze a network's security vulnerabilities using advanced network packet capture and analysis techniques. This Learning Path includes content from the following Packt products: • Practical Network Automation by Abhishek Ratan • Mastering Python Networking by Eric Chou • Python Network Programming Cookbook, Second Edition by Pradeeban Kathiravelu, Dr. M. O. Faruque Sarker
Table of Contents (30 chapters)
Title Page
Copyright
About Packt
Contributors
Preface
Index

Extending Mininet to emulate containers


Mininet can leverage the applications installed in the server to attach them as processes to the hosts that it emulates. For example, see the following, a vim started from a host in Mininet:

$ sudo mn*** Creating network*** Adding controller*** Adding hosts and stations:h1 h2 *** Adding switches and access point(s):s1 *** Adding link(s):(h1, s1) (h2, s1) *** Configuring hosts*** Starting controller(s)c0 *** Starting switches and/or access pointss1 ...*** Starting CLI:mininet-wifi> h1 vim

The preceding command will open a vim instance in the Terminal! You may even try other applications such as gedit, or even mininet itself, to run as a process attached to the emulated host. However, note that these are real processes from the applications that are installed on the server. Not an emulation.

Containernet extends Mininet to use Docker containers as hosts in Mininet emulations, by extending the host class of Mininet. Hence, container enables emulation...