GithubHelp home page GithubHelp logo

mininet / oflops Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 34.0 307 KB

Mirror of oflops (cbench) from git://gitosis.stanford.edu/oflops.git

License: Other

Shell 0.37% C 97.79% Perl 0.09% Makefile 1.11% M4 0.63%

oflops'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

oflops's People

Contributors

andi-bigswitch avatar crotsos avatar daviderickson avatar grg avatar lantz avatar tootoonchian 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oflops's Issues

oflops installation problem

Hi,

I've followed steps given there: https://floodlight.atlassian.net/wiki/pages/viewpage.action?pageId=1343657 but I can't install cbench on my ubuntu 16.04.

There is the result of command sudo make install from oflops directory:
Making install in .
make[1]: Entering directory '/home/gojko/oflops'
/bin/bash ./libtool --tag=CC --mode=link gcc -g -O2 -Wall -I/home/gojko/oflops/openflow/include -Wshadow pkg-config --cflags libconfig -static -Wl,-E -L/home/gojko/oflops/openflow/lib pkg-config --libs libconfig -o oflops channel_info.o context.o control.o module_run.o module_default.o oflops.o oflops_pcap.o timer_event.o msg.o log.o traffic_generator.o usage.o -ldl -lpcap -lnetsnmp -loflops_test -lpthread
libtool: link: gcc -g -O2 -Wall -I/home/gojko/oflops/openflow/include -Wshadow -I/usr/local/include -Wl,-E -o oflops channel_info.o context.o control.o module_run.o module_default.o oflops.o oflops_pcap.o timer_event.o msg.o log.o traffic_generator.o usage.o -L/home/gojko/oflops/openflow/lib -L/usr/local/lib -ldl -lpcap /home/gojko/oflops/.libs/liboflops_test.a /usr/local/lib/libconfig.so -lnetsnmp -lpthread
traffic_generator.o: In function get_next_pkt': /home/gojko/oflops/traffic_generator.c:140: undefined reference to time_diff'
collect2: error: ld returned 1 exit status
Makefile:576: recipe for target 'oflops' failed
make[1]: *** [oflops] Error 1
make[1]: Leaving directory '/home/gojko/oflops'
Makefile:641: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

Any ideas?

Thanks,

Gojko

Using oflops within mininet

Hey guys,

I am New to mininet.
I am working with mininet and ryu controller on ubuntu 14.04 for my university research.
I need to run oflops, but I could not follow the help page.
I started my mininet topology by following command,
sudo mn --controller=remote --switch=ovs --topo=single,3

my interfaces looks like following at this point:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:38:54:10 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.23/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 08:00:27:7d:3d:19 brd ff:ff:ff:ff:ff:ff
6: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
    link/ether be:cc:e5:24:03:72 brd ff:ff:ff:ff:ff:ff
14: s1-eth1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP group default qlen 1000
    link/ether 1e:68:ad:b6:2d:40 brd ff:ff:ff:ff:ff:ff
15: s1-eth2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP group default qlen 1000
    link/ether 2e:98:1c:35:96:ad brd ff:ff:ff:ff:ff:ff
16: s1-eth3@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP group default qlen 1000
    link/ether 6e:ab:f2:88:a3:35 brd ff:ff:ff:ff:ff:ff
17: s1: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default
    link/ether 8e:7d:4c:45:55:49 brd ff:ff:ff:ff:ff:ff

Now how do I initiate oflops from oflops for testing the OVS switch that's part of the mininet topology ?

Thanks

cbench opendaylight

Hi,

Have you ever tried cbench test on opendaylight controller? I have a problem because I get all zeros in results (on latency and throghtput). I see switches which cbench generates on topoview on webgui.

Do you know which application for forwardint to load on opendaylight to run cbench properly?

Thanks,

Gojko

Compilation error on module_run.c with Ubuntu 16.04.

The error is as follows:

module_run.c: In function ‘process_control_event’:
module_run.c:277:20: error: ‘OFPT_STATS_REPLY’ undeclared (first use in this function)
if(ofph->type > OFPT_STATS_REPLY) // FIXME: update for new openflow versions
^
module_run.c:277:20: note: each undeclared identifier is reported only once for each function it appears in
module_run.c:279:24: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 4 has type ‘int’ [-Wformat=]
fprintf(stderr, "%s:%zd :: Data buffer probably trashed : unknown openflow type %d\n",
^
In file included from module_run.c:20:0:
module_run.c: At top level:
utils.h:34:12: warning: inline function ‘time_diff’ declared but never defined
inline int time_diff(struct timeval now, struct timeval *then);
^
Makefile:605: recipe for target 'module_run.o' failed
make[2]: *
* [module_run.o] Error 1
make[2]: Leaving directory '/home/mininet/oflops'
Makefile:641: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/mininet/oflops'
Makefile:433: recipe for target 'all' failed
make: *** [all] Error 2

Let me know if you need any further information to trace the error

msgbuf_grow failed: Cannot allocate memory

I got that message when running cbench on throughput mode: cbench: msgbuf.c:109: msgbuf_grow: Assertion `mbuf->buf' failed.

I'm using two separate servers, one for cbench and another for the controller.

Issues running cbench

I am having issues running cbench on ubuntu 20.04. I am running it from within the oflops directory but I keep getting this error saying the ./cbench: command not found.

And when I try to run as "bench", it throws up this error:
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

I am not sure how to go about resolving this..i have been stuck on this for a while now.

CBENCH EMPTY RESULT [NOT learning destination mac addresses before the test]

Hi,

i tried to run cbench in my pox controller as follow :

sudo cbench -c localhost -p 6633 -l 5 -M 5 -s 6
cbench: controller benchmarking tool
running in mode 'latency'
connecting to controller at localhost:6633
faking 6 switches offset 1 :: 5 tests each; 1000 ms per test
with 5 unique source MACs per switch
NOT learning destination mac addresses before the test
starting test with 0 ms delay after features_reply
ignoring first 1 "warmup" and last 0 "cooldown" loops
connection delay of 0ms per 1 switch(es)
maximum number of requests sent to controller per test is 2147483647
debugging info is off
12:29:28.357 6 switches: response/requests: 0/1 0/1 0/1 0/1 0/1 0/1 total = 0.000000 per ms
12:29:29.459 6 switches: response/requests: 0/1 0/1 0/1 0/1 0/1 0/1 total = 0.000000 per ms
12:29:30.561 6 switches: response/requests: 0/1 0/1 0/1 0/1 0/1 0/1 total = 0.000000 per ms
12:29:31.667 6 switches: response/requests: 0/1 0/1 0/1 0/1 0/1 0/1 total = 0.000000 per ms
12:29:32.767 6 switches: response/requests: 0/1 0/1 0/1 0/1 0/1 0/1 total = 0.000000 per ms
Total Count: responses/requests = 0/30
Total Average: responses/requests = 0.00/6.00
RESULT: 6 switches 4 tests min/max/avg/stdev = 0.00/0.00/0.00/0.00 responses/s

for the controller result :

sudo ./pox.py log.level --DEBUG forwarding.l2_learning
POX 0.7.0 (gar) / Copyright 2011-2020 James McCauley, et al.
DEBUG:core:POX 0.7.0 (gar) going up...
DEBUG:core:Running on CPython (3.8.5/Jan 27 2021 15:41:15)
DEBUG:core:Platform is Linux-5.8.0-53-generic-x86_64-with-glibc2.29
WARNING:version:Support for Python 3 is experimental.
INFO:core:POX 0.7.0 (gar) is up.
DEBUG:openflow.of_01:Listening on 0.0.0.0:6633
INFO:openflow.of_01:[00-00-00-00-00-01 1] connected
DEBUG:forwarding.l2_learning:Connection [00-00-00-00-00-01 1]
INFO:openflow.of_01:[00-00-00-00-00-01 2] closed
INFO:openflow.of_01:[00-00-00-00-00-02 3] closed
INFO:openflow.of_01:[00-00-00-00-00-03 4] closed
INFO:openflow.of_01:[00-00-00-00-00-04 5] closed
INFO:openflow.of_01:[00-00-00-00-00-05 6] closed
INFO:openflow.of_01:[00-00-00-00-00-06 7] closed

and for the mininet :
sudo mn --topo single,3 --mac --controller remote --switch ovsk
[sudo] password for joditanato:
*** Creating network
*** Adding controller
Unable to contact the remote controller at 127.0.0.1:6653
Connecting to remote controller at 127.0.0.1:6633
*** Adding hosts:
h1 h2 h3
*** Adding switches:
s1
*** Adding links:
(h1, s1) (h2, s1) (h3, s1)
*** Configuring hosts
h1 h2 h3
*** Starting controller
c0
*** Starting 1 switches
s1 ...
*** Starting CLI:
mininet> h1 ping h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=3.06 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.231 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.040 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=64 time=0.044 ms
64 bytes from 10.0.0.2: icmp_seq=5 ttl=64 time=0.069 ms
^C
--- 10.0.0.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4084ms
rtt min/avg/max/mdev = 0.040/0.689/3.064/1.189 ms
mininet>

i can successfully ping from h1 to h2 but it seems like cbench can't learn destination mac address and the result is empty.
I wonder why the cbench can't learn the destination mac.

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.