SDN Working Commands
SDN Working Commands
Indian Journal of Science and Technology, Vol 9(32), DOI: 10.17485/ijst/2016/v9i32/100195, August 2016 ISSN (Online) : 0974-5645
Abstract
Objectives: Traditional networks were complex and difficult to manage. S.D.N is the future of programmable networks.
Our objective is to find out how host communicates in realistic networking environment. Methods/Statistical Analysis:
In order to find out how actual network works. We have used an emulator i.e. mininet. We have compared various mininet
topologies. Finally we have used one of the topology to find out how host communicate in mininet environment. We
have made one of host as the server and other may serve as a clients. Client host will request to the server to download
particular. We have used the wget linux feature to make this possible. Findings: Today S.D.N has become an important
part of networking. So it is important to emulate its behaviour. Mininet provides us with the inbuilt hosts, switches and
controller. Each of these hosts assigned with unique IP address. Each host also corresponds to xterm display option. We
can use these xterm display to make particular host as a server. Similarly we can use other xterm display for client hosts
to connect to the server through wget commands. Our finding are novel because this works has not been done before.
The works we have done shows that how client request and how server respond. When request is made by client to
download particular file. One of the advantage of using emulator is that, application that works on emulator can be easily
deployable in realistic networks. As S.D.N is a new platform so it enable the chances for the innovation of new research. As
each past work helps us to make further research. So this work also benefit other researcher somewhere. Application/
Improvements: We can make use of S.D.N in various areas like in campus area, Labs, cellular networks etc. There is always
a chance of improvement and betterment, as S.D.N is new paradigm so chances of improvement are much more. As there
are risk of security. So there are wide areas of improvements.
2 Vol 9 (32) | August 2016 | www.indjst.org Indian Journal of Science and Technology
Deepak Kumar and Manu Sood
We also have choice of installing the controller Mininet> h1 ping -c1 h2: This command checks
according to our requirement. We have various options for the connection between host h1 and h2 for
of controller like POX9, NOX10, FloodLight13, Onix11 and one packet.
Beacon12 etc. We can choose anyone of these. Each of Mininet> h1 ifconfig -a: This command shows
these controller works on different platforms like POX/ us the hosts h1-eth0 and loopback (lo) inter-
NOX controller supports python whereas FloodLight faces. The interface h1-eth0 is not seen by the
controller supports java platform. Therefore implementa- main Linux system, when we run the ifconfig
tion of the SDN is platform independent20. We can install command. Because it is specific to host of net-
the controller of our choice using command given below: work.
Sudo apt-get install POX/FloodLight23. Mininet by Mininet> s1 ifconfig -a: As switch runs by
default includes OVCS controller and openvswitch21. But default as a root in network. Therefore running
we can use controller of our own choice. There are also command on a switch is same as running com-
others way to install controller. mand on a normal terminal.
Mininet>pingall: This command checks the
connectivity/reachability among all hosts in the
4. Basic Command Syntax while network.
Working with Mininet. To start mininet xterm display option:
$: It precedes commands that typed at shell To open xterm display in Mininet we simply use com-
prompt. mand as follows.
Mininet>: It precedes commands that typed at $ Sudo mn x: This is the basic xterm dis-
mininets CLI (Command Line Interface). play command when we run this command on
#: It precedes commands that are typed at a root Mininet it startup xterm display for host h1, h2,
shell prompt. switch s1, and controller c0.
Some important mininet CLI Commands Mininet> xterm h1 h2: The command xterm
We can take help in Mininet to make use of other com- h1 h2 open the xterm terminal for the host h1
mands. Mininet started with options that determine the and h2. Enter command in xterm of h1 i.e. ping
network topology to be created22. 10.0.0.2. It will start checking the connectivity
In order to see the help menu, we use the Mininet between host h1 and h2. Similarly we can ping
command mn with option -h as: Sudo mn -h the host h1 from h2 using command in h2 xterm
To clear Mininet we can use command as: Sudo terminal ping 10.0.0.1.
mn c
Once we enter Mininet we also have some CLI com- 5. Various Topologies in Mininet
mands. These are as follows:
Mininet>help: This command show various In mininet we have various topologies like minimal, sin-
options which we can write on Mininet CLI. gle, reversed, linear, tree topology etc.
Mininet>nodes: This command shows the nodes Minimal: It is the most basic topology with two
available in the current network of Mininet as hosts and one switch. To run minimal topology
shown in figure below. When we use this com- we simply run the following command in the ter-
mand it shows us the available nodes are c0, h1, minal window i.e. Sudo mn --topo minimal
h2, s1. These nodes are available for the Mininet Single Topology: It is the simple topology with
default minimal topology. one switch and N hosts. To run this topology we
Mininet>dump: This command shows the dump run following command in terminal window i.e.
information about all nodes available in the cur- Sudo mn topo single,3
rent Mininet network. Reversed Topology: It is similar to the single
Mininet> h1 ping h2: This command tests connection but order of connection between
the connectivity between host h1 and h2. This hosts and switch is reversed. To run reversed
command will keep checking the connectivity topology we use the command in terminal win-
between hosts until we stop the command. dow i.e. Sudo mn topo reversed,3
Vol 9 (32) | August 2016 | www.indjst.org Indian Journal of Science and Technology 3
Software Defined Networks (S.D.N): Experimentation with Mininet Topologies
6. Comparison of Mininet
Topologies
Figure 1. Graphical representation of mininet topologies.
We have run various topologies over Mininet to see their
startup, stop and completion time in seconds. First we
run minimal topology which simply creates two hosts 8. Experimentation with Mininet
and one switch. Its startup, stop and completion times are
1 sec, 0.5 sec and 3.563 sec respectively. We have run various topologies over Mininet. When
we use any of topology, it creates host and switches. For
Table 2. Mininet topologies comparison example: If we use linear topology i.e. Sudo mn topo
linear, 4.This topology creates 4 hosts (h1, h2, h3, h4) and
Topology No. of Switches Startup Stop Completion
4 switches (s1, s2, s3, s4). When we use pingall statement
Host (sec) (sec) (sec)
in Mininet22, it checks connection between each of created
Minimal 2 1 1 0.5 3.563 host. When we ping between hosts in network, flow of
packet takes place; it means that there exists reachability
Single,50 50 1 9 5 14.234
between hosts. Therefore, we think if there is connectiv-
ity between hosts, there are also chances of sending files
Reversed, 50 1 9 5 14.234
between hosts with in Mininet22 network. For making this
50
really happen (i.e. sending of files between hosts) we have
Linear,10 10 10 4.5 2 7.233
used wget feature of Linux in Mininet. We can use any of
topology.
Tree,4,4 256 85 168.4 83.9 253.34
Tree,3 8 7 4 2 6.456
4 Vol 9 (32) | August 2016 | www.indjst.org Indian Journal of Science and Technology
Deepak Kumar and Manu Sood
Run the topology: The second step is to run the Figure 7. Xterm terminal for host h1, h2, h3, h4.
topology. We have used linear topology to per-
form this operation i.e. Sudo mn topo linear, 4. Now we have 4 xterm terminals for host h1, h2, h3
and h4. We have choice to make any of host as a server
and rest of host would be act like client. And they will
request to server for particular file to download. In this
topology we are making host h3 as a HTTP server. To
do this go to h3 xterm terminal and enter the command:
Figure 4. CLI command for linear topology. python -m SimpleHTTPServer 80 & Now h3 xterm act
as a server and other xterm will acts as a client.
After running Sudo mn topo linear, 4 topology.
Mininet is started with 4 hosts and 4 switches.
(After this everything will run inside Mininet).
Now to test connectivity between hosts we will Figure 8. Host h3 as a HTTP server.
use the pingall22 command in Mininet.
Now open the xterm terminal for each of the From xterm h2 we can request server to down-
host (i.e. h1, h2, h3, h4) by entering command load file. To initiate connection between client
in Mininet terminal i.e. Mininet> xterm h1 h2 and server. We simply use the wget command,
h3 h4 which is the inbuilt feature of the Linux. To make
Vol 9 (32) | August 2016 | www.indjst.org Indian Journal of Science and Technology 5
Software Defined Networks (S.D.N): Experimentation with Mininet Topologies
connection to the server we simply use com- The last important step to make connection and to
mand in xterm h2: wget 10.0.0.3. download file from server we will type command i.e.
This will show that connection is established between wget output-document=Downloads/Dpk.py 10.0.0.3
host h2 and server (host h3) and host h2 download the by (where 10.0.0.3 is the address of h3 host, which acts as a
default text file i.e. index.html HTTP server at post 80). When we used this command we
would be able to download file (Dpk.py) from the server.
10. Conclusion
Mininet provides us the platform to understand how
actual SDN works, by providing virtual network closer to
realistic network. It supports to run unmodified network
applications code on small as well as very large scale net-
works. Being a student, it is the most cost effective and
cheaper way to study the behavior of SDN. Since it sup-
ports various topologies, therefore we can create our own
Figure 9. Host h2 as client downloading the index.html file application on Mininet by modifying source code existing
from host h3 as server. topologies. The application those are developed on vari-
ous platforms can be easily deployable in SDN. Therefore
When we click on the file index.html it will open we can say SDN is platform independent. Mininet sup-
browser with address i.e. file:///home/deepak/ ports system level integration tests, which are iterative
index.html which includes the whole directory and easier to implement. The work that has been done on
of the system. But what if clients wants to down- Mininet can be performed in same way on SDN network.
load particular file stored in the system. So this way we can create prototype networks and later we
In this example we have file Dpk.py stored in the can implement them in realistic networks.
Download folder. So the main task is to make request to Add Recent References including Those Published in
server to download that file i.e. Dpk.py, For this to make www.indjst.org
really happen what we need to do is we again have to use
the Linux feature i.e. wget command to make request to
the server for particular what we want to download. 11. References
1. Dixit A, Hao F, Mukherjee S, Lakshman TV, Kompella R.
Towards an Elastic Distributed SDN Controller HotSDN13,
Hong Kong, China, 2013 Aug.
2. Casado M, Freedman MJ, Shenker S. Ethane: Taking
Control of the Enterprise ACM SIGCOMM. 2007.
3. Greenberg A, Hjalmtysson G, Maltz DA. A clean slate 4D
approach to network control and management SIGCOMM
CCR. 2005.
4. Lakshman TV, Nandagopal T, Ramjee R, Sabnani K, Woo T.
The SoftRouter Architecture ACM HOTNETS. 2004.
5. McKeown N, Anderson T, Balakrishnan H, Parulkar
G. Openow: enabling innovation in campus networks
Figure 10. Host h2 requesting the server h3 for downloading SIGCOMM CCR. 2008.
file Dpk.py available in Download directory. 6. Casado M, Freedman MJ, Pettit J. Ethane: Taking Control
of the Enterprise SIGCOMM07. 2007; 2731.
In our example we are using output-document=FILE 7. Greenberg A, Hjalmtysson G, Maltz DA, Myers A, Rexford
command24. For proper usage of wget commands with J. A clean slate 4D Approach to network control and man-
the Mininet tools we already have mentioned which host agement. ACM SIGCOMM Computer Communications
is server, and rest of other are client. Review. 2005; 35(5):4154.
6 Vol 9 (32) | August 2016 | www.indjst.org Indian Journal of Science and Technology
Deepak Kumar and Manu Sood
8. Salsano S, Ventre PL, Prete P, Siracusano G. OSHI - Open 16. Lantz B, Heller B, McKeown N. A Network in a Laptop:
Source Hybrid IP/SDN networking (and its emulation on Rapid Prototyping for Software-Defined Networks.
Mininet and on distributed SDN testbeds) Univ. of Rome HotNets ACM. 2010
Tor Vergata, (2) Consortium GARR (3) CREATE-NET 17. Gupta D, Vishwanath KV, Vahdat A. DieCast: Testing
9. POX [ONLINE] . Available from: http://www.noxrepo.org/ Distributed Systems with an Accurate Scale Model. ACM
pox/about-pox/ Transactions on Computer Systems 29, 2011; 4:1-4:48 Scale
10. Gude N, Koponen T, Pettit J, Pfaff B, Casado M. McKeown 18. Vahdat A, Yocum K, Walsh K, Mahadevan P, Kostic D.
N. NOX: Towards an Operating System for Networks. Scalability and Accuracy in a Large- Network Emulator.
ACM SIGCOMM Computer Communication Review. 19. The network simulator - ns-2. Available from: http://www.
2008; 38(3). isi.edu/nsnam/ns/.. Date accessed 07/04/2016
11. Koponen T, Casado M, Gude N, Stribling J, Poutievski 20. Need of new networking architecture. Available from:
L, Zhu M, Ramanathan R. Onix: A Distributed Control https://www.opennetworking.org/sdn-resources/sdn-
Platform for Large Scale Production Networks, OSDI 10. library
2010. 21. Open vSwitch: An Open Virtual Switch. Available from:
12. Erickson D. The Beacon OpenFlow controller. IN http://openvswitch.org/ Date accessed 02/04/2016
Proceedings of HotSDN2013. 22. Introduction to Mininet. Available from: https://github.
13. Floodlight, [ONLINE]Available from: http://floodlight. com/mininet/mininet/wiki/Introduction-to-Mininet
openflowhub.org Date accessed 04/04/2016 23. Mininet. Available from: http://mininet.org Date accessed
14. The OpenFlow switch. Available from: http://www.open- 02/04/2016 Wget commands. Available from: http://linux.
flowswitch.org. Date accessed 05/04/2016 about.com/od/commands/l/blcmdl1_wget.htm Date
15. Scott RC, Wundsam A, Zarifis K, Shenker S. What, accessed 03/04/2016
Where, and When: Software Fault Localization for SDN
Electrical Engineering and Computer Sciences University
of California at Berkeley, 2012 Jul.
Vol 9 (32) | August 2016 | www.indjst.org Indian Journal of Science and Technology 7