NETWORK SIMULATION TOOL
21CSCT302J /COMPUTER NETWORKS
PROJECT REPORT
Submitted by
SOHAN KUMAR MIRYALA RA2211028020012
ROOPESH MATADA RA2211028020047
HIMAVANTH REDDY P RA2211028020016
Under the guidance of
Mr . J. CYPTO
(Asssociate Professor, Department of Computer Science and Engineering)
V SEMESTER/ III YEAR
COMPUTER SCIENCE AND ENGINEERING
FACULTY OF ENGINEERING AND TECHNOLOGY
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM, CHENNAI
October 2024
1
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
(Deemed to be University U/S 3 of UGC Act, 1956)
BONAFIDE CERTIFICATE
Certified that this project report titled NETWORK SIMULATION TOOL
is the bonafide work of SOHAN KUMAR MIRYALA (RA2211028020012),
ROOPESH MATADA (RA2211028047) , HIMAVANTH REDDY P
(RA2211028020012)who carried out the project work under my supervision. This
project work confirms to 21CSC302J /Computer Networks , V Semester, III year,
2024.
SIGNATURE
Mr. J . Cypto , M. Tech, Ph.D.,
Associat Professor
Computer Science and Engineering,
SRM Institute of Science and Technology,
Ramapuram, Chennai.
2
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM, CHENNAI
DECLARATION
We hereby declare that the entire work contained in this project report
titled “NETWORK SIMULATION TOOL” has been carried out by
SOHAN KUMAR MIRYALA (RA2211028020012), ROOPESH MATADA
(RA2211028047) , HIMAVANTH REDDY (RA2211028020016)at SRM Institute
of Science and Technology, Ramapuram, Chennai, under the guidance of Dr. J .Cypto,
Assistant professor, Department of Computer Science and Engineering.
Place: Chennai SOHAN KUMAR MIRYALA
HUDA Date: ROOPESH MATADA
HIMAVANTH REDDY P
3
ABSTRACT
The purpose of this project is to develop a robust and efficient network simulation tool that can
model, simulate, and analyse various networking protocols and topologies. Network simulations
are integral to understanding the behaviour of networks in different conditions, facilitating the
design, testing, and optimization of networks without needing costly hardware deployments. The
tool aims to provide features like customizable topologies, the ability to simulate various routing
and transport protocols, and performance evaluation of metrics like latency, throughput, and
packet loss.
This project report discusses the underlying motivation, the existing solutions, and the proposed
approach, highlighting how the tool improves upon current systems. Through this tool, users can
experiment with network scenarios and gain insights into performance trade-offs, making it a
valuable resource for researchers, network administrators, and students.The development of a
robust and efficient network simulation tool is crucial for researchers, engineers, and educators
in the field of networking.
This project aims to create a simulation environment capable of modeling, simulating, and
analyzing various networking protocols and topologies, making it a vital tool for understanding
network behavior under a wide range of conditions. Network simulation tools offer significant
advantages by allowing users to design, test, and optimize networks without the expense and
complexity of real-world hardware deployments. Such tools enable network designers to
anticipate how networks will perform under different conditions, including traffic loads, protocol
changes, and potential network failures. This project proposes to deliver features such as
customizable topologies, support for multiple networking protocols, and the ability to evaluate
performance metrics like latency, throughput, jitter, and packet loss. By providing these
capabilities, the tool will help users experiment with network scenarios and gain valuable
insights into performance trade-offs, ultimately aiding in the planning and deployment of more
efficient networks.
4
INTRODUCTION OF THE PROJECT
In the evolving world of technology, network infrastructure forms the backbone of global
communication systems. With the proliferation of devices, applications, and services relying on
seamless networking, the ability to predict network behavior under various conditions has
become increasingly important. Network simulation tools enable the modeling and testing of
different networking scenarios, allowing researchers and engineers to assess the impact of
changes without disrupting real-world networks. This project involves designing and
implementing a versatile network simulation tool to analyze diverse networking protocols and
topologies. Such tools are indispensable in testing various network parameters, aiding in the
optimization of performance and the identification of potential bottlenecks. The simulation tool
being developed addresses the growing demand for reliable and scalable networks, ensuring
better planning and decision-making in network design and maintenance.
In the current technological landscape, networking infrastructure is at the core of almost every
communication system. With the increasing reliance on networks by devices, services, and
applications, it has become crucial to predict and understand network behavior under various
conditions to ensure optimal performance. Designing and maintaining complex network systems
is challenging due to the dynamic nature of traffic patterns, varied types of network devices, and
evolving protocols. Network simulation tools serve as an indispensable resource for engineers
and researchers, providing the ability to model and simulate different network configurations in
a controlled, virtual environment. This project focuses on the design and implementation of a
network simulation tool that allows for the analysis of various networking protocols and
topologies. By providing the capability to simulate both wired and wireless networks, the tool
will assist in the design, optimization, and troubleshooting of network infrastructures without
the need to disrupt existing systems. This simulation tool is particularly valuable in educational
and research contexts, where understanding the impact of network design choices is essential.
5
PROBLEM STATEMENT
As networks grow in complexity, so do the challenges in designing, managing, and optimizing
them. Real-world network deployment is often expensive and time-consuming, making network
simulation tools an invaluable asset for testing and analysis before implementation. Existing
tools like NS2, NS3, and OPNET, though effective, suffer from issues such as steep learning
curves, limited flexibility, and sometimes outdated features for modern networking
environments. Moreover, these tools often do not offer a user-friendly interface, making it
difficult for non-experts to run meaningful simulations. The lack of efficient tools that can handle
large-scale simulations and incorporate recent networking protocols highlights the need for a
more intuitive, scalable, and flexible network simulation tool.
The proposed project seeks to fill this gap by providing a simulation tool that is easy to use,
supports modern networking protocols, and can simulate complex network behaviors accurately.
As the complexity of networks continues to grow, designing, managing, and optimizing them
presents significant challenges. Network simulation tools offer a solution by allowing engineers
and researchers to test network designs and configurations in a simulated environment before
deploying them in the real world. However, existing network simulation tools such as NS2, NS3,
and OPNET, while useful, are not without their drawbacks. Many of these tools have steep
learning curves, making them difficult for beginners or non-expert users to use effectively.
Moreover, some of these tools are outdated, lacking support for modern networking protocols,
while others, like OPNET, are prohibitively expensive for individual researchers or smaller
academic institutions. Another limitation of existing systems is their inability to efficiently
handle large-scale network simulations without performance degradation. These factors
highlight the need for a more accessible, flexible, and scalable network simulation tool that can
cater to the needs of a wide range of users, from novice learners to experienced network
professionals.
6
OBJECTIVE
The primary objective of this project is to design and implement a network simulation tool that
simplifies the process of creating, running, and analyzing network simulations. The tool aims to
support various types of network configurations, including wired and wireless networks, and
simulate key networking protocols like TCP, UDP, OSPF, BGP, and others. Additionally, the
tool should provide a visual interface for users to easily configure network topologies, run
simulations, and view real-time results. The project seeks to create a platform that can cater to
network researchers, educators, and practitioners, providing them with the ability to test network
designs, simulate network traffic, and evaluate performance metrics such as bandwidth, delay,
packet loss, and jitter. Another important goal is to ensure that the tool can scale with large
network topologies while maintaining performance accuracy.
The primary objective of this project is to create a comprehensive network simulation tool that
simplifies the process of designing, simulating, and analyzing network configurations. The tool
is designed to support both wired and wireless network topologies, and it will include the ability
to simulate a range of common and modern networking protocols such as TCP, UDP, OSPF,
BGP, and SDN. An additional objective is to provide users with a graphical user interface (GUI)
that allows for the easy creation of custom network topologies through drag-and-drop
functionality. This will make the tool more accessible to non-expert users, allowing them to
configure networks and run simulations without needing to learn complex scripting languages.
The tool will also provide real-time performance metrics such as throughput, latency, packet
loss, and jitter, giving users the ability to evaluate network behavior under various conditions.
Another critical goal is to ensure the tool can scale to handle large network topologies efficiently,
allowing for the simulation of complex networks without sacrificing accuracy or performance.
7
\SCOPE OF PROJECT
The scope of this project is vast, encompassing the simulation of multiple network scenarios,
including both wired and wireless networks. The simulation tool will focus on layer 2 (data link
layer) and layer 3 (network layer) protocols, but may extend to cover some higher-level protocols
like TCP and UDP. The tool will also allow users to configure custom topologies, simulate
different network conditions such as traffic congestion and link failures, and visualize network
performance in real-time. Beyond basic simulations, the tool will include advanced features like
packet-level simulation, real-time protocol analysis, and support for modern networking
architectures such as Software-Defined Networking (SDN). Given its extensibility, the tool can
be used in various domains, including academic research, commercial network design, and
educational purposes. It will also be designed to allow future enhancements, such as support for
5G networks and IoT simulation. This project encompasses a wide range of functionalities
related to network simulation.
The tool will be capable of simulating various network types, including both wired and wireless
configurations, and will support key protocols across multiple layers of the network stack. The
initial focus will be on simulating protocols at the data link (layer 2) and network layers (layer
3), but the tool may be extended to include higher-level protocols such as TCP and UDP. One
of the core features will be the ability to create custom network topologies, allowing users to
define their own nodes, links, and protocols. In addition to simulating basic network behavior,
the tool will allow users to emulate network congestion, link failures, and other real-world
conditions to analyze how the network responds. Advanced features such as packet-level
simulation, real-time protocol analysis, and support for emerging technologies like Software-
Defined Networking (SDN) and Internet of Things (IoT) devices may also be incorporated. The
extensible nature of the tool ensures that future enhancements can be added to meet the evolving
needs of network research and design.
8
EXISTING SYSTEM
Network simulation tools such as NS2, NS3, GNS3, and OPNET have been widely used for network
research and design. These tools allow users to simulate different network protocols and topologies,
providing detailed insights into network behavior. However, existing systems often present
significant challenges. NS2, for example, though a powerful tool, suffers from complex scripting
languages and lacks a user-friendly graphical interface, making it difficult for non-expert users. NS3,
while an improvement, still has a steep learning curve and lacks certain modern networking features.
OPNET, another widely-used tool, is costly and often out of reach for smaller academic institutions
or individual researchers.
Additionally, many of these systems are not optimized for large-scale simulations, leading to
performance issues when simulating networks of substantial size. These limitations create a gap in
the market for a more accessible, modern, and performance-oriented network simulation tool.
Several existing network simulation tools are widely used in the field of network research and design.
Tools like NS2, NS3, and OPNET have become industry standards, allowing users to simulate
various network topologies and protocols. However, these systems have significant limitations. NS2,
though powerful, relies on a complex scripting language that can be difficult for users to learn,
particularly those new to network simulation.
Its lack of a graphical user interface further compounds this issue. NS3, while an improvement over
NS2, still has a steep learning curve and does not include many modern networking features, limiting
its usefulness in simulating current network environments. OPNET, another popular tool, is costly
and often out of reach for individual researchers or smaller academic institutions. Additionally, these
tools are often not optimized for large-scale network simulations, leading to performance bottlenecks
when dealing with extensive topologies or high traffic loads. The need for a more accessible,
intuitive, and scalable simulation tool is evident, particularly in light of the limitations of existing
systems.
9
PROPOSED SYSTEM
The proposed system seeks to build a user-friendly, extensible, and efficient network simulation
tool that overcomes the shortcomings of existing systems. It will feature a graphical user
interface (GUI) that allows users to easily design and modify network topologies by dragging
and dropping nodes and links. The tool will simulate multiple protocols at various layers of the
network stack, including both common and emerging protocols like TCP, UDP, BGP, and OSPF,
as well as support for SDN. Users will be able to define various parameters such as bandwidth,
link delay, queue sizes, and routing policies. The system will be optimized for performance, with
the capability to simulate large-scale networks without sacrificing accuracy. Additionally, the
tool will include a detailed logging and reporting system to provide insights into network
performance metrics.
The open-source nature of the tool will allow for future contributions and extensions by the
community. The proposed network simulation tool aims to address the shortcomings of existing
systems by providing an intuitive, user-friendly platform that allows users to easily create,
simulate, and analyze network topologies. The tool will feature a graphical user interface (GUI)
that enables users to design custom network configurations by simply dragging and dropping
nodes and links onto a canvas. This visual approach makes the tool more accessible to novice
users, while still providing advanced features for experienced network engineers. The tool will
support the simulation of multiple networking protocols across various layers of the network
stack, including TCP, UDP, BGP, and OSPF, and it will also offer support for Software-Defined
Networking (SDN). Users will have the ability to configure detailed parameters such as
bandwidth, link delay, and routing policies, allowing for precise control over network
simulations. The system will be optimized for large-scale simulations, ensuring that performance
remains consistent even when dealing with complex topologies. Detailed logging and reporting
capabilities will allow users to monitor network performance in real-time, and the open-source
nature of the project will encourage contributions from the broader community, enabling the tool
to evolve with the needs of its users.
10
Architecture Diagram
11
MODULES DESCRIPTION
The system is divided into several core modules. First, the Network Topology Module allows
users to design custom network topologies by specifying nodes, links, and protocols. The
Protocol Simulation Module enables the simulation of various network protocols and their
interactions, focusing on layers 2 and 3 but extensible to other layers. The Traffic Generation
Module allows users to simulate different types of network traffic, such as video streaming or
file transfers, to measure network performance under load. The Performance Monitoring
Module tracks network statistics in real-time, such as throughput, delay, jitter, and packet loss,
providing a comprehensive view of network behavior. Finally, the Results Analysis Module
generates detailed reports and visualizations, allowing users to analyze and interpret the results
of their simulations. These modules work together to provide a comprehensive network
simulation environment. The network simulation tool is composed of several key modules, each
of which plays an important role in the overall functionality of the system:
Network Topology Module: This module allows users to design custom network
topologies by specifying the nodes (e.g., hosts, switches) and links between them. Users
can drag and drop elements onto a canvas to create their desired topology.
Protocol Simulation Module: This module simulates various network protocols, focusing
on layer 2 and layer 3 protocols like Ethernet, IP, OSPF, and BGP. The system can be
extended to support higher-level protocols like TCP and UDP as well.
Traffic Generation Module: This module allows users to simulate different types of
network traffic, such as video streaming, file transfers, and web traffic. By generating
synthetic traffic, users can evaluate how the network performs under different loads.
Performance Monitoring Module: This module tracks key network statistics in real-time,
such as throughput, latency, packet loss, and jitter. These metrics provide valuable insights
into network behavior and allow users to identify potential performance bottlenecks.
12
CODE FOR NETWORK SIMULATION TOOL
from mininet.net import Mininet
from mininet.node import Controller, RemoteController, OVSSwitch
from mininet.link import TCLink
from mininet.cli import CLI
from mininet.log import setLogLevel, info
from mininet.topo import Topo
from mininet.util import dumpNodeConnections
import time
class CustomTopo(Topo):
def build(self):
# Add switches
s1 = self.addSwitch('s1')
s2 = self.addSwitch('s2')
s3 = self.addSwitch('s3')
# Add hosts
h1 = self.addHost('h1', ip='10.0.0.1')
h2 = self.addHost('h2', ip='10.0.0.2')
h3 = self.addHost('h3', ip='10.0.0.3')
h4 = self.addHost('h4', ip='10.0.0.4')
# Link parameters: bw = bandwidth (Mbps), delay = link latency (ms), loss = packet loss
percentage
self.addLink(h1, s1, bw=10, delay='5ms', loss=1, use_htb=True)
self.addLink(h2, s1, bw=10, delay='5ms', loss=1, use_htb=True)
self.addLink(h3, s2, bw=15, delay='2ms', loss=0.5, use_htb=True)
self.addLink(h4, s2, bw=15, delay='2ms', loss=0.5, use_htb=True)
# Connect switches with high-bandwidth, low-latency links
self.addLink(s1, s2, bw=100, delay='1ms', loss=0, use_htb=True)
self.addLink(s2, s3, bw=100, delay='1ms', loss=0, use_htb=True)
# Connect s3 back to s1 to form a triangle
self.addLink(s3, s1, bw=100, delay='1ms', loss=0, use_htb=True)
def run():
"Create network and run simple performance tests."
topo = CustomTopo()
net = Mininet(topo=topo, controller=RemoteController, link=TCLink, switch=OVSSwitch)
# Start network
net.start()
# Print the connections between nodes
13
info("*** Dumping host connections\n")
dumpNodeConnections(net.hosts)
# Test connectivity by pinging between all hosts
info("*** Testing network connectivity\n")
net.pingAll()
# Simulate traffic with Iperf to measure bandwidth and latency
info("*** Running bandwidth test between h1 and h4\n")
h1, h4 = net.get('h1', 'h4')
# Start iperf server on h4
h4.cmd('iperf -s &')
# Run iperf client on h1 to test TCP performance
info("*** Testing TCP bandwidth from h1 to h4\n")
h1.cmd('iperf -c 10.0.0.4 -t 10') # 10 seconds of TCP traffic
# Run iperf client on h2 to test UDP performance
info("*** Testing UDP traffic from h2 to h3\n")
h2, h3 = net.get('h2', 'h3')
h3.cmd('iperf -s -u &') # Start UDP server on h3
h2.cmd('iperf -c 10.0.0.3 -u -t 10 -b 5M') # Send UDP traffic at 5 Mbps for 10 seconds
# Simulate network traffic with delay
info("*** Introducing network delay and simulating traffic\n")
h1.cmd('ping -c 5 10.0.0.2 &') # Ping with delay to simulate network performance
# Capture traffic using tcpdump for post-simulation analysis
info("*** Capturing traffic on h2 using tcpdump\n")
h2.cmd('tcpdump -i h2-eth0 -w h2_traffic.pcap &')
time.sleep(5) # Let the network run some tests
# Stop tcpdump after testing
h2.cmd('kill %tcpdump')
# Allow CLI interaction for further testing
CLI(net)
# Stop the network after testing
net.stop()
if __name__ == '__main__':
setLogLevel('info')
run()
14
CONCLUSION
The development of the network simulation tool represents a significant advancement in the field
of network research and education. By addressing the limitations of existing tools and providing
a user-friendly interface, the tool allows both novices and experts to simulate, analyze, and
optimize network designs with greater ease and flexibility. The implementation of various
modules ensures comprehensive functionality, from topology design to performance analysis,
making it a versatile tool for multiple applications. The ability to simulate modern protocols and
large-scale networks ensures that the tool will remain relevant as networking technology
continues to evolve.
Future improvements may include support for emerging technologies such as 5G and IoT, further
enhancing its capabilities. In conclusion, the network simulation tool developed as part of this
project offers a significant improvement over existing systems by providing a more intuitive,
flexible, and scalable platform for network simulation. By addressing the key limitations of
existing tools, such as steep learning curves, limited protocol support, and poor performance on
large-scale simulations, this tool will enable users to design, simulate, and analyze complex
networks with ease. The modular architecture of the tool ensures that it is both extensible and
adaptable to future networking technologies, such as 5G and IoT. The combination of a graphical
user interface, comprehensive protocol support, and real-time performance monitoring makes
this tool a valuable resource for network researchers, educators, and practitioners alike. As the
tool continues to evolve, it has the potential to become an indispensable asset in the field of
network simulation and analysis.
15
REFERENCES
Fall, K., & Varadhan, K. (2000). NS2 simulator.
Retrieved from https://www.isi.edu/nsnam/ns
Riley, G. F., & Henderson, T. R. (2010). The NS3 network simulator.
In Modeling and Tools for Network Simulation.
Breslau, L., Estrin, D., Fall, K., Floyd, S., Heidemann, J., Helmy, A., ... & Sharma, P. (2000).
Advances in network simulation. IEEE Computer, 33(5), 59-67. doi:10.1109/2.841784
Henderson, T. R., Roy, S., Floyd, S., & Riley, G. F. (2006). NS-3 project goals. Proceedings
of the 2006 Workshop on ns-2: The IP Network Simulator, 13-18.
Bianchi, G. (2000). Performance analysis of the IEEE 802.11 distributed coordination
function. IEEE Journal on Selected Areas in Communications, 18(3), 535-547.
Pullen, J. M., & Drake, T. (2005). Simulation of Internet-based protocols. Proceedings of
the 37th Winter Simulation Conference, 2654-2663.
16