Step 1 - Setting up the environment in Mininet

As we have learned until now, in Mininet, we can use predefined topologies, such as tree and linear, to build a topology. However, in this lab, we need to tell Mininet that we need three switches and six hosts and how they are going to be connected to each other.

Mininet supports Python-based coding, and we will build a topology using Python to tell Mininet what to build.

I have put the following Python code for creating the Mininet topology:

    #!/usr/bin/python     from mininet.node import Host, RemoteController     from mininet.topo import Topo     import apt     #Note Vlan package check only work with ubuntu     #Please comment the package check if your running the script other      than ubuntu  #package check ...

Get Learning OpenDaylight now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.