Vous êtes sur la page 1sur 7

{\rtf1\ansi\ansicpg1252\deff0\deflang1036\deflangfe1036{\fonttbl{\f0\fswiss\fprq

2\fcharset0 Calibri;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fmodern\f


prq1\fcharset0 Courier New;}}
{\colortbl ;\red0\green0\blue255;\red255\green0\blue0;\red0\green0\blue0;}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\nowidctlpar\sa200\sl276
\slmult1\lang1033\f0\fs22 sudo apt-get -y install nmap // check the port and sca
nning\par
netstat -anltp | grep "LISTEN" //which ports are listening\par
dpkg -L mininet //to find the location of mininet\par
sudo service openvswitch-controller stop // do it before starting mininet\par
$sudo update-rc.d openvswitch-controller disable // this is for disable permanen
t stop of ovs \tab\tab\tab\tab\tab\tab\tab //controler\par
apt-get install build-essential mininet // for installing mininet on 12.04 ubunt
u\par
sudo kill $(sudo lsof -t -i:9001) //to kill the program running on that port 900
1\par
\par
installing the NOX\par
cd /etc/apt/sources.list.d/\par
\pard sudo wget {\field{\*\fldinst{HYPERLINK "http://openflowswitch.org/download
s/debian/nox.list"}}{\fldrslt{\ul\cf1 http://openflowswitch.org/downloads/debian
/nox.list}}}\f0\fs22\par
sudo apt-get update\par
sudo apt-get install nox-dependencies\par
sudo apt-get install libtbb-dev\par
sudo apt-get install libboost-serialization-dev libboost-all-dev\par
\par
git clone git://github.com/noxrepo/nox\par
cd nox\par
./boot.sh\par
mkdir build\par
cd build\par
../configure\par
make\par
make install\par
\par
Then it starts with the command:\par
\par
cd src\par
./nox_core -v -i ptcp:9933 switch\par
\par
apt-get install python-qt4 python-simplejson python-qt4-sql //to run the nox i
n gui\par
./nox-gui.py\par
\par
git clone {\field{\*\fldinst{HYPERLINK "http://github.com/noxrepo/pox"}}{\fldrsl
t{\ul\cf1 http://github.com/noxrepo/pox}}}\f0\fs22\par
$ cd pox\par
./pox.py log.level --DEBUG misc.of_tutorial //this gives u the verbose login\par
nano /etc/apt/sources.list // to install maven3\par
\f1\fs24 deb {\field{\*\fldinst{HYPERLINK "http://ppa.launchpad.net/natecarlson/
maven3/ubuntu"}}{\fldrslt{\ul\cf1 http://ppa.launchpad.net/natecarlson/maven3/ub
untu}}}\f1\fs24 precise main \par
deb-src {\field{\*\fldinst{HYPERLINK "http://ppa.launchpad.net/natecarlson/maven
3/ubuntu"}}{\fldrslt{\ul\cf1 http://ppa.launchpad.net/natecarlson/maven3/ubuntu}
}}\f1\fs24 precise main\par
sudo apt-get update \par
sudo apt-get install maven3\par
sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn //to make symmetric link\par
apt-get autoremove openjdk-6-* //to remove java 6\par
apt-get install openjdk-7-jdk // to install java 7\par
now check\par
mvn \endash v\par
\par
ls -ls /usr/share/maven //see the symmetric link\par
ls -ls /etc/maven\par
\par
to set the proxy while installing the maven you should define the proxy if you h
ave.\par
like,\par
\pard\nowidctlpar\sb100\sa100 <proxies>\par
\par
<proxy>\par
<id>myhost</id>\par
<active>true</active>\par
<protocol>http</protocol>\par
<host>goodway.rd.francetelecom.fr</host>\par
<port>3128</port>\par
\par
</proxy>\par
\par
</proxies>\par
\par
echo $http_proxy // That will give the which proxy ur running\par
this should be made in setting.xml that is either in .m2 folder or /etc/maven/ f
older.\par
just change it and it will works.\par
\par
du \endash hs path of file //to find the size of file in Ubuntu in MB\par
\par
\pard\nowidctlpar\sa200\sl276\slmult1\f0\fs22 git config --global --unset url."
https://".insteadOf\par
git config --global http.proxy $http_proxy\par
sudo service openvswitch-controller stop\par
\par
sudo mn --test pingall \par
sudo dpkg-reconfigure openvswitch-datapath-dkms\par
$sudo service openflow-switch restart\par
\par
sudo dpkg-reconfigure keyboard-configuration //to change the keyboard configurat
ion\par
sudo dpkg-reconfigure console-setup // set up font and layout in server\par
sudo nano /etc/default/locale // to change the language of os LANG="en_GB.UTF-8
"\par
sudo shutdown 0 // to shutdown computer \par
\par
gpg --keyserver subkeys.pgp.net --recv 8B48AD6246925553 to get gpg key\par
sudo gpg --export --armor 8B48AD6246925553 | sudo apt-key add -\par
\par
dpkg --get-selections | grep openvswitch | awk '\{ print $1;\}\par
dpkg \endash audit\par
process of installing openflow supported wireshark in Ubuntu server\par
sudo apt-get install python-software-properties\par
sudo add-apt-repository ppa:mighost/ppa\par
sudo apt-get update\par
### The following was pulled from 1.12.0~201309171613-1ppa1~precise in a dpkg \e
ndash list. You likely don\rquote t need to mess with repo preferences.###\par
sudo apt-get install wireshark-common libwireshark3 libwireshark-data libwiresha
rk3 libwiretap3\par
sudo wireshark\par
to install of dissector\par
apt-get install mercurial\par
\pard hg clone {\field{\*\fldinst{HYPERLINK "https://bitbucket.org/barnstorm/of-
dissector"}}{\fldrslt{\ul\cf1 https://bitbucket.org/barnstorm/of-dissector}}}\f0
\fs22\par
2\tab cd of-dissector/src\par
3\tab apt-get install scons\par
4\tab scons install\par
5\tab export WIRESHARK=/usr/include/wireshark/\par
6\tab scons install\par
7\tab #This creates a shared object (so) named openflow.so.\par
8\tab #Copy openflow.so to the Wireshark plugin directory.\par
9\tab cp openflow.so /usr/lib/wireshark/libwireshark1/plugins/openflow.so\par
\par
\par
mininet installation\par
./install.sh -3fnv\par
installing openvswitch \par
\par
\pard\nowidctlpar\tx916\tx1832\tx2748\tx3664\tx4580\tx5496\tx6412\tx7328\tx8244\
tx9160\tx10076\tx10992\tx11908\tx12824\tx13740\tx14656\f2\fs20 sudo dpkg --remov
e vim\par
\pard\nowidctlpar\sa200\sl276\slmult1\f0\fs22\par
\pard\nowidctlpar\tx916\tx1832\tx2748\tx3664\tx4580\tx5496\tx6412\tx7328\tx8244\
tx9160\tx10076\tx10992\tx11908\tx12824\tx13740\tx14656\f2\fs20 dpkg --list uspla
sh\par
\pard\nowidctlpar\sa200\sl276\slmult1\f0\fs22\par
pushing the openflow13 in the switch\par
sudo mn --topo linear,2 --mac --controller remote --switch ovsk,protocols=OpenFl
ow13\par
ovs-vsctl set bridge br0 protocols=OpenFlow10,OpenFlow12,OpenFlow13\par
ovs-ofctl -O OpenFlow13 dump-flows br0\par
\par
OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001\par
n_tables:254, n_buffers:256\par
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP\par
actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_N
W_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE\par
1(s1-eth1): addr:ba:38:e4:23:1f:58\par
config: 0\par
state: 0\par
current: 10GB-FD COPPER\par
speed: 10000 Mbps now, 0 Mbps max\par
2(s1-eth2): addr:7e:9b:00:9d:b7:39\par
config: 0\par
state: 0\par
current: 10GB-FD COPPER\par
speed: 10000 Mbps now, 0 Mbps max\par
LOCAL(s1): addr:02:51:2c:c8:d5:42\par
config: 0\par
state: 0\par
speed: 0 Mbps now, 0 Mbps max\par
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0\par
\par
sudo dpctl unix:/tmp/s1 flow-mod cmd=add,table=0 \par
in_port=1,eth_type=0x0800,ip_dst=192.168.0.10 apply:push_mpls=0x8847,output=2\pa
r
\par
sudo dpctl unix:/tmp/s1 flow-mod cmd=add,table=0 \par
in_port=1,eth_type=0x0800,ip_dst=192.168.0.10 \par
apply:push_mpls=0x8847,set_field=mpls_label:1,output=2\par
\par
my scenario to work in mpls \par
h1..........s1.........s3............s2............h2\par
# ovs-vsctl set Bridge Si protocols=OpenFlow13 where i =1 2 3\par
ovs-ofctl -O OpenFlow13 add-flow s1 "in_port=1,actions=push_mpls=0x8847,set_fiel
d:10->mpls_label,output=2"\par
ovs-ofctl -O openflow13 dump-flows s1\par
\par
ovs-ofctl -O OpenFlow13 add-flow s3 "in_port=1,dl_type=0x8847,mpls_label=10,acti
ons=set_field:20->mpls_label,output=2"\par
ovs-ofctl -O OpenFlow13 add-flow s2 "in_port=2,dl_type=0x8847,mpls_label=20,acti
ons=pop_mpls:0x0800,output=1"\par
\par
ovs-ofctl -O OpenFlow13 add-flow ovsbr0 "in_port=2,dl_type=0x8847,mpls_label=20,
actions=pop_mpls:0x0800,output=1" // check this also\par
\par
\cf2 ovs-vsctl set bridge S2 protocols=OpenFlow10\par
# ovs-ofctl add-flow S2 "in_port=2,dl_type=0x8847,mpls_label=20,actions=pop_mpls
:0x0800,output=1"\par
\pard\nowidctlpar\ri-1584\sa200\sl276\slmult1\cf0 ovs-ofctl add-flow s1 in_port=
1,dl_type=0x0800,dl_src=4a:b4:3c:99:cf:4a,dl_dst=1a:91:a6:a4:f6:4d,dl_vlan=1,act
ions=push_mpls:0x8847,set_mpls_label:10,set_mpls_label:20,output:2\par
ovs-ofctl add-flow s2 in_port=1,dl_type=0x0800,dl_src=4a:b4:3c:99:cf:4a,dl_dst=1
a:91:a6:a4:f6:4d,dl_vlan=1,mpls_label=10,actions=pop_mpls:0x0800, output:2\par
\par
\par
********************************************************************************
**\par
sudo ovs-ofctl add-flow s1 in_port=13,dl_dst=00:00:00:00:00:02,dl_type=0x800,nw_
dst=10.0.0.2/24,dl_vlan=201,actions=push_mpls:0x8847,set_field:100-\\>mpls_label
,mod_vlan_vid:20,mod_dl_src:00:00:00:00:00:14,mod_dl_dst:00:00:00:00:00:04,outpu
t:14\par
********************************************************************************
****\par
sudo ovs-ofctl add-flow s2 in_port=1,dl_type=0x0800,dl_src=22:11:11:11:11:11,dl_
dst=22:00:00:00:00:00,actions=push_mpls:0x8847,set_mpls_label:10,output:2 -O Op
enFlow13\par
\par
sudo ovs-ofctl --protocols=OpenFlow13 --flow-format=OXM-OpenFlow13 add-flow s1\p
ar
in_port=2,actions=mod_dl_src=00:00:00:00:00:01,mod_dl_dst=00:00:00:00:00:02,push
_mpls:0x8847,set_field:100-\\\par
>mpls_label,output:1\par
\par
\pard\nowidctlpar\sa200\sl276\slmult1 sudo ovs-ofctl add-flow s1 in_port=1,dl_ty
pe=0x8847,actions=mod_dl_src=00:00:00:00:00:01,mod_dl_dst=00:00:00:00:00:02,pop_
mpls:0x800,output:2\par
\par
\cf3\f2\fs16 dl_type=0x0800\cf0\f0\fs22\par
\par
\par
\par
\par
\par
working \par
sudo ovs-ofctl add-flow s1 in_port=3,dl_type=0x0800,actions=push_mpls:0x8847,set
_field:110-\\>mpls_label,mod_dl_src:00:00:00:00:00:02,mod_dl_dst:00:00:00:00:00:
01,mod_nw_src=10.0.0.1,mod_nw_dst=10.0.0.2,output:4\par
sudo ovs-ofctl add-flow s1 in_port=1,dl_type=0x8847,actions=mod_dl_src=00:00:00:
00:00:01,mod_dl_dst=00:00:00:00:00:02,pop_mpls:0x800,output:2\par
tttttttttttttttttttttttteeeeeeeeeeeeeeeeeesssssssssssssssssssttttttttttttttttttt
tt\par
ovs-ofctl add-flow s1 in_port=1,dl_type=0x0800,dl_src=22:11:11:11:11:11,dl_dst=2
2:00:00:00:00:00,actions=\par
push_mpls:0x8847,set_mpls_label:10,output:2\par
\par
OXM_OF_MPLS_LABEL\par
\par
\par
\par
\par
\par
mkdir -p /usr/local/etc/openvswitch\par
% ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ov
sschema\par
ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \\\par
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \\\pa
r
--private-key=db:Open_vSwitch,SSL,private_key \\\par
--certificate=db:Open_vSwitch,SSL,certificate \\\par
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \\\par
--pidfile \endash detach\par
ovs-vsctl --no-wait init\par
ovs-vswitchd --pidfile --detach\par
\par
\par
make -C datapath/linux\par
\par
\par
\par
\par
\par
\pard\f2\fs24 ovs-ofctl add-flow s1\par
in_port=2,dl_type=0x0800,dl_src=\f0\fs22 \f2\fs24 ae:b5:e4:7c:3e:6a,dl_dst= a6:
78:73:87:27:1e,dl_vlan=1,mpls_label=10,actions=pop_mpls:0x0800,output:1\par
\pard\nowidctlpar\sa200\sl276\slmult1\f0\fs22\par
\par
ovs-ofctl add-flow s1 in_port=1,dl_type=0x0800,dl_src=22:11:11:11:11:11,dl_dst=2
2:00:00:00:00:00,dl_vlan=1,actions=\par
push_mpls:0x8847,set_mpls_label:10,set_mpls_label:20,output:2\par
\par
\par
\par
\pard\nowidctlpar\li720\sa200\sl276\slmult1 *** Removing junk from /tmp\par
rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log\par
*** Removing old X11 tunnels\par
*** Removing excess kernel datapaths\par
ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'\par
*** Removing OVS datapathsovs-vsctl --timeout=1 list-br\par
ovs-vsctl --timeout=1 list-br\par
*** Removing all links of the pattern foo-ethX\par
ip link show | egrep -o '([-_.[:alnum:]]+-eth[[:digit:]]+)'\par
*** Cleanup complete.\par
new@new:~$ sudo ovs-ofctl dump-flows s2\par
NXST_FLOW reply (xid=0x4):\par
new@new:~$ sudo ovs-ofctl dump-flows s1\par
NXST_FLOW reply (xid=0x4):\par
new@new:~$ sudo ovs-ofctl add-flow s1 in_port=1,dl_type=0x0800,nw_dst=10.0.0.2/2
4,a
ctions=push_mpls:0x8847,set_field:100-\\>mpls_label,mod_dl_src:00:00:00:00:00:
01,mo
d_dl_dst:00:00:00:00:00:02,output:2\par
new@new:~$ sudo ovs-ofctl del-flows s1\par
new@new:~$ sudo ovs-ofctl dump-flows s1\par
NXST_FLOW reply (xid=0x4):\par
new@new:~$ sudo ovs-ofctl dump-flows s2\par
NXST_FLOW reply (xid=0x4):\par
new@new:~$ sudo wireshark &\par
[1] 3112\par
new@new:~$ sudo ovs-ofctl add-flow s1 dl_type=0x0800,nw_dst=10.0.0.1,action=outp
ut:
1,mod_dl_src=00:00:00:00:00:01\par
new@new:~$ sudo ovs-ofctl add-flow s1 in_port=1,dl_type=0x0800,nw_dst=10.0.0.2,a
cti
on=output:2,mod_dl_dst=00:00:00:00:00:02\par
new@new:~$ sudo ovs-ofctl add-flow s2 dl_type=0x0800,nw_dst=10.0.0.2,action=outp
ut:
1,mod_dl_src=00:00:00:00:00:02\par
new@new:~$ sudo ovs-ofctl add-flow s2 in_port=1,dl_type=0x0800,nw_dst=10.0.0.1,a
cti
on=output:2,mod_dl_dst=00:00:00:00:00:01\par
new@new:~$ sudo ovs-ofctl add-flow s1 in_port=1,dl_type=0x0800,nw_dst=10.0.0.2/2
4,a
ctions=push_mpls:0x8847,set_field:100-\\>mpls_label,mod_dl_src:00:00:00:00:00:
01,mo
d_dl_dst:00:00:00:00:00:02,output:2\par
new@new:~$ sudo ovs-ofctl dump-flows s1\par
NXST_FLOW reply (xid=0x4):\par
cookie=0x0, duration=271.169s, table=0, n_packets=271, n_bytes=26558, idle_age=
0,
ip,in_port=1,nw_dst=10.0.0.2 actions=output:2,mod_dl_dst:00:00:00:00:00:02\par
cookie=0x0, duration=347.425s, table=0, n_packets=348, n_bytes=34104, idle_age=
0,
ip,nw_dst=10.0.0.1 actions=output:1,mod_dl_src:00:00:00:00:00:01\par
cookie=0x0, duration=565.672s, table=0, n_packets=217, n_bytes=21266, idle_age=
348
, priority=1,ip,nw_dst=10.0.0.1 actions=output:1,mod_dl_dst:00:00:00:00:00:01\pa
r
cookie=0x0, duration=565.548s, table=0, n_packets=294, n_bytes=28812, idle_age=
271
, priority=1,ip,nw_dst=10.0.0.2 actions=output:2\par
cookie=0x0, duration=55.106s, table=0, n_packets=0, n_bytes=0, idle_age=55, ip,
in_
port=1,nw_dst=10.0.0.0/24 actions=push_mpls:0x8847,load:0x64->OXM_OF_MPLS_LAB
EL[],m
od_dl_src:00:00:00:00:00:01,mod_dl_dst:00:00:00:00:00:02,output:2\par
new@new:~$ sudo ovs-ofctl del-flows s1\par
new@new:~$ sudo ovs-ofctl add-flow s1 in_port=1,dl_type=0x0800,nw_dst=10.0.0.2/2
4,a
ctions=push_mpls:0x8847,set_field:100-\\>mpls_label,mod_dl_src:00:00:00:00:00:
01,mo
d_dl_dst:00:00:00:00:00:02,output:2\par
new@new:~$ sudo ovs-ofctl dump-flows s1\par
NXST_FLOW reply (xid=0x4):\par
cookie=0x0, duration=15.755s, table=0, n_packets=16, n_bytes=1568, idle_age=0,
ip,
in_port=1,nw_dst=10.0.0.0/24 actions=push_mpls:0x8847,load:0x64->OXM_OF_MPLS_
LABEL[
],mod_dl_src:00:00:00:00:00:01,mod_dl_dst:00:00:00:00:00:02,output:2\par
new@new:~$ sudo ovs-ofctl del-flows s1\par
CXX=g++-4.3 CC=gcc-4.3 ./configure --with-python=yes // for compiling nox\par
\par
\par
sudo ovs-vsctl add-br br0\par
sudo ovs-vsctl set bridge br0 protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlo
w13\par
sudo ovs-vsctl add-port br0 eth0\par
sudo ovs-vsctl add-port br0 eth1\par
\par
sudo ovs-ofctl --protocols=OpenFlow13 --flow-format=OXM-OpenFlow13 add-flow br0
in_port=2,actions=mod_dl_src=00:0c:29:2b:9c:82,mod_dl_dst=00:0c:29:08:4d:d0,push
_mpls:0x8847,set_field:100-\\>mpls_label,output:1\par
sudo ovs-ofctl add-flow br0 in_port=1,dl_type=0x8847,actions=mod_dl_src=00:0c:29
:2b:9c:8c,mod_dl_dst=00:0c:29:44:86:6c,pop_mpls:0x800,output:2\par
\par
\par
sudo ovs-ofctl add-flow s1 in_port=1,dl_dst=12:ae:40:b9:d2:e4,dl_type=0x800,nw_d
st=11.1.1.0/24,dl_vlan=201,actions=push_mpls:0x8847,set_field:100-\\>mpls_label,
mod_vlan_vid:20,mod_dl_src:00:00:00:00:00:01,mod_dl_dst:00:00:00:00:00:02,output
:2\par
\par
}