Showing posts from December, 2016

How to install Netem on a TP-Link TL-WR1043ND router with OpenWRT

To use Netem we need to install traffic control (tc).
To do this, we need install the last OpenWRT version (Chaos Chalmer). I tested before on Attitude Adjustment (a previous version) and I couldn't install on it.
To install the last version go to this page and choice your branch (stable or trunk).

After install the factory and upgrade binary, run the following commands on your router console (throught ssh):

opkg update
opkg install tc iptables-mod-ipopt kmod-sched kmod-netem

A typical netem example is:
tc qdisc change dev eth0 root netem delay 10ms RTNETLINK answers: No such file or directory
Remember, load netem first:
insmod sch_netem
If you have the same problem, run netem with this format:
tc qdisc add dev eth0 root handle 1:1 netem delay 10ms
Enjoy it!

from: can't read /var/mail/ in Python scripts

If you add a Python file to your PATH, maybe you will see this error:

from: can't read /var/mail/$First_Library_Name

This happend, because you need to be explicit with application you want to run your script.
To fix it, just add in the first line of your script the following line:

#! /usr/bin/python

Enjoy it!

How to configure Gmail as your default mail client in Ubuntu

It is very easy!
Install gnome-gmail and after set it as your default mail client.

sudo apt-get install gnome-gmail

Enjoy it!

Exception: Could not find a default OpenFlow controller in Mininet

If you try to run a mininet script like this , maybe you will get this problem if you are under Ubuntu.

Exception: Could not find a default OpenFlow controller 

This is trigger because your system don't find a default controller .
To enable it just add the first line and add the controller argument to net variable like the second line:

from mininet.node import OVSController
net = Mininet(topo=topo,host=CPULimitedHost, link=TCLink,controller = OVSController)

Now, you will get the following error:

c0 Cannot find required executable ovs-controller.
Please make sure that it is installed and available in your $PATH:

ovs-controller is a legacy name. You need to be sure that you has it.

sudo apt-get install openvswitch-testcontroller
sudo cp /usr/bin/ovs-testcontroller /usr/bin/ovs-controller

If you run it again, you should kill ovs-testcontroller first to avoid this:

Exception: Please shut down the controller which is runni…