-
Notifications
You must be signed in to change notification settings - Fork 10
/
README
176 lines (137 loc) · 4.01 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
======================================
Wireless Mesh Software Defined Network
======================================
A collection of scripts for running wireless mesh networks using OpenFlow/OpenvSwitch.
http://netgroup.uniroma2.it/wmSDN/
Installation steps (tested on Ubuntu 12.04)
============================================
# install CORE:
wget http://downloads.pf.itd.nrl.navy.mil/core/packages/4.5/core-daemon_4.5-0ubuntu1_precise_amd64.deb
sudo dpkg -i core-daemon_4.5-0ubuntu1_precise_amd64.deb
sudo apt-get install -f
# get wmSDN
sudo apt-get install git
git clone https://github.com/netgroup/wmSDN.git
cd wmSDN
git submodule init
git submodule update
# build and install olsrd
cd olsrd
make && make libs
sudo make install_libs
cd ..
# build openvswitch
cd openvswitch
sudo apt-get install automake libtool libssl-dev
./boot.sh
./configure
make
# build the kernel module
./configure --with-linux=/lib/modules/`uname -r`/build
make
sudo rmmod openvswitch
sudo insmod ./datapath/linux/openvswitch.ko
cd ..
# prepare POX
cd pox/ext
ln -sv ../../controller/*.py .
cd ../pox/openflow
ln -s ../../../controller/other_modules/of_json.py .
cd ../lib
ln -s ../../../controller/other_modules/utill.py .
cd ../../..
sudo apt-get install python-networkx
# check that the directories in the scripts exist and
# change them as needed.
# e.g. change all occurrencies of /home/user to the home
# directory of the current user
grep openvswitch scripts/*.sh
# install iperf
apt-get install iperf
# install NS3
cd ~
wget http://www.nsnam.org/release/ns-allinone-3.17.tar.bz2
tar xf ns-allinone-3.17.tar.bz2
cd ns-allinone-3.17/
sudo apt-get install build-essential
sudo apt-get install gcc g++ python python-dev
sudo apt-get install gsl-bin libgsl0-dev libgsl0ldbl
sudo apt-get install vtun lxc
sudo apt-get install flex bison libfl-dev
sudo apt-get install tcpdump
sudo apt-get install libxml2 libxml2-dev
sudo apt-get install sqlite sqlite3 libsqlite3-dev
./build.py --enable-tests
cd ..
Usage
=====
# start the emulation
cd ~/ns-allinone-3.17/ns-3.17/
sudo ./waf shell
cd ~/wmSDN/emulation
cat coreconf.py #check the paths
# start the actual emulation
core-cleanup.sh && python -i ./ns3SDN.py -d 7200
# on another shell
cd ~/wmSDN/emulation
./starthosts.sh && ./startovs.sh
# now the emulation should be up and running
# TOPOLOGY
# --------
# (controller)
# |
# (server)---(n1) (n2) (n3) (n4) (gw6)-+
# | +---(client)
# (gw5)--------------+
#
#
# to get into one of the nodes, e.g. n2
source bashrc
corevcmd n2
# olsr writes into routing table 198
ip route show table 198
# see the flow table
source .bashrc
of_flows
# monitor active flows
of_watch_active_flows
# get some flow table stats
of_rule_stats
# exit the node's shell
exit
# starting the controller
cd ~/wmSDN/emulation
source bashrc
corevcmd controller
cd ~/wmSDN/pox
./pox.py gw_switch_olsrd
# PROGRESSIVE IPERF TEST
# a new iperf flow starts every 20 seconds
# from the client node to the server node
# try with and without the controller running
mkdir ~/iperftestresults
cd ~/wmSDN/emulation
# optionally enable TCP Reno
sudo ./tcp_reno.sh
./progressive_iperf.sh ~/iperftestresults
less ~/iperftestresults/iperf_s_11.log
# GATEWAY FAILOVER TEST
# two iperf flows are started, each flowing through a
# different gateway.
# Then, at t=180s one of the gateway fails and the
# controller moves both flows to the running gateway.
# At t=360s the gateway comes up again, and the controller
# re-balances the flows through both gateways.
# make sure the controller is running during the test.
mkdir ~/failovertestresults
cd ~/wmSDN/emulation
# optionally enable TCP Reno
sudo ./tcp_reno.sh
./failover_test.sh ~/failovertestresults
less ~/failovertestresults/iperf_s_11.out
less ~/faiolvertestresults/iperf_s_12.out
Contacts
========
* wmSDN home page: http://netgroup.uniroma2.it/wmSDN/
* wmSDN mailing list: https://groups.google.com/forum/#!forum/wmsdn
* Claudio Pisa <claudio.pisa@uniroma2.it>