January 2019
Beginner to intermediate
776 pages
19h 58m
English
Mininet consists of a few network topologies that are predefined. You may define your own topology. In this recipe, we are using tree topology, which is probably the most common and the most basic network topology. We ping one emulated host from another emulated host.
Listing 9.2 emulates a simple network with a tree topology:
#!/usr/bin/env python # Python Network Programming Cookbook, Second Edition -- Chapter - 9 # This program is optimized for Python 2.7.12. # It may run on any other version with/without modifications. import argparse from mininet.net import Mininet from mininet.topolib import TreeTopo # Emulate a network with depth of depth_ and fanout of fanout_ def emulate(depth_, fanout_): # Create a network with tree ...
Read now
Unlock full access