0% found this document useful (0 votes)
61 views87 pages

5G Network Simulation with NS3 Report

Uploaded by

koushikmaram17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views87 pages

5G Network Simulation with NS3 Report

Uploaded by

koushikmaram17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

“ PROJECT TITLE “

Mini- Project Report Submitted


In partial fulfillment of the requirement for the award of the degree of

Bachelor of Technology
in

Computer Science and Engineering


(Data Science/ AIML)
by
Name’s H.T No’s
AAAA 22W91A6701
BBBB 22W9IA6702

Under the Guidance of

“Internal Guide Name”


Designation
Department of Computer Science and Engineering (DS, AIML)
MRIET (Autonomous, UGC Govt. of India)

DEPARTMENT OF CSE (DS, AIML)


MALLA REDDY INSTITUTE OF ENGINEERING AND TECHNOLOGY
(UGC AUTONOMOUS)
(Sponsored by Malla Reddy Educational society)
(Affiliated to JNTU, Hyderabad)
Maisammaguda, Dhulapally post, Secunderabad-500014.

2023-2024
DECLARATION

I hereby declare that the project entitled “5G NETWORK SIMULATION USING
NS3” submitted to Malla Reddy Institute of Engineering and Technology, UGC
Autonomous Institution, affiliated to Jawaharlal Nehru Technological University
Hyderabad (JNTUH) as part of III Year B. Tech – II Semester and for the partial
fulfillment of the requirement for the award of Bachelor of Technology in Computer
Science and Engineering ( Data Science/AIML) is a result of original research work
done by me.

It is further declared that the project report or any part thereof has not been
previously submitted to any University or Institute for the award of degree or
diploma.

[Link] kumar 20***6947


XXXXXX
CERTIFICATE

This is to certify that this is the bonafide record of the project titled “5G
NETWORK SIMULATION USING NS3” submitted by Rampalli Nikhil
Sai, bearing Roll no 20N31A6947 Student of B Tech III Year – II Semester in
the partial fulfillment of the requirements for the degree of Bachelor of
Technology in Computer Science and Engineering (Data Science/AIML),
Dept. of CSE (DS, AIML) during the year 2023-2024. The results embodied in
this project report have not been submitted to any other university or institute for
the award of any degree or diploma.

Project Guide Head of the Department


Department of CSE(DS,AIML) CSE (DS,AIML)

EXTERNAL EXAMINER

Date of Viva-Voce Examination held on:


ACKNOWLEDGEMENT

First and foremost, I am grateful to the Principal Dr. P. SRINIVAS, for providing me
with all the resources in the college to make my project a success. I thank him for his
valuable suggestions at the time of seminars which encouraged me to give my best in
the project.

I would like to express my gratitude to Dr. NARENDHAR MULUGU, Head of the


Department, Department of Computer Science and Engineering (Data Science,AIML) for
his support and valuable suggestions during the dissertation work.

I offer my sincere gratitude to my project - coordinator Mr./Mrs./Dr. XXXXX and


internal guide Mr./Mrs./Dr. XXXXX Assistant Professor/ Associate Professor/
Professor of Computer Science and Engineering (DS,AIML)department who has
supported me throughout this project with their patience and valuable suggestions.

I would also like to thank all the supporting staff of the Dept. of CSE(DS,AIML) and all
other departments who have been helpful directly or indirectly in making the project a
success.

I am extremely grateful to my parents for their blessings and prayers for my completion
of project that gave me strength to do my project

XXXXXXXX 19W91A05XX
XXXXXXXX 19W91A05XX
XXXXXXXX 19W91A05XX
XXXXXXXX 19W91A05XX

I
ABSTRACT

This project focuses on leveraging the capabilities of the ns-3


network simulator to analyze and simulate network behavior,
particularly in the context of 5G networks. The project
encompasses a comprehensive exploration of various aspects of
network simulation, including network topology setup, application
configuration, tracing mechanisms, and analysis of TCP
congestion control behavior. The project begins with an overview
of the ns-3 simulation framework and its relevance in simulating
5G networks. It then delves into the setup of network topologies,
covering scenarios involving point-to-point links, CSMA LANs, and
wireless networks. Detailed explanations are

II
TABLE OF CONTENTS

Chapter No. Contents Page No

1 Introduction 1-9
1.1 Introduction 1-4
1.2 Motivation 5
1.3 Literature Review 6-8
1.4 Problem Definition 8
1.5 Objective of the Project 8-9
2 System Analysis 10-14
2.1 Existing and Proposed System 10-12

2.2 Functional Requirements 12-14

3 Software Environment 15-19

3.1 Software 15

4 System Design and Architecture 20-22

4.1 Data Flow Diagram 20

4.2 Architecture Diagram 21

4.3 Class Diagram 21

4.4 Sequential Diagram 22

5 Software Development Life Cycle 23-26

5.1 Phases of SDLC 23

6 Implementation 27-63

6.1 Sample Code 27

7 Testing 64-66

7.1 Introduction 64-65

7.2 Sample Test cases 66

I
I
8 Output Screen 67-68

8.1 Screenshots 67

9 Conclusion and Future Scope 69-70

10 References 71

10.1 Websites 71

10.2 Books 71

10.3 Publications 72-79

II
I
LIST OF FIGURES

[Link] Figure Title Page No

1 5G Basic Network Architecture 1

2 Handover process 3

3 PDCP Layer Architecture 10

4 PDCP in detail 12

5 Ns3 logo 15

6 Wireshark Logo 17

7 Dataflow Diagram 20

8 Architectural Diagram 21

9 Class Diagram 21

10 Sequential Diagram 22

11 Phases of SDLC 23

12 BlackBox Testing 64

13 67

14 67

15 67

16 68

17 68

18 68

19 68

I
V
LIST OF TABLES

S No Table Name Page No


1. Sample test cases 66

V
CHAPTER 1
INTRODUCTION

1.1 INTRODUCTION
Wireless communication is the transmission of data over long
distances without the need for physical cables. Understanding its
foundational principles is essential for grasping the intricacies of
5G technology.
●Transmission Mediums and Propagation: Different transmission
mediums, such as air or space, affect signal propagation.
Understanding how signals propagate through various mediums is
crucial.
● Frequency Spectrum Allocation: The allocation of frequency
bands determines the capacity and performance of wireless
communication systems.
● Modulation Techniques: Modulation schemes convert digital
data into analog signals for transmission, with techniques like
amplitude modulation (AM) and frequency modulation (FM).
● Signal Encoding and Decoding: Encoding and decoding methods
ensure accurate data transmission and reception.

Fig 1. 5G Basic Network Architecture

1
Radio Signal Properties
Radio signals are the carriers of wireless communication,
transmitting data through electromagnetic waves. Understanding
their properties is essential for optimizing signal transmission and
reception.
●Frequency and Wavelength: Frequency determines the number
of cycles per second, while wavelength is the distance between
two consecutive peaks.
● Amplitude and Phase Modulation: Modulation techniques that
alter the amplitude or phase of the carrier signal to encode data.
● Signal Attenuation and Propagation Loss: Signal attenuation
refers to the weakening of signals over distance, influenced by
factors like obstacles and interference.
●Signal-to-Noise Ratio (SNR) and Signal Strength: SNR measures
the ratio of signal power to noise power, while signal strength
indicates the power of the received signal.
Factors Affecting Data Rate
The data rate, or throughput, of a wireless communication system
depends on various factors. Understanding these factors is
essential for optimizing network performance.
● Channel Bandwidth and Spectral Efficiency: Wider bandwidth
allows for higher data rates, while spectral efficiency maximizes
the data throughput within the available bandwidth.
●Signal-to-Interference Ratio (SIR): SIR measures the quality of
the received signal relative to interference from other sources.
● Multipath Propagation and Fading: Multipath propagation occur
when signals reach the receiver via multiple paths, leading to
fading and signal degradation.
● Coding and Error Correction Techniques: Error correction
codes ensure data integrity by detecting and correcting errors
that occur during transmission. General Concepts Behind Cellular
Communication
Cellular communication divides geographical areas into cells
served by base stations, enabling widespread wireless
connectivity. Understanding its concepts is crucial for
2
understanding the evolution to 5G networks.
●Cell Layout and Frequency Reuse: Cells are arranged in a grid
pattern, with frequency reuse maximizing spectral efficiency.

3
●Handover and Mobility Management: Handover ensures seamless
transition between cells as mobile devices move, while mobility
management tracks device locations.
● Cell Site Infrastructure and Network Topology: Cell sites consist
of base stations, antennas, and other infrastructure components,
interconnected to form a cellular network.
●Cellular Protocols and Standards: Various protocols and
standards govern cellular communication, ensuring
interoperability and compatibility between different network
elements.

5G NR Vision and Capabilities


5G New Radio (NR) represents the next evolution in wireless
technology, promising transformative capabilities to meet growing
demands for connectivity.
●Ultra-High Data Rates: 5G offers significantly higher data rates
compared to previous generations, enabling bandwidth-intensive
applications like ultra- HD video streaming and virtual reality.

Fig 2. Handover process

●Ultra-Low Latency: 5G aims to minimize latency, reducing the


time it takes for data to travel between devices and networks.
● Massive Device Connectivity: 5G supports a massive number of
connected devices, catering to the growing Internet of Things
(IoT) ecosystem.
4
●Enhanced Reliability: 5G networks prioritize reliability, ensuring
consistent connectivity for mission-critical applications like
autonomous vehicles and industrial automation.
Why We Need 5G
The proliferation of smart devices, IoT applications, and emerging
technologies necessitates the deployment of 5G networks to
address evolving connectivity demands.
● Growing Bandwidth Demand: Increasing usage of bandwidth-
intensive applications requires higher data rates and network
capacity.
● Emerging Use Cases: New applications like autonomous
vehicles, remote healthcare, and smart cities require ultra-low
latency and reliable connectivity.
● IoT Expansion: The IoT ecosystem continues to expand, with
billions of connected devices requiring efficient and scalable
connectivity solutions.
●Industry Advancements: Industries such as manufacturing,
transportation, and energy are leveraging connectivity for
automation and optimization. Fundamental Technological Capabilities
of 5G

Key technological advancements in 5G enable its


transformative capabilities, ranging from massive MIMO to edge
computing.
● Massive MIMO: Utilizes multiple antennas to improve
spectral efficiency and throughput.
● Millimeter Wave Spectrum: Exploits higher frequency bands for
increased capacity and data rates.
● Network Slicing: Enables the creation of virtualized network
slices tailored to specific services or applications.
● Software-Defined Networking (SDN) and Network Function
Virtualization (NFV): Enhances network flexibility, scalability, and
efficiency.
●Edge Computing: Moves computing resources closer to the user
for reduced latency and improved performance.
Key Service Classes of 5G
5
5G caters to diverse use cases through three main service
classes: Enhanced Mobile Broadband (eMBB), Massive Machine Type
Communications (mMTC), and Ultra-Reliable Low-Latency
Communications (URLLC).
●Enhanced Mobile Broadband (eMBB): Provides high data rates
and capacity for applications like ultra-HD video streaming and
immersive gaming.

6
● Massive Machine Type Communications (mMTC): Supports a
massive number of IoT devices with low-power and low-complexity
connectivity.
● Ultra-Reliable Low-Latency Communications (URLLC): Ensures
ultra-low latency and high reliability for mission-critical
applications such as autonomous vehicles and industrial
automation.

1.2 MOTIVATION

The motivation for the development and deployment of 5G


networks arises from the pressing need to address the evolving
demands of modern telecommunications. With the exponential
growth in mobile data traffic driven by the widespread adoption of
smartphones, tablets, and Internet of Things (IoT) devices, there is
a critical need for faster, more reliable, and more connected
communication systems. 5G networks are designed to meet these
demands by offering higher data rates, lower latency, and greater
capacity compared to previous generations. This enhanced
performance enables a wide range of innovative applications and
use cases across industries, including augmented reality, virtual
reality, autonomous vehicles, remote healthcare, industrial
automation, and smart cities. Furthermore, 5G networks provide
massive IoT connectivity, supporting billions of interconnected
devices and enabling seamless communication between them. This
connectivity is essential for realizing the vision of smart homes,
smart cities, and the industrial Internet of Things (IIoT).
Additionally, 5G technology delivers an enhanced mobile
broadband experience, enabling high-definition video streaming,
online gaming, video conferencing, and cloud computing with
unparalleled speed and reliability. Moreover, 5G networks offer
ultra-reliable and low-latency communication, making them
suitable for mission-critical applications in healthcare,
transportation, public safety, and manufacturing. Overall, the
motivation for 5G lies in unlocking new opportunities for economic
7
development, social inclusion, and sustainable growth while
driving innovation and connectivity in the digital age.

8
1.3 LITERATURE REVIEW

[1] Andrews, Jeffrey G. - "Faster Data Speeds: Advancements in 5G


Technology"
Jeffrey G. Andrews' research focuses on the advancements in data
speeds brought about by 5G technology. With the potential to
achieve peak speeds of up to 20 Gbps, 5G networks offer a
significant improvement over previous generations. This capability
enables users to enjoy high-definition video streaming, real-time
gaming, and seamless multimedia experiences on their devices.
[2] Ghosh, Amitava - "Ultra-Low Latency: Enhancing Connectivity with
5G"
Amitava Ghosh's research highlights the ultra-low latency
capabilities of 5G networks and their impact on connectivity.
With latency as low as 1 millisecond, 5G technology opens up
possibilities for applications such as autonomous vehicles,
remote surgery, and augmented reality. This ultra-low latency
ensures minimal delay in data transmission, enhancing user
experiences and enabling real-time interactions.
[3] Rappaport, Theodore S. - "Massive IoT Connectivity: Scaling with 5G
Networks"
Theodore S. Rappaport's research delves into the scalability of 5G
networks in supporting massive IoT connectivity. With the ability
to accommodate up to 1 million devices per square kilometer, 5G
networks empower various sectors such as smart cities, industrial
automation, and smart agriculture. This scalability enables
seamless communication and coordination among a multitude
of IoT devices, driving efficiency and innovation.
[4] Zhang, Jianzhong - "Addressing Infrastructure Challenges in 5G
Deployment"
Jianzhong Zhang's research focuses on the infrastructure
challenges associated with deploying 5G networks. This includes
the need to densify network coverage, optimize spectrum
allocation, and ensure seamless connectivity across diverse
geographical areas. Addressing these challenges is essential for
9
the successful deployment and operation of 5G networks, enabling
reliable and high-performance wireless communication services.

1
0
[5] Boccardi, Federico - "Spectrum Allocation and Interference
Management in 5G"
Federico Boccardi's research explores the complexities of
spectrum allocation and interference management in 5G networks.
Effectively managing spectrum resources and mitigating
interference are crucial for optimizing network performance,
particularly in densely populated urban environments. This
research investigates techniques and strategies to ensure efficient
spectrum utilization and minimize interference, enhancing the
quality of service for users.
[6] Dhillon, Harpreet Singh - "Security and Privacy Concerns in 5G
Networks"
Harpreet Singh Dhillon's research highlights the security and
privacy concerns associated with 5G networks. As 5G facilitates
the exchange of sensitive data across a multitude of devices,
robust security protocols and privacy protections are essential to
prevent security breaches, data breaches, and unauthorized
access. This research explores vulnerabilities inherent in 5G
infrastructure and proposes strategies to enhance security and
privacy safeguards.
[7] Wang, Yingying - "Future Directions: Network Slicing and
Virtualization"
Yingying Wang's research discusses future directions for 5G
technology, with a focus on network slicing and virtualization.
Network slicing enables the creation of virtualized network
instances tailored to specific applications or user requirements,
allowing for dynamic resource allocation and service
customization. This research explores the potential of network
slicing to enhance quality of service and support diverse use cases
in 5G networks.

[8] Sun, Qianmu - "Global Collaboration and Regulatory Frameworks for


5G"
Qianmu Sun's research discusses the importance of global
collaboration and regulatory frameworks for the successful
1
1
deployment and operation of 5G networks worldwide.
Standardization bodies and regulatory authorities play a crucial
role in establishing interoperability standards, spectrum policies,
and security protocols. This research emphasizes the need for
international

1
2
cooperation and regulatory harmonization to ensure the seamless
adoption and advancement of 5G technology on a global scale.

1.4 PROBLEM DEFINITION


The problem definition for developing 5G networks encompasses a
multitude of challenges spanning technical, economic, and societal
domains. Key areas of concern include meeting stringent
performance requirements such as higher data rates, lower
latency, and increased capacity, which demand innovative
spectrum allocation strategies and network architecture designs.
The high cost of infrastructure deployment, particularly in
underserved regions, presents a barrier to widespread 5G
adoption, necessitating cost- effective deployment solutions and
infrastructure sharing agreements. Ensuring interoperability and
adherence to global standards is crucial for seamless connectivity
across heterogeneous networks, requiring concerted efforts in
standardization and interoperability testing. Additionally,
addressing security and privacy concerns associated with the
complexity and interconnectedness of 5G networks is imperative to
safeguarding against cyber threats and protecting user data.
Regulatory and policy considerations, including spectrum
management policies and privacy regulations, further complicate
the development and deployment of 5G networks, emphasizing the
need for comprehensive and coordinated approaches to address
these multifaceted challenges.

1.5 OBJECTIVE
This project aims to develop a robust network simulation system
using the ns- 3 framework, providing users with a versatile tool to
simulate and analyze diverse network scenarios. The primary
objective is to enable users to understand protocol behavior,
packet flows, and network performance through simulations. Key
features include Wireshark tracing for detailed packet-level
analysis,
1
3
ASCII tracing for concise event representation, and visualization
using NetAnim for graphical illustration of simulation scenarios.
Additionally, the project focuses on studying TCP congestion
control behavior within simulated

1
4
environments. Overall, this comprehensive simulation system will
serve as a valuable resource for researchers, network engineers,
and students, facilitating experimentation, analysis, and
understanding of network dynamics and protocols.

1
5
CHAPTER 2
SYSTEM ANALYSIS

2.1 EXISTING SYSTEM AND PROPOSED


SYSTEM EXISTING SYSTEM

In the existing system architecture of 5G networks, the PDCP


(Packet Data Convergence Protocol) layer plays a crucial role in
ensuring efficient and reliable data transmission. The PDCP layer
is responsible for header compression, integrity protection, and
ciphering of user data packets exchanged between the UE (User
Equipment) and the core network. However, these security
functions, such as integrity protection and ciphering, are typically
performed as separate operations from header compression. This
means that the data packets undergo multiple processing stages,
resulting in

Fig 3. PDCP Layer Architecture

increased overhead, latency, and resource consumption within the


network.

The Packet Data Convergence Protocol (PDCP) layer is a crucial


component of the LTE (Long-Term Evolution) and 5G wireless
10
communication standards. It operates between the RLC (Radio
Link Control) and RRC (Radio Resource Control) layers in the
protocol stack,

10
providing various functionalities related to the transmission of user
data packets over the air interface. From a structural perspective,
the PDCP layer can be viewed in terms of its key components
and their roles within the network architecture:

Header Compression Unit (HC):


The Header Compression Unit (HC) is responsible for compressing
and decompressing packet headers to reduce overhead and
improve efficiency in data transmission. It employs compression
algorithms such as ROHC (Robust Header Compression) to
minimize the size of packet headers, particularly for IP (Internet
Protocol) packets. By reducing the header size, the HC optimizes
bandwidth utilization and enhances the overall throughput of the
network.

Ciphering and Integrity Protection:


The PDCP layer incorporates mechanisms for ciphering and
integrity protection to ensure the confidentiality, integrity, and
authenticity of user data packets. Ciphering involves encrypting
the payload of the packets using cryptographic algorithms to
prevent unauthorized access and eavesdropping. Integrity
protection, on the other hand, involves adding cryptographic
integrity checks (such as hash functions or message
authentication codes) to detect and prevent data tampering or
corruption during transmission.

Reordering and Reassembly:


In addition to header compression and security functions, the
PDCP layer also manages packet reordering and reassembly
processes. This is particularly important in wireless
communication systems where packets may arrive out of order or
become lost due to transmission errors or network congestion. The
PDCP layer reorders packets based on sequence numbers and
reassembles them into the correct order before passing them to
higher layers for further processing.
11
Radio Bearer Management:
The PDCP layer is responsible for managing radio bearers, which
represent logical channels used for data transmission between the
UE (User Equipment) and the base station (eNodeB in LTE or
gNodeB in 5G). This includes establishing, maintaining, and
releasing radio bearers based on network

12
conditions, user requirements, and quality of service (QoS)
[Link] PDCP layer configures and allocates resources for
radio bearers to ensure efficient and reliable communication
between the UE and the network.

PROPOSED SYSTEM
In the proposed system refinement, we aim to enhance the
effectiveness of 5G networks by integrating the functionality of
integrity protection and ciphering directly into the header
compression process within the UE-NGRAn and NGRan/Ue
interfaces. This integration streamlines the data transmission
process by consolidating security functions into the header
compression mechanism. Instead of performing integrity
protection and ciphering as separate operations, the proposed
system combines these functions with header compression,
thereby reducing processing overhead and improving network
efficiency.

Fig 4. PDCP in detail

5G Implications:
Integrating integrity protection and ciphering into header
compression in the proposed system has several implications for
13
the effectiveness of 5G networks:

14
Reduced Overhead and Latency: By combining security functions with
header compression, the proposed system reduces the number of
processing stages and associated overhead in data transmission.
This leads to lower latency, improved responsiveness, and
enhanced user experience in 5G networks, particularly for delay-
sensitive applications such as augmented reality, virtual reality,
and real-time gaming.

Optimized Resource Utilization: Streamlining security functions within


header compression optimizes resource utilization within the
network. With fewer processing tasks and reduced overhead, 5G
networks can allocate resources more efficiently, ensuring optimal
performance and scalability to support a growing number of
connected devices and applications.

Enhanced Security Posture: Integrating integrity protection and


ciphering into header compression enhances the overall security
posture of 5G networks. By applying security measures at the
protocol level, the proposed system ensures end-to-end data
integrity and confidentiality without compromising performance.
This strengthens the resilience of 5G networks against cyber
threats and unauthorized access, safeguarding critical data and
infrastructure.

In summary, the proposed integration of integrity protection and


ciphering into header compression enhances the effectiveness of
5G networks by reducing overhead, optimizing resource utilization,
and enhancing security measures. This refinement streamlines
data transmission processes, improves network performance, and
ensures robustness in the face of evolving security challenges,
making 5G networks more efficient and resilient.

2.2 FUNCTIONAL REQUIREMENTS (HARDWARE


AND SOFTWARE)

HARDWARE REQUIREMENT SPECIFICATIONS


15
• Ram: 4GB or more
• Processor: Intel Core i5 or More
• Hard disk space: 250GB or more

16
SOFTWARE REQUIREMENT SPECIFICATIONS
• Operating System: Ubuntu
• NetAnim: To simulate the packet flow in the network.
• Packages: ns3-tools, CMake.
• Languages: C/C++
• IDE: Visual Studio Code
• Wireshark

17
CHAPTER 3
SOFTWARE ENVIRONMENT

3.1 SOFTWARE
NetAnim
It is a powerful visualization tool integrated with the ns-3
(Network Simulator version 3) framework, specifically designed to
facilitate the visualization of network simulations. It provides a
graphical representation of network topologies, node movements,
packet transmissions, and other simulation events, allowing users
to visualize and analyse the behaviour of network protocols and
algorithms in a dynamic and intuitive manner. NetAnim supports
various visualization features, including node placement, link
animation, packet tracing, and event plotting, enabling users to
gain insights into the performance, scalability, and behavior of
network protocols in simulated environments.

NS3

Fig 5. Ns3 logo

ns-3, on the other hand, is a discrete-event network simulator


developed as an open-source project, primarily aimed at research
and education in the field of networking. It provides a flexible and
extensible platform for simulating complex network scenarios,
enabling researchers, network engineers, and students to
experiment with different network configurations, protocols, and
algorithms in a controlled environment. ns-3 supports the
simulation of various network technologies, including wired,
wireless, and satellite networks, and offers a wide range of
models and modules for simulating network elements such as
18
nodes, links, protocols, and applications.

19
In the context of 5G simulation, NetAnim and ns-3 play
complementary roles in facilitating the design, implementation,
and evaluation of 5G networks and protocols. NetAnim enables
users to visualize the behavior of 5G networks in a graphical
format, allowing for the observation of node movements, signal
propagation, handovers, and other network events. This
visualization capability is particularly valuable for understanding
the dynamics of mobility, coverage, and resource allocation in 5G
networks, which are essential aspects of 5G performance and
optimization.

Meanwhile, ns-3 provides the underlying simulation engine for


modeling and simulating 5G networks, allowing users to define
network topologies, configure network parameters, and simulate
various scenarios to assess the performance of 5G protocols and
technologies. With its extensive library of models and modules, ns-
3 enables researchers to study different aspects of 5G networks,
including radio access technologies, core network architectures,
mobility management, quality of service (QoS) mechanisms, and
network slicing.
The integration of NetAnim with ns-3 enhances the usability and
effectiveness of 5G simulations by providing a visual
representation of simulation results. Researchers and practitioners
can use NetAnim to observe the behavior of 5G networks in real-
time, identify performance bottlenecks, validate simulation results,
and communicate their findings more effectively. By combining the
simulation capabilities of ns-3 with the visualization capabilities of
NetAnim, users can gain deeper insights into the operation and
optimization of 5G networks, ultimately contributing to the
advancement of 5G technology and standards.

C/C++
C Language Support: ns-3 offers support for programming network
simulations using the C programming language, allowing users to
11
0
write simulation models, protocols, and applications in C. While C
is less commonly used compared to C++ in ns-3 development, it
provides a lightweight and efficient option for users familiar with
the C programming language.

11
1
C-based modules and components can be seamlessly integrated
with existing ns-3 simulation environments and libraries, enabling
users to leverage the flexibility and extensibility of the ns-3
framework while programming in C.

C++ Language Support: C++ is the primary programming


language used in ns- 3 development, and the majority of ns-3
modules, libraries, and examples are written in C++. C++ offers a
rich set of features, including object-oriented programming (OOP),
templates, classes, inheritance, polymorphism, and standard
libraries, making it well-suited for
developing complex network simulation models and protocols. ns-3
provides comprehensive support for C++ programming, allowing
users to exploit advanced language features and design patterns to
create efficient, modular, and scalable network simulations.
Both C and C++ programming languages can be used
interchangeably within the ns-3 framework, enabling users to
combine C-based and C++-based components seamlessly within
the same simulation environment. Users can leverage existing ns-3
modules and libraries written in C++ and extend them with
custom C or C++ code to model specific network behaviors,
protocols, or applications. Additionally, ns-3 provides a set of
programming interfaces, APIs, and abstractions in both C and C++
for interacting with simulation objects, accessing simulation
parameters, and manipulating network state, enabling users to
develop sophisticated network simulations using their language of
choice.

WIRESHARK

Fig 6. Wireshark Logo


11
2
Wireshark is a popular and powerful network protocol analyser
that provides extensive features and tools for capturing, analysing,
and troubleshooting network traffic. Its comprehensive set of
capabilities makes it a go-to tool for

11
3
network administrators, security professionals, developers, and
researchers. Here's an in-depth look at the features and tools
offered by Wireshark:

Packet Capture: Wireshark allows users to capture packets from a


network interface in real-time or open pre-recorded packet capture
files. Users can specify capture filters to capture only the packets
of interest based on criteria such as source/destination IP address,
port number, protocol, or packet size.

Packet Analysis: Wireshark provides powerful packet analysis


capabilities, allowing users to inspect individual packets in detail.
It supports decoding and displaying of a wide range of network
protocols, including Ethernet, Wi-Fi, TCP/IP, UDP, HTTP, DNS,
DHCP, SSL/TLS, and many others. Users can view packet headers,
payloads, timestamps, and other relevant information, and apply
color-coded packet coloring rules for easy identification of packet
types.

Protocol Dissection: Wireshark dissects and decodes network


protocols to provide a
human-readable interpretation of packet contents. It supports
hundreds of protocols and
provides detailed protocol information, including header fields,
data structures, and protocol-specific attributes. Users can drill
down into protocol layers, examine protocol hierarchy, and analyze
protocol interactions to understand network behavior and
troubleshoot issues.

Filtering and Searching: Wireshark offers powerful filtering and


searching capabilities to focus on specific packets or patterns
within packet captures. Users can apply display filters to hide
irrelevant packets and highlight packets matching specific criteria.
Additionally, Wireshark supports complex search queries using
regular expressions, allowing users to quickly locate packets
11
4
containing specific data patterns or protocol anomalies.

Statistics and Summary: Wireshark provides statistical analysis and


summary information about captured packets, including packet
count,

11
5
throughput, packet size distribution, round-trip time (RTT), and
protocol usage statistics. Users can generate various statistical
graphs and charts to visualize network performance metrics and
identify trends or anomalies.

Expert Analysis: Wireshark features an expert analysis system that


detects and highlights potential network issues, errors, and
anomalies. It includes built-in heuristic analysis rules and expert
information tooltips to alert users about common problems such as
retransmissions, out-of-order packets, packet loss, and protocol
violations.

Follow TCP Stream: Wireshark allows users to reconstruct and follow


TCP (Transmission Control Protocol) streams to view the entire
conversation between client and server applications. It provides a
unified view of TCP segments, reassembles fragmented data, and
displays the contents of TCP streams in chronological order,
facilitating the analysis of application-layer protocols and
troubleshooting of application-level issues.

Export and Save: Wireshark enables users to export captured


packets or selected packet data in various formats, including plain
text, CSV (Comma- Separated Values), XML (Extensible Markup
Language), JSON (JavaScript Object Notation), and PDML (Packet
Description Markup Language). Users can save packet captures for
offline analysis or share them with colleagues for collaborative
troubleshooting.

Customization and Extensibility: Wireshark is highly customizable and


extensible, allowing users to customize the user interface,
preferences, and settings to suit their specific requirements. It
supports the creation of custom dissectors, plugins, and Lua
scripts to extend its functionality and automate tasks such as
packet analysis, protocol decoding, and report generation.

11
6
CHAPTER 4
SYSTEM DESIGN AND UML DIAGRAMS

4.1 DATAFLOW DIAGRAM

[Grab your reader’s attention with a great quote from the


document or use this space to emphasize a key point. To place
this text box anywhere on the page, just drag it.]

Fig 7. Dataflow Diagram

20
4.2 ARCHITECTURE DIAGRAM

Fig 8. Architectural Diagram

4.3 CLASS DIAGRAM

Fig 9. Class Diagram

21
4.4 SEQUENCE DIAGRAM

Fig 10. Sequential Diagram

22
CHAPTER 5
Software Development Life Cycle

5.1 Phases of SDLC


The Software Development Life Cycle (SDLC) is a structured
process that enables the production of high-quality, low-cost software, in
the shortest possible production time. The goal of the SDLC is to
produce superior software that meets and exceeds all customer
expectations and demands.

The Software Development Life Cycle (SDLC) refers to a


methodology with clearly defined processes for creating high-
quality software. in detail, the SDLC methodology focuses on the
following phases of software development:

 Requirement analysis
 Planning
 Software design such as architectural design
 Software development
 Testing
 Deployment

Fig 11. Phases of SDLC


Planning Stage
Before we even begin with the planning stage, the best tip
we can give you is to take time and acquire proper understanding
23
of app development life

24
cycle. The planning stage (also called the feasibility stage) is
exactly what it sounds like: the phase in which developers will plan
for the upcoming project. It helps to define the problem and scope
of any existing systems, as well as determine the objectives for
their new systems. By developing an effective outline for the
upcoming development cycle, they'll theoretically catch problems
before they affect development and help to secure the funding and
resources, they need to make their plan happen.

Analysis Stage
The analysis stage includes gathering all the specific details
required for a new system as well as determining the first ideas
for prototypes.
Developers may:
• Define any prototype system requirements
• Evaluate alternatives to existing prototypes
• Perform research and analysis to determine the needs of
end-users Furthermore, developers will often create a software
requirement specification or SRS document. This includes all the
specifications for software, hardware, and network requirements
for the system they plan to build. This will prevent them from
overdrawing funding or resources when working at the same place
as other development teams.

Design Stage
The design stage is a necessary precursor to the main
developer stage. Developers will first outline the details for the
overall application, alongside specific aspects, such as its:
• User interfaces
• System interfaces
• Network and network requirements
• Databases
They’ll typically turn the SRS document they created into a
more logical structure that can later be implemented in a
programming language. Operation, training, and maintenance
25
plans will all be drawn up so that developers know what they need
to do throughout every stage of the cycle moving forward.
Once complete, development managers will prepare a design
document to be referenced throughout the next phases of the
SDLC.

26
Development Stage
The development stage is the part where developers actually
write code and build the
application according to the earlier design documents and outlined
specifications. This is where Static Application Security Testing or
SAST tools come into play. Product program code is built per the
design document specifications. In theory, all of the prior planning
and outlined should make the actual development phase relatively
straightforward.
Developers will follow any coding guidelines as defined by the
organization and utilize different tools such as compilers,
debuggers, and interpreters. Programming languages can include
staples such as C++, PHP, and more. Developers will choose the
right programming code to use based on the project specifications
and requirements.

Testing Stage
Building software is not the end. Now it must be tested to
make sure that there aren’t any bugs and that the end-user
experience will not negatively be affected at any point. During the
testing stage, developers will go over their software with a fine-
tooth comb, noting any bugs or defects that need to be tracked,
fixed, and later retested. It’s important that the software overall
ends up meeting the quality standards that were previously
defined in the SRS document. Depending on the skill of the
developers, the complexity of the software, and the requirements
for the end-user, testing can either be an extremely short phase or
take a very long time. Take a look at our top 10 best practices for
software testing projects for more information.

Implementation and Integration Stage


After testing, the overall design for the software will come
together. Different modules or designs will be integrated into the
primary source code through developer efforts, usually by
27
leveraging training environments to detect further errors or
defects.
The information system will be integrated into its
environment and eventually installed. After passing this stage, the
software is theoretically ready for market and may be provided to
any end-users.

28
Maintenance Stage
The SDLC doesn’t end when software reaches the market.
Developers must now move into a maintenance mode and begin
practicing any activities required to handle issues reported by end-
users. Furthermore, developers are responsible for implementing
any changes that the software might need after deployment.
This can include handling residual bugs that were not able to
be patched before launch or resolving new issues that crop up due
to user reports. Larger systems may require longer maintenance
stages compared to smaller systems.

29
CHAPTER 6
IMPLEMENTATION
6.1 SAMPLE
CODE

[Link]
#include "ns3/core-
module.h" #include
"ns3/network-module.h"
#include "ns3/internet-
module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"

Include Directives: These lines include necessary header


files from the ns-3 modules. These headers provide classes,
functions, and constants needed for networking simulation.

// Default Network Topology


//
// [Link]
// n0---------------n1
// point-to-point

Topology Comment: This comment section illustrates the


default network topology planned for the simulation.

using namespace ns3;

NS_LOG_COMPONENT_DEFINE ("FirstScriptExample");

Namespace and Logging Component: This line uses the


namespace ns3 for convenience and defines a logging component
named "FirstScriptExample" using
21
0
NS_LOG_COMPONENT_DEFINE.
int main (int argc, char *argv[])
{

CommandLine cmd ( FILE );

21
1
[Link] (argc, argv);

Main Function: This is the entry point of the program. It


parses command-line arguments using CommandLine to handle
any command-line arguments passed to the program.

Time::SetResolution (Time::NS);
LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO);
LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_INFO);

Time Resolution and Logging Configuration: It sets the time


resolution to nanoseconds using Time::SetResolution and enables
logging for UDP echo client and server applications at the INFO
level.

NodeContainer nodes;
[Link] (2);

Node Creation: It creates a container to hold two


nodes for the simulation.

PointToPointHelper pointToPoint;
[Link] ("DataRate", StringValue ("5Mbps"));
[Link] ("Delay", StringValue ("2ms"));

NetDeviceContainer devices;
devices = [Link] (nodes);

Point-to-Point Link Configuration: It sets up a point-to-point


link between the nodes with a specified data rate and delay using
PointToPointHelper. Then, it installs the devices on the nodes.

21
2
InternetStackHelper stack;

21
3
[Link] (nodes);

Ipv4AddressHelper address;
[Link] ("[Link]", "[Link]");

Ipv4InterfaceContainer interfaces = [Link] (devices);

Internet Stack and IP Address Assignment: It installs the


internet stack on the nodes using InternetStackHelper. Then, it
assigns IPv4 addresses to the point-to-point devices.

UdpEchoServerHelper echoServer (9);


ApplicationContainer serverApps = [Link] ([Link] (1));
[Link] (Seconds (1.0));
[Link] (Seconds (10.0));

UDP Echo Server Setup: It sets up a UDP echo server on


node 1 with port 9. It starts the server application at 1 second
and stops it at 10 seconds.

UdpEchoClientHelper echoClient ([Link] (1), 9);


[Link] ("MaxPackets", UintegerValue (1));
[Link] ("Interval", TimeValue (Seconds (1.0)));
[Link] ("PacketSize", UintegerValue (1024));

ApplicationContainer clientApps = [Link] ([Link]


(0)); [Link] (Seconds (2.0));
[Link] (Seconds (10.0));

UDP Echo Client Setup: It sets up a UDP echo client on


node 0, targeting the address of node 1 with port 9. It specifies
the client's attributes such as the number of packets, interval
between packets, and packet size.
The client application starts at 2 seconds and stops at 10 seconds.
21
4
Simulator::Run ();

21
5
Simulator::Destroy ();
return 0;
}
[Link]
// Default Network Topology
//
// [Link]
// n0 -------------- n1 n2 n3 n4
// point-to-point | | | |
// ================
// LAN [Link]

Header Includes:

#include "ns3/core-
module.h" #include
"ns3/network-module.h"
#include "ns3/csma-
module.h" #include
"ns3/internet-module.h"
#include "ns3/point-to-point-
module.h" #include "ns3/applications-
module.h" #include "ns3/ipv4-global-
routing-helper.h" #include
"ns3/netanim-module.h"

These lines include the necessary header files from the ns-3
module, providing access to various functionalities required for
network simulation.

Namespace:
using namespace ns3;

This line introduces the ns3 namespace, which encapsulates


30
classes, functions, and

objects provided by the ns-3 simulator.

30
Logging:

NS_LOG_COMPONENT_DEFINE ("SecondScriptExample");
This line defines a logging component named
"SecondScriptExample", allowing for logging messages at
different verbosity levels for debugging purposes.

Main Function:

int main (int argc, char *argv[])


{
// Code goes here
return 0;
}

This is the entry point of the program where execution


begins. It takes command-line arguments argc and argv[].

Command Line Parsing:

bool verbose = true;


uint32_t nCsma = 3;

CommandLine cmd ( FILE );


[Link] ("nCsma", "Number of \"extra\" CSMA
nodes/devices", nCsma);
[Link] ("verbose", "Tell echo applications to log if true",

verbose); [Link] (argc,argv);

This section sets up command-line argument parsing using the


CommandLine class. It defines two parameters, nCsma and
verbose, and parses them from command-line arguments.

31
Logging Configuration:

if (verbose)
{
LogComponentEnable ("UdpEchoClientApplication",
LOG_LEVEL_INFO);
LogComponentEnable ("UdpEchoServerApplication",
LOG_LEVEL_INFO);
}

If the verbose flag is set to true, logging for the


UdpEchoClientApplication and UdpEchoServerApplication
components is enabled at the INFO level.

Network Topology Setup:

NodeContainer p2pNodes;
[Link] (2);

NodeContainer csmaNodes;
[Link] ([Link]
(1)); [Link] (nCsma);
This section sets up the network topology by creating two node
containers: p2pNodes for the point-to-point link and csmaNodes
for the CSMA LAN.

Device Configuration:

PointToPointHelper pointToPoint;
[Link] ("DataRate", StringValue ("5Mbps"));
[Link] ("Delay", StringValue ("2ms"));

NetDeviceContainer p2pDevices;
p2pDevices = [Link] (p2pNodes);

32
CsmaHelper csma;
[Link] ("DataRate", StringValue ("100Mbps"));

33
[Link] ("Delay", TimeValue (NanoSeconds (6560)));

NetDeviceContainer csmaDevices;
csmaDevices = [Link]
(csmaNodes);
This part configures the attributes of the point-to-point and CSMA
devices, such as data rate and delay, and installs them on the
respective nodes.

Internet Stack Configuration:

InternetStackHelper stack;
[Link] ([Link]
(0)); [Link]
(csmaNodes);

It installs the Internet stack on the point-to-point node and all

CSMA nodes. IP Address Assignment:

Ipv4AddressHelper address;
[Link] ("[Link]", "[Link]");
Ipv4InterfaceContainer p2pInterfaces;
p2pInterfaces = [Link]
(p2pDevices);

[Link] ("[Link]", "[Link]");


Ipv4InterfaceContainer csmaInterfaces;
csmaInterfaces = [Link]
(csmaDevices);

- his section assigns IP addresses to the point-to-point and CSMA

interfaces. Application Setup:


34
UdpEchoServerHelper echoServer (9);
ApplicationContainer serverApps = [Link]
([Link] (nCsma));
[Link] (Seconds (1.0));
[Link] (Seconds (10.0));

35
UdpEchoClientHelper echoClient ([Link]
(nCsma), 9); [Link] ("MaxPackets", UintegerValue
(1)); [Link] ("Interval", TimeValue (Seconds
(1.0))); [Link] ("PacketSize", UintegerValue
(1024));

ApplicationContainer clientApps = [Link] ([Link] (0));


[Link] (Seconds (2.0));
[Link] (Seconds (10.0));
This part sets up UDP echo server and client applications and
installs them on the CSMA node and point-to-point node,
respectively.

Routing Table Population:

Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
It populates routing tables to enable proper packet forwarding in
the simulated network.

Packet Capture (PCAP) Setup:

[Link] ("second");
[Link] ("second", [Link] (1),
true);
This section enables packet capture for all devices in the point-to-
point link and only for the second CSMA device.

Animation Interface:

AnimationInterface anim ("[Link]");


[Link] ([Link](1),
6, 10);
[Link] ([Link](2), 9, 10);
[Link] ([Link](3), 12, 10);
36
It creates an animation interface using NetAnim and sets constant
positions for specific CSMA nodes to define their positions in the
animation.

Simulation Execution:

37
Simulator::Run ();
Simulator::Destroy
();
This part executes the simulation using Simulator::Run() and
cleans up resources using Simulator::Destroy() once the simulation
completes.

Return Statement:
return 0;
[Link]
We'll explore the setup of a wireless network topology using the
ns-3 simulation framework.
// Default Network Topology
//
// Wifi [Link]
// AP
// * * * *
// | | | | [Link]
// n5 n6 n7 n0-------------n1 n2 n3 n4
// point-to-point | | | |
// ================
// LAN [Link]
2. Required Includes
#include "ns3/core-module.h"
#include "ns3/point-to-point-
module.h" #include "ns3/network-
module.h" #include
"ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/csma-module.h"
#include "ns3/internet-module.h"
#include "ns3/yans-wifi-helper.h"
#include "ns3/ssid.h"

38
These lines include the necessary header files from the ns-3
library, providing functionalities related to core networking,
point-to-point communication, network topology, applications,
mobility, CSMA, Wi-Fi, etc.

39
3. Network Topology
Setup using
namespace ns3;
NS_LOG_COMPONENT_DEFINE("ThirdScriptExamp
le"); int main(int argc, char* argv[]) {

The using namespace ns3; statement allows using symbols


from the ns3 namespace without explicit qualification.
NS_LOG_COMPONENT_DEFINE("ThirdScriptExample"); defines
the logging component for the script.
int main(int argc, char* argv[]) { marks the entry point of the
program, accepting command-line arguments argc and argv.
4. Command-Line Parameter
Parsing bool verbose = true;
uint32_t nCsma = 3;
uint32_t nWifi = 3;
CommandLine cmd;
[Link]("nCsma", "Number of \"extra\" CSMA
nodes/devices", nCsma);
[Link]("nWifi", "Number of wifi STA devices", nWifi);
[Link]("verbose", "Tell echo applications to log if true",
verbose); [Link](argc,argv);

This section sets up command-line parameter parsing,


allowing the user to specify the number of CSMA and Wi-Fi
nodes and enable verbose logging.

5. Network Setup - Creation of Nodes and Channels


// Point-to-Point setup
NodeContainer p2pNodes;
[Link](2);
PointToPointHelper
pointToPoint;

31
0
[Link]("DataRate", StringValue("5Mbps"));
[Link]("Delay", StringValue("2ms"));
NetDeviceContainer p2pDevices;
p2pDevices = [Link](p2pNodes);

31
1
// CSMA setup
NodeContainer
csmaNodes;
[Link]([Link]
(1));
[Link](nCsma);
CsmaHelper csma;
[Link]("DataRate", StringValue("100Mbps"));
[Link]("Delay", TimeValue(NanoSeconds(6560)));
NetDeviceContainer csmaDevices;
csmaDevices = [Link](csmaNodes);

// Wi-Fi setup
NodeContainer
wifiStaNodes;
[Link](nWi
fi);
NodeContainer wifiApNode = [Link](0);
YansWifiChannelHelper channel =
YansWifiChannelHelper::Default(); YansWifiPhyHelper phy;
[Link]([Link]
e()); WifiMacHelper mac;
Ssid ssid = Ssid("ns-3-ssid");
WifiHelper wifi;
NetDeviceContainer
staDevices;
[Link]("ns3::StaWifiMac
",
"Ssid", SsidValue(ssid),
"ActiveProbing",
BooleanValue(false));
staDevices = [Link](phy, mac,
wifiStaNodes); [Link]("ns3::ApWifiMac",

31
2
"Ssid",
SsidValue(ssid));
NetDeviceContainer
apDevices;
apDevices = [Link](phy, mac, wifiApNode);

This section sets up the network topology by creating nodes


and channels for point-to-point, CSMA, and Wi-Fi networks. It
includes setting device attributes, installing devices on nodes, and
configuring Wi-Fi MAC parameters.

31
3
6. Mobility Setup
MobilityHelper
mobility;
[Link]("ns3::GridPositionAllocator",
"MinX", DoubleValue(0.0),
"MinY", DoubleValue(0.0),
"DeltaX", DoubleValue(5.0),
"DeltaY", DoubleValue(10.0),
"GridWidth",
UintegerValue(3),
"LayoutType", StringValue("RowFirst"));
[Link]("ns3::RandomWalk2dMobilityModel",
"Bounds", RectangleValue(Rectangle(-50, 50, -50, 50)));
[Link](wifiStaNodes);
[Link]("ns3::ConstantPositionMobilityModel");
[Link](wifiApNode);

This section sets up mobility for the Wi-Fi nodes, defining


their initial positions and movement behavior. Wi-Fi stations move
randomly within a specified bounding box, while the access point
remains stationary.

7. Protocol Stack Installation

InternetStackHelper stack;
[Link](csmaNodes);
[Link](wifiApNode);
[Link](wifiStaNodes);

Here, the Internet protocol stack is installed on all nodes in


the CSMA and Wi-Fi networks.

8. IP Address Assignment
31
4
Ipv4AddressHelper address;
[Link]("[Link]",
"[Link]");
Ipv4InterfaceContainer p2pInterfaces;

31
5
p2pInterfaces = [Link](p2pDevices);
[Link]("[Link]", "[Link]");
Ipv4InterfaceContainer csmaInterfaces;
csmaInterfaces =
[Link](csmaDevices);
[Link]("[Link]",
"[Link]");
[Link](staDevices);
[Link](apDevices);

IP addresses are assigned to the devices/interfaces of the


point-to- point, CSMA, and Wi-Fi networks.
9. Application Setup - Echo Server and
Client UdpEchoServerHelper
echoServer(9); ApplicationContainer
serverApps =
[Link]([Link](nCs
ma)); [Link](Seconds(1.0));
[Link](Seconds(10.0));
UdpEchoClientHelper echoClient([Link](nCsma),
9); [Link]("MaxPackets", UintegerValue(1));
[Link]("Interval", TimeValue(Seconds(1.0)));
[Link]("PacketSize", UintegerValue(1024));
ApplicationContainer clientApps =
[Link]([Link](nWifi -
1)); [Link](Seconds(2.0));
[Link](Seconds(10.0));
This section sets up echo server and client applications. The
server is installed on the last CSMA node, while the client is
installed on the last Wi- Fi station node.
10. IP Routing Configuration
Ipv4GlobalRoutingHelper::PopulateRoutingTa
bles();
This line configures IP routing, populating the routing
31
6
tables with necessary information for packet forwarding.
11. Stopping the Simulation
Simulator::Stop(Seconds(10.
0));
This command stops the simulation after 10 seconds of simulated
time.

31
7
12. Tracing Setup

[Link]("thirdp/third");
[Link]("thirdp/third", [Link](0));
[Link]("thirdp/third", [Link](0), true);

Tracing is enabled to capture packet traces using pcap.


Traces are saved to files in the "thirdp" directory. Point-to-point,
Wi-Fi AP, and CSMA nodes' traces are enabled.
13. Running the
Simulation
Simulator::Run();
Simulator::Destroy();
return 0;
[Link]
class MyObject : public ns3::Object
{
public:
static ns3::TypeId GetTypeId()
{
static ns3::TypeId tid = ns3::TypeId("MyObject")
.SetParent(ns3::Object::GetTypeId())
.AddConstructor<MyObject>()
.AddTraceSource("MyInteger",
"An integer value to trace.",
ns3::MakeTraceSourceAccessor(&MyObject::m_myInt),
"ns3::TracedValueCallback::Int32");
return tid;
}

MyObject() {}
ns3::TracedValue<int32_t>
m_myInt;
};
40
Trace Sinks

40
A trace sink is a function that receives notifications from trace
sources when events occur or data changes. These functions, also
known as callback

62
0
CHAPTER 7
TESTING

7.1 Introduction

62
1
7.2 Sample Test Cases

Description Input (steps) Expected Obtained Result Remarks


result result (If fails)

TC_1 Verify Compile the Compilation Compilation Pass The


.
compilation of "[Link]" file succeeds completes output
"[Link]" file. using the ns- without any successfully. matched
3 build errors. with the
system. expected
output.

TC_2. Import Check for Required Proper Fail The import


ns- import
necessary ns- proper import 3 modules statements statement
s
3 modules statements in are not found. are not
and
libraries in "[Link]". imported. included
"[Link]" exactly

TC_3. Verify setup Run the Network Nodes are Pass -


of
network simulation topology is initialized
topology and scenario configured and network
node defined in correctly topology is
configuration "[Link]". with set up as
s.
specified expected.
nodes.

62
2
CHAPTER 8
OUTPUT SCREEN

8.1 SCREENSHOTS

Fig 13. [Link]

62
3
62
4
CHAPTER 9
CONCLUSION AND FUTURE SCOPE

CONCLUSION

FUTURE SCOPE
.

70
CHAPTER 10
REFERENCES

10.1 Websites
1. Ns3 - [Link]
2. Wireshark - [Link]
3. NetAnim - [Link]
simulation- using-netanim/

10.2 Books
1. [Link]
1TNAnVuhiDW7obXZQU65X_6b17T_7ejI7moWHPCFGVo9FZm7pYXQNjs3cP8uD1dIhnToUjQv
8CzSg

2. [Link] [5G NR
Configured Grant in ns-3 Network Simulator for Ultra-Reliable Low
Latency Communications]

3. [Link]
4wewmFzfuUlSZQMe4G6Gfa5uldleV8n4PEqXPDFFDX7jykgbCJShwSjIf0GB0nK3blh04ykNP5fA
[ importance of the simulation against encryption]

4. [Link]
EQ19GT5YzbezfQ00s43bEVnKSIA0uRkSBGq_UmS1yjYvQ0QBMRPt2aKzf6_a6V9DB7KH9xjWsC
7w [SPECTRAL TEMPORAL GRAPH NN FOR CSI PREDICITION]

5. [Link]
ccJH9hBXXsajmMvbQwG1fXeFqTiTjrA_J4twA4muYogpwyr4p01cibrDoB_u_49OzbRf0sXrKVlA
[CONTINUOUS SPECTRAL QoS TRANSFER FOR VEDIO STREAMING]

6. [Link] [UPLINK COVERAGE


ENHANCEMENTS FOR CSI PREDICTION]

71
10.3 Publication

72

You might also like