Ahsan Arefin's Homepage
  • Home
  • Contacts
  • Research
  • Publication
  • Talk & Patent
  • CV
  • Courses
  • Cheat Sheet

How To Setup OpenFlow Soft Switch on Ubuntu 12.04 LTS

I installed from the standard GIT library. The process is given here.

Download & Install
sudo apt-get install git-core automake m4 pkg-config libtool 
git clone git://openflow.org/openflow.git 
cd openflow 
./boot.sh

Configure
You better disable Network Manger in Ubuntu, otherwise it tries to configure/re-configure the ethernet interfaces, which might interfere with the OpenFlow standards.
1.How to disable Network Manage:
    run sudo gedit /etc/NetworkManager/NetworkManager.conf
    change "managed=true" under [ifupdown]

2.Restart the networking
   run sudo service network restart

3.Make the switch ethernet interfaces down [no IP addresses are assigned to the switch ports]
   run sudo ifconfig <interface_name> down

Run
1. Running OpenFlow data path
ofdatapath punix:/var/run/dp0.sock -i eth1,eth4 --local-port=tap:tap1 

2. Running OpenFlow protocol to connect to the controller
ofprotocol unix:/var/run/dp0.sock tcp:<controller_IP>

Gstreamer 
gstreamer works in a pipeline, where you have to connect different component for multimedia processing. 
gstreamer-java is available here with examples. 
A comprehensive example is given here (written by me)

How to setup IP ToS bit 
in C++
int tos = 0x10; // Type of Service Field
setsockopt(sockfd, IPPROTO_IP, IP_TOS,  &tos, sizeof(tos));


Java
DatagramSocket  socket = new DatagramSocket();clientSocket.bind(new InetSocketAddress(port));
socket .setTrafficClass(0x20); 
<Code runs without any exception; however IP ToS bit does not change! >

TCP Dump Cheat Sheet
How to use filters in tcpdump can be found here 

Clock Synchronization using NTP
Synchronize Linux machine using NTP. See details here.
Powered by Create your own unique website with customizable templates.