forked from OFLOPS-Turbo/oflops-turbo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
113 lines (79 loc) · 4.46 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
OFLOPS with 1.3 support compile instructions
% wget https://github.com/wandsdn/oflops-turbo/raw/wip_of13/install_oflops_of13.sh
% chmod +x ./install_oflops_of13.sh
% sudo apt install git libtool build-essential autoconf libconfig-dev \
libpcap-dev libsnmp-dev libgsl-dev libssl-dev
% ./install_oflops_of13.sh
OFLOPS will be downloaded and compiled into ./oflops-turbo/
install_oflops_of13.sh downloads and installs all additional library
requirements locally into the ./build/ directory. And finally grabs and
compiles OFLOPS.
OFLOPS can be run as per the original instructions below.
OFLOPS: OpenFlow Operations Per Second
A benchmarking suite for openflow switches. If you are looking
to benchmark controllers, check out ./cbench included with this package.
------------------- SUMMARY --------------------
Oflops is a modular framework for testing and benchmarking openflow
switches. It uses libpcap and raw packet writing to simultaneously
emulate an openflow controller and client traffic. It ships with
an existing suite of tests and users are encouraged to develop their
own tests.
------------------- QUICK INSTALL --------------------
debian:
% sudo apt-get install libsnmp-dev libpcap-dev
fedora/centos:
% sudo yum install net-snmp-devel libpcap-devel
TODO: make snmp utilities optional!
% sh boot.sh # if no ./configure file
% ./configure --with-openflow-src-dir=/path/to/openflow
% make
% make docs # build API documentation in ./doc
% make install
------------------- QUICK RUN : local software switch --------------------
1) Setup your software openflow switch
a) Make sure that any program that broadcasts on all interfaces,
is *off*, e.g., IPv6 routing. See OpenFlow README for more examples.
b) Bring up some virtual interfaces:
ip link add type veth # add veth0,veth1
ip link add type veth # add veth2,veth3
ip link add type veth # add veth3,veth4
for p in 0 1 2 3 4 5 ; do
ifconfig veth$p up
done
c) Start the software switch:
ofdatapath punix:/var/run/dp0.sock -i veth0,veth2 &
ofprotocol tcp:localhost:6633 unix:/var/run/dp0.sock
[see openflow reference implementation INSTALL file for more detail]
2) become root
oflops uses libpcap and raw sockets, so you need privs
3) Run oflops with lo as the "control" interface and the other half of the
vethXX links as two "data" interfaces
oflops -c lo -d veth1 -d veth3 /path/to/test/module
3a) Running oflops directly from the source directory is a PITA because of
libtool. The following is a sample invocation for inside the src directory.
./oflops -c lo -d veth1 -d veth3 ./example_modules/openflow_packet_in/.libs/libof_packet_in.so
------------------- QUICK RUN : hardware switch --------------------
1) Setup your hardware switch
a) physically connect at least one ethernet cable from your switch to a dedicated
ethernet interface on the box where you will run oflops, e.g., eth1. In
this context, dedicated means that no other applications are using that interface.
Also, some tests may require more than one data channel, so it is may be necesary
to connect more cables to more interfaces, e.g., eth2.
b) point your switch's controller connection to the IP oflops machine on a free port,
e.g., 6633. Note the interface matching the IP address, e.g., eth0.
Note that this cannot be the same interface as in (1a) unless you're doing
in-band control
2) become root
3) Run oflops with eth0 as the "control" interface and eth1 and eth2 as "data" interfaces
oflops -c eth0 -d eth1 -d eth2 /path/to/test/module
-------------------- Existing Modules -----------------------------
1) packet_in timing: calculate the time between when data packet arrives
and corresponding packet_in is received
2) port stats rtt: calculate time between port stats request and response.
-------------------- Writing New Modules -----------------------------
1) Start by reading code in example_modules/*
2) Use ./doc/* for reference (did you `make docs`?)
3) Contribute them back to oflops :-)
-------------------- Contact -----------------------------
Currently oflops does not have its own mailing list. Please send
questions or comments to the authors directly or openflow-discuss@openflowswitch.org