Git Product home page Git Product logo

openflow-tutorial's Introduction

Mininet: Rapid Prototyping for Software Defined Networks

The best way to emulate almost any network on your laptop!

Mininet 2.3.1b4

Build Status

What is Mininet?

Mininet emulates a complete network of hosts, links, and switches on a single machine. To create a sample two-host, one-switch network, just run:

sudo mn

Mininet is useful for interactive development, testing, and demos, especially those using OpenFlow and SDN. OpenFlow-based network controllers prototyped in Mininet can usually be transferred to hardware with minimal changes for full line-rate execution.

How does it work?

Mininet creates virtual networks using process-based virtualization and network namespaces - features that are available in recent Linux kernels. In Mininet, hosts are emulated as bash processes running in a network namespace, so any code that would normally run on a Linux server (like a web server or client program) should run just fine within a Mininet "Host". The Mininet "Host" will have its own private network interface and can only see its own processes. Switches in Mininet are software-based switches like Open vSwitch or the OpenFlow reference switch. Links are virtual ethernet pairs, which live in the Linux kernel and connect our emulated switches to emulated hosts (processes).

Features

Mininet includes:

  • A command-line launcher (mn) to instantiate networks.

  • A handy Python API for creating networks of varying sizes and topologies.

  • Examples (in the examples/ directory) to help you get started.

  • Full API documentation via Python help() docstrings, as well as the ability to generate PDF/HTML documentation with make doc.

  • Parametrized topologies (Topo subclasses) using the Mininet object. For example, a tree network may be created with the command:

    mn --topo tree,depth=2,fanout=3

  • A command-line interface (CLI class) which provides useful diagnostic commands (like iperf and ping), as well as the ability to run a command to a node. For example,

    mininet> h11 ifconfig -a

    tells host h11 to run the command ifconfig -a

  • A "cleanup" command to get rid of junk (interfaces, processes, files in /tmp, etc.) which might be left around by Mininet or Linux. Try this if things stop working!

    mn -c

Python 3 Support

  • Mininet 2.3.1b4 supports Python 3 and Python 2

  • You can install both the Python 3 and Python 2 versions of Mininet side by side, but the most recent installation will determine which Python version is used by default by mn.

  • You can run mn directly with Python 2 or Python 3, as long as the appropriate version of Mininet is installed, e.g.

    $ sudo python2 `which mn`
    
  • More information regarding Python 3 and Python 2 support may be found in the release notes on http://docs.mininet.org.

Other Enhancements and Information

  • Support for Ubuntu 22.04 LTS (and 20.04)

  • More reliable testing and CI via github actions

  • Preliminary support for cgroups v2 (and v1)

  • Minor bug fixes (2.3.1)

  • Additional information about this release and previous releases may be found in the release notes on http://docs.mininet.org.

Installation

See INSTALL for installation instructions and details.

Documentation

In addition to the API documentation (make doc), much useful information, including a Mininet walkthrough and an introduction to the Python API, is available on the Mininet Web Site. There is also a wiki which you are encouraged to read and to contribute to, particularly the Frequently Asked Questions (FAQ) at http://faq.mininet.org.

Support

Mininet is community-supported. We encourage you to join the Mininet mailing list, mininet-discuss at:

https://mailman.stanford.edu/mailman/listinfo/mininet-discuss

Join Us

Thanks again to all of the Mininet contributors and users!

Mininet is an open source project and is currently hosted at https://github.com/mininet. You are encouraged to download, examine, and modify the code, and to submit bug reports, bug fixes, feature requests, new features, and other issues and pull requests. Thanks to everyone who has contributed code to the Mininet project (see CONTRIBUTORS for more info!) It is because of everyone's hard work that Mininet continues to grow and improve.

Enjoy Mininet

Have fun! We look forward to seeing what you will do with Mininet to change the networking world.

Bob Lantz, on behalf of the Mininet Contributors

openflow-tutorial's People

Contributors

bocon13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openflow-tutorial's Issues

Can't find launcher after install GUI ubuntu-desktop

Hi,

I followed up Openflow-tutorial and installed Ubuntu-desktop with using this prompts:
$ sudo apt-get update
$ sudo apt-get install xinit ubuntu-desktop virtualbox-guest-dkms
(restart vm - I am using virtualbox)
$ startx

But only what I got, was empty background. So I found on ubuntusk.com this prompt:
rm ~/.gconf ~/.gconfd ~/.metacity ~/.compiz-1 ~/.config/compiz-1 ~/.config/dconf -rf

After that my launcher showed. But after restart VM it was hidden again.

So I would ask how I can fix this?

And is it possible set this VM for running GUI after start or restart VM? Now I start VM and see terminal and after typing credentials (mininet/mininet) I have to type startx for GUI.

I'm not exactly Linux-person but I try learning SDN technology for my diploma.

Thank you for your help!

Klaris

Wireshark starts but scrolling is disabled

So I am following the instructions here https://github.com/mininet/openflow-tutorial/wiki/Learn-Development-Tools

I am at the part where I need to start WireShark.

I ran the command to start it, it does start, but scrolling does not work. By scrolling, I mean using the scroll on part of wireshark window that has scrollbar.

I managed to use keyboard to select l0 and press start as instructed, but also nothing seem to happen.

Any idea what to do?

I am running on:

Host Os: Ubuntu 18.04.3 LTS
VirtualBox 5

Outdated command in OpenFlow tutorial

I was going through the OpenFlow tutorial today and had difficulties with the section Start Controller and view Startup messages in Wireshark.

The command controller in $sudo controller ptcp:6633 could not be found. For me, the correct command is ovs-testcontroller, but this depends on the distro according to this comment.

Furthermore, it might be worth mentioning that the controller process runs in the foreground after executing the command. I was waiting for some message to appear and it took me some time to realize that the controller was already in ready state.

It would be great if you could adjust the tutorial accordingly.

mininet traffic

How can we generate enough traffic to stress mininet switch for benchmark testing

Cannot add a Host only adapter

Greetings,

I've installed Mininet-VM. I was advised to add an additional host-only network adapter so I can use log in to the VM image. But this is what I get when I try to add the host-only adapter

screen shot 2019-01-27 at 10 19 16 pm

screen shot 2019-01-27 at 10 16 31 pm

image

Any help would be appreciated,

thanks,
Maryah

iperf crashing "sudo mn --topo single,3 --mac --controller remote --switch user"

Following the wiki and forgive me if this is the wrong location,
using the mininet vm on a host-only network
in mininet/openflow-tutorial/wiki/Learn-Development-Tools#benchmark-controller-wiperf
at the location
"
Start the same Mininet with the user-space switch:

$ sudo mn --topo single,3 --mac --controller remote --switch user

Run one more iperf test with the reference controller:

mininet> iperf
"
when running iperf in a mn session with --controller remote --switch user having already set up controller ptcp: mininet crashes with the following output

mininet> iperf
*** Iperf: testing TCP bandwidth between h1 and h3 
no route to 10.0.0.3:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.0.0.0       U     0      0        0 h1-eth0
--------------------------------------------------------------------------------
Caught exception. Cleaning up...

Exception: Could not connect to iperf on port 5001
--------------------------------------------------------------------------------
*** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes
killall controller ofprotocol ofdatapath ping nox_core lt-nox_core ovs-openflowd ovs-controller udpbwtest mnexec ivs 2> /dev/null
killall -9 controller ofprotocol ofdatapath ping nox_core lt-nox_core ovs-openflowd ovs-controller udpbwtest mnexec ivs 2> /dev/null
pkill -9 -f "sudo mnexec"
*** Removing junk from /tmp
rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log
*** Removing old X11 tunnels
*** Removing excess kernel datapaths
ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'
***  Removing OVS datapaths
ovs-vsctl --timeout=1 list-br
ovs-vsctl --timeout=1 list-br
*** Removing all links of the pattern foo-ethX
ip link show | egrep -o '([-_.[:alnum:]]+-eth[[:digit:]]+)'
( ip link del s1-eth1;ip link del s1-eth2;ip link del s1-eth3 ) 2> /dev/null
ip link show
*** Killing stale mininet node processes
pkill -9 -f mininet:
*** Shutting down stale tunnels
pkill -9 -f Tunnel=Ethernet
pkill -9 -f .ssh/mn
rm -f ~/.ssh/mn/*
*** Cleanup complete.

Can't configure host-only network interface!

Hi. This might be a very basic issue, but I have been trying to configure a host-only network interface without success. I added host-only interface to VM and I can see it in mininet, but then when I execute sudo dhclient eth1, it kind of freeze and the command line disappears. When I use ifconfig-a, I don't see IP address with eth1, but I do see one in the settings.

Any help is appreciated!

1
2

Python question

Is it possible to dynamically adjust the rate at which packets are sent in python?

Bad instructions for starting a remote controller (?)

In the page Learn Development Tools, the flow generally goes like this:

  • Start up Mininet for use with a remote controller.
  • Do some experiments and learn how it works without a controller.
  • Start Wireshark.
  • Start the remote controller.
  • Look in Wireshark for OpenFow messages exchanged by the controller and the switch.

This doesn't work, because the switch must reach out to the controller, and it can't do this if the controller is started later.

To make this work, you must:

  • Shut down Mininet.
  • Start the controller.
  • Start Mininet again.
  • Observe in Wireshark that the controller and the switch are communicating.

The goal of this issue is to accomplish one of the following:

  1. Get the section "Start Controller and view Startup messages in Wireshark" changed to include the instructions shown immediately above.
  2. Get an explanation of why my understanding is incorrect (which it very well may be).

Iperf gives same result in Mbits for both hub and controller based ethernet switch

Create a Learning Switch

The switch should give more bandwidth than a hub, but when I run Iperf after creating a controller based Ethernet switch, I get bandwidth at par with a hub.

Whereas a Flow-accelerated learning switch gives bandwidth in Gbits and is justifiable.

Or is it justifiable by the fact that, since for controller based ethernet switch, we are not installing any flows for the switch and as a result each incoming packet switch receives is sent to the controller, thereby resulting in lower bandwidth?

Can someone justify?

why OpenFlow send multicast packet-in message.

image
we use linear topology using this command.
sudo mn --topo linear,3 --switch ovsk --controller remote -x --mac
Why OpenFlow send multicast packet-in message (using this address 33:33:00:00:00:00:fb) continuously.

How to configure a learning switch ?

i created 3-tiers architecture used in datacenters in Mininet using learning switches without any controller, i added hosts at the access layer and tried to ping 2 hosts ( i tried it once with hosts connected to different switches in the access layer and i tried it with 2 hosts connected to the same access layer switch ) and the ping didn't work in both cases. i'm kinda new to networking so please help me understand WHY the ping didn't work ? and if the problem is because there is no routing protocols in the switches, please help me know how to configure learning switches without using controllers (because all the documentation found in the internet is about configuring switches in an SDN environement ).
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.