Software Framework For Enterprise Solutions
Software Framework For Enterprise Solutions
Abstract - A free and open source programming 3) Compared to Matlab, Python adheres to de-facto stan-dards
Language which is not only reliable and stable but can also of programming such as zero indexing, use of square
implement wide range of application domains is of brackets for indexing etc. This is very convenient for
paramount importance to an enterprise. Python is such a one who is beginning to use Python or converts code from
general-purpose programming language that is widely other platform to Python and vice-versa, work across
used among various researchers/academicians/ industries. variety of programming platforms.
Availability of rich resource of library makes this 4) Unlike many standard programming languages such as C,
programming language a widely preferred one. Python’s C++, Java, Matlab; Python supports variety of data
open source libraries provide comprehensive support for structures such as List, Tuple, Dictionary etc. which are
development of applications such as web development, data considered to be highly efficient in various
analysis, artificial intelligence, scientific computing, implementations.
desktop apps and utility tools. In this paper, we discuss
general features of Python programming languages along For more technical information and for the download of the
with its support for packet manipulation and open v Switch interpreter, visit the official webpage [1]. In this paper, we
configuration. discuss general features of python programming language and
I. INTRODUCTION its competitiveness to the contemporary proprietary based
software systems. Furthermore, we present a case study that
Python is free and open-source software which is widely used describes implementation of packet manipulation tool using
by software developers and researchers. This programming Python codes. In addition, the Python API compatible Open
tool is managed by the non-profit organization known as vSwitch to replace a switching stack for hardware
Python Software Foundation. The salient features of Python virtualization environments as a advanced multiple protocols
programming language are that it’s a high-level, interpreted, support and standards used in computer networks are
dynamic and general-purpose programming language. One of presented.
the main advantages of Python programming is that it The rest of the paper is organized as follows: Section II
supports multiple programming paradigms such as object- describes a tool known as Scapy written in Python language
oriented, imperative and procedural programming styles. for interactive packet manipulation. Section III discusses the
The syntax of Python programming emphasizes on code implementation features of Open vSwitch using Python
readability. Unlike other programming languages such as package distribution. Section IV briefly describes other free
C++ or Java, Python’s syntax allows the user to represent a and open source software available similar to that of Python.
concept in fewer lines of code.Python interpreters are available Finally, conclusions are drawn in section V.
for all platforms. Python supports cross-platform paradigm
meaning that an application developed in one platform can II. INTERACTIVE PACKET MANIPULATION
be used as it is in other platform without the need of the TOOL
Python interpreter. Python supports command-line interface
or shell through which user can enter statements sequentially Scapy is a packet manipulation tool, developed by Philippe
and results can be obtained immediately. In addition, it also Biondi, Guillaume Valadon and Pierre Lalet in August 2007.
provides ways to write a complete script and run it using its This tool is written in Python language, which is an open
interpreter. source. The latest version 2.3.2 was released on January 2016
[2].It has used to forge or decode the packets of various other
One of the main strengths of Python programming is it has a network protocols such as TCP, UDP, IP and so on. Scapy is
huge standard library supporting wide variety of functionality handling various security related functions like scanning, trace
such as graphical user interface, web framework, connecting routing and network discovery. The uniqueness of this tool is
relational database, networking and communications. It is also ending an invalid frame, injecting customized 802.11 frames,
a popular tool in test frameworks, automation and system VOIP decoding in the customized network. The Scapy
administrations. For more than a decade now, Python has been provides general functionalities to the network applications
a go-to choice for variety of processing, machine learning rather than specific functions provided by various other tools
etc.On the other hand, there is a proprietary software like Nmap for network scanning and Wireshark for sniffing.
equivalent to Python programming which is still a popular This tool produces the output without any interpretation. Using
choice for software developers and researchers world-wide. Scapy, we can create and send custom packets over the
However, Python should be preferable to its proprietary network and analyze the raw output received with a minimal
counterpart for various prominent reasons such as: amount of lines of code, and it supports a wide range of
1) One can write more compact and readable code in Python protocols for the purpose[3].
than a Matlab version.
2) As mentioned earlier, Python is free and open whereas A. Scapy Features
Matlab programming is hugely expensive. There are lot of tools which are used to build and interpret
1
Integrated Intelligent Research (IIR) International Journal of Computing Algorithm
Volume: 06 Issue: 01 June 2017 Page No.51-54
ISSN: 2278-2397
the packets in various ways like packet forging, sniffing, opens the programing based forwarding functions to control.
testing, scanning, fingerprinting and attacking. The Scapy is It throws away the hardware switch with the incorporation and
one of the best open source tools for the above operations. the support of Linux kernel. It supports multiple open source
The major features of Scapy are mentioned below.[3] OSs based virtualization technologies such as XenServer and
virtualBox [5]. The fig-1 below shows the OvS design support
□ Fast packet designing distribution across multiple physical servers implementation.
□ Default values that work
□ No special values
□ Unlimited combinations
□ Probe once, interpret many
□ Interactive packet and result manipulation
2
Integrated Intelligent Research (IIR) International Journal of Computing Algorithm
Volume: 06 Issue: 01 June 2017 Page No.51-54
ISSN: 2278-2397
vary from Kbps to Mbps at time. This experiment starting following commands ovs-vsctl list interface vif1.o.
with one physical network and it consists of Ethernet data
network for virtual machine data traffic. This physical E. Testing and troubleshooting
network is used to send traffic from and to host and for The Python based netperf is used for testing virtual machine
measuring the rate of traffic sent by each virtual machine. rate limiting and burst rate in the host that is used for
On the other hand, this physical network is considered monitoring and measurement purposes. Also netperf has a
optional and we connect all VMs to a bridge that rather clientside and a serverside namely netperf and netserver.
connected to a physical interface. It uses tools to monitor the We run netserver on the host that monitors the traffic flow
host activity. rate. Say the host IP address for the measurement purpose is
set to 172.16.1.1 and is reachable from both virtual
C. Experimental environment machines terminals. Now we run the command “netperf -H
172.16.1.1” on both VM1 and VM2 with ten to twenty
seconds interval and measure the detail throughput values,
Both VMs a r e s e n t as TCP traffic to the measurement host.
Here the speed limit is set to 10, 100 1000 to 10000 bps. In
order to view the rate limit progress ingress qdisc should be
enabled and verify the userspace /sbin/tc[6].
F. Output Interpretation
The command netperf -H 172.16.1.1 -t
{UDP_STREAM/TCP_Stream} -- -m 1000, used for both
TCP and UDP stream of data across the VMs using Open
vSwitch. These kind of virtual switches used only for rat
Fig.3.Open vSwitch Environment limiting and not used for queuing the packets. It drops after
the traffic rate reaches the threshold point or burst rate.
As far as the physical hosts are used in the VM
environment as shown in the Fig.3, it is named two physical IV. OTHER NOTEWORTHY FREE AND OPEN
host, named Host1, Host2. Host1 is a terminal that runs on SOURCE SOFTWARE
single network interface card together with open vSwitch.
Also the physical NIC participation with OVS bridge, eth0, is A. GNU Octave Programming
connected to the Data Network and no IP address would be In this section, we address yet free software known as Octave.
assigned.Host2 is a monitoring or measurement Host, It is a higher level programming language primarily developed
capable of measuring VM’s throughput. Netperf[7] is a tool as a major free alternative for highly expensive Matlab
that tests the rate of traffic from one host to other while programming tool. The Octave tool is essentially used for
travelling, this host with single NIC and a IP address that numerical computations. The emphasis is to use a code that
would enable reachability. There are two Virtual Machines is syntactically compatible to Matlab so that users can find it
(VMs) namely VM1 and VM2 installed and run in the as free alternative for Matlab tool. Octave can be also used
host1. The configuration of each VMs consist of single Linux as batch-programming. Furthermore, like Python, Octave
device interface on the physical host, these interfaces programming tool too supports command line interface in
changes from server to server and host to host, also based addition to script based interpreter. Fig.4 shows Octave tool
on the connection methods, for example, interface name vif1.o running on a Linux platform[7].R Programming Of late, R is
for XEN servers. a popular programming tool and software paradigm for
statistical computing and graphics. This programming tool is
D. Configuration Steps widely used by statisticians and researchers of data mining,
The VM1 and VM2 are configured with ingress policing as it helps in providing good support for analysis and
rule based on the configured interface table. It has been set visualization of data. This is one of the free software
to two values, namely ingress policing_rate and ingress available under GNU package. The R programming has a
policing_burst. The policing rate values enable the maximum command line interface and it comes with variety of graphical
traffic rate in mbps that is allowed to send through VM. front-ends. R is supported with comprehensive library to
The rate policing parameter to indicate the amount of data implement various statistical and graphical algorithms that
traffic send by the interface and it shows bursts when more includes linear, non-linear modeling, classification, clustering
than the rate set by the policing rate exceeded. The and popular machine learning algorithms. R libraries could
following commands are used in hosts for rate limit, burst be easily extendible through functions and extensions. The
between VM1 and VM2, For VM1 rate limit and burst are set community of R is well known for its active contribution in
as shown below, the development of packages. The standard functions of R,
are written in R itself. The C, C++ codes can be linked and
Ovs interface XEN server VM1 VM2 called through R during run time. In addition, R objects can
vif1.o be manipulated through C, C++, Java, NET, Python. This R
Ingress QoS rate 100 1000 programming was introduced as an alternative to S
Ingress QoS burst 10 100 programming language. Furthermore, R has tools to produce
publication-quality graphs and mathematical symbols.
The applied rate and burst limit can be viewd through the
3
Integrated Intelligent Research (IIR) International Journal of Computing Algorithm
Volume: 06 Issue: 01 June 2017 Page No.51-54
ISSN: 2278-2397
V. CONCLUSION
References
[1] “Python Homepage.” www.python.org.
[2] https://en.wikipedia.org/wiki/Scapy.
[3] http://resources.infosecinstitute.com/scapy-all-in- one-
networking-tool/
[4] http://www.scmdt.mmu.ac.uk/blossom/downloads/
byDoing/PythonScriptingwithScapyLab.pdf
[5] “Traffic Control, Online Documents.”
[6] “Netperf.”, Netperf, http://www.netperf.org/netperf/ [7]
http://octave.org/download.