All posts by admin2


Note: Google Drive links may not work or might be expired. You can find the scripts here

Tutorial no 3

Testing layer 1 script

      Hub is physical layer dumb device which forward packets from incoming ports to all ports except incoming one. So we will design topology first then run script on controller and check the results.

1) To create topology we can use commands since we don’t have GUI like packet tracer right now. Start mininet in virtual box. Following command will give interface address of virtual machine.

ifconfig –a

eth0 Host-only interface and eth1 NAT interface.

2) Now to access VM from host machine, ssh to eth0 [host-only] interface. In my case, eth0 interface ip is . password: mininet To create topology.

sudo mn – -topo single,8 –mac –switch ovsk –controller remote

{ sudo mn:- running mininet as root topo
single,8:- topology with single switch & 8 hosts
mac:-set mac automatically using ip
switch ovsk:- switch type is ovsk
controller remote:- controller running outside (remote) }


So we have single switch with one controller and eight hosts.

3) Lets check ping reachability using command pingall. We will not get connectivity since we haven’t run any script on controller.


4) Now we will run script for hub. SSH into mininet again.
cd pox
sudo python log.level –DEBUG forwarding.hub

And you can see we got connectivity between hosts.


5) To see flooding result we are going to use xterm and tcpdump utilities.
xterm h1 h2 h3
this command will give us windows for hosts

6)    sudo tcpdump –XX –i h1-eth0
        sudo tcpdump –XX –i h2-eth0
This will allow host to see ping reply


7) Our host has ip addresses
Lets ping host2 from host3

Here you can see host1 too gives ICMP echo reply i.e. flooding