Advanced Network Simulations Simplified - Dr Anil Kumar Rangisetti - E-Book

Advanced Network Simulations Simplified E-Book

Dr Anil Kumar Rangisetti

0,0
32,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Network simulation is a powerful technique that uses software programs to replicate the behaviors of real networks. Network simulators are programs that can predict the performance of computer networks or wireless communication networks. This book is your hands-on guide to ns-3, a script-based simulator that allows for learning, experimenting, and evaluating wired, wireless (802.11a/b/g/n/ac/ax), and 4G long-term evolution (LTE) networks quickly and at low cost.
You’ll begin by learning how to install and use ns-3, along with exploring its key features such as building blocks for creating a variety of wired or wireless network topologies, installing suitable protocols and applications, identifying and resolving networking issues, and systematically evaluating network performance. As you make progress, you’ll gain a clear understanding of simulation errors, exceptions, and abrupt events. You’ll also discover how to set up and evaluate Ethernet, Wi-Fi (802.11n/ac/ax) LANs, ad-hoc, and LTE networks. The concluding chapters discuss LTE advanced topics such as capacity planning, site surveys, radio resources, mobility management, and interference handling. By the end of this simulation book, you’ll be able to use ns-3 to implement, analyze, debug, and evaluate the performance of wired or wireless networks, as well as setting up custom test scenarios.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 372

Veröffentlichungsjahr: 2023

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Advanced Network Simulations Simplified

Practical guide for wired, Wi-Fi (802.11n/ac/ax), and LTE networks using ns-3

Dr Anil Kumar Rangisetti

BIRMINGHAM—MUMBAI

Advanced Network Simulations Simplified

Copyright © 2023 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Mohd Riyan Khan

Publishing Product Manager: Khushboo Samkaria

Content Development Editor: Nihar Kapadia, Divya Vijayan

Technical Editor: Rajat Sharma

Copy Editor: Safis Editing

Project Coordinator: Ashwin Dinesh Kharwa

Proofreader: Safis Editing

Indexer: Tejal Daruwale Soni

Production Designer: Joshua Misquitta

Marketing Coordinator: Marylou De Mello

First published: April 2023

Production reference: 1100323

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80461-445-7

www.packtpub.com

To my teachers, Dr. Bheemarjuna Reddy and Shri Badrinadh garu, for identifying my strengths, giving me wonderful opportunities to work with them, and guiding me to achieve my goals.

To the entire Packt team for believing in me and giving me this wonderful opportunity to publish my first book.

To my lovely wife, Sravani, for being a wonderful partner and supporting me in all situations.

– Dr Anil Kumar Rangisetti

Contributors

About the author

Dr Anil Kumar Rangisetti received his PhD in the field of computer science and engineering from IIT Hyderabad, India. He has nearly 10 years of teaching and research experience in computer science and engineering. He currently works as an assistant professor in the Department of CSE, IIITDM Kurnool. During his career, he has worked at prestigious educational institutions and research organizations, such as IIIT Dharwad, SRM-AP, GMR, ARICENT, and IRL-Delhi. Broadly his research interests include Wi-Fi, 4G, 5G, software-defined networking (SDN), network functions virtualization (NFV), and edge computing. He has published a number of novel research publications with IEEE, Springer, Elsevier, and Wiley in the field of a variety of networking technologies, such as long-term evolution (LTE), SDN, NFV, and Wi-Fi. Besides research activities, he is interested in writing technical books on networking technologies, cloud technologies, systems, and programming languages.

About the reviewers

Vanlin Sathya (IEEE member) received a PhD in computer science and engineering from the Indian Institute of Technology (IIT) Hyderabad, India, in 2016. He currently works with CTO Office at Cleona Inc., USA. Prior to this, he was a postdoctoral scholar at the University of Chicago, USA, where he worked on the issues faced in the 5G real-time coexistence test-bed when LTE-unlicensed and Wi-Fi try to coexist on the same channel. His research interests include interference management, handover in heterogeneous LTE networks, device-to-device (D2D) communication in cellular networks, cloud base station and phantom cell (LTE-B), and LTE in unlicensed and private 5G (CBRS).

Deepanshu Khanna is a 29-year-old information security and cybercrime consultant and a pioneer in his country. The young and dynamic personality of Deepanshu has not only assisted him in handling information security and cybercrimes but also in creating awareness about these things. He’s a hacker appreciated by the Indian government, including the Ministry of Home Affairs and Defence, police departments, and many other institutes, universities, globally renowned IT firms, magazines, and newspapers. He started his career by presenting a popular hack of GRUB at HATCon. He also conducted popular research in the fields of intruder detection software (IDS) and Advanced Intrusion Detection Environment (AIDE) and demonstrated MD5 collisions and buffer overflows, among other things. His work has been published in various magazines such as pentestmag, Hakin9, e-Forensics, SD Journal, and hacker5. He has been invited as a guest speaker to public conferences such as DEF CON, ToorCon, OWASP, HATCon, H1hackz, and many other universities and institutes.

Table of Contents

Preface

Part 1: Exploring Network Simulator-3 (ns-3) Thoroughly and Quickly

1

Getting Started with Network Simulator-3 (ns-3)

Technical requirements

Getting started with installing ns-3

Exploring ns-3 code easily using the Code::Blocks editor

Installing and configuring Code::Blocks for ns-3

Exploring various ns-3 modules’ source code

Understanding an ns-3 program’s structure

Starting your first network simulation

First simulation implementation activity using ns-3

First simulation evaluation using ns-3

Playing ns-3 simulations using NetAnim

How to install and use NetAnim

How to use the NetAnim GUI (panels and their menus)

Visualizing a network simulation using NetAnim

Playing your simulation using NetAnim

Summary

2

Monitoring, Debugging, Tracing, and Evaluating Network Topologies in ns-3

Monitoring ns-3 simulation steps and events using logging

How to display existing modules’ logging details at various levels

How to include your own logging statements in your simulation program

Identifying and resolving simulation issues using a debugger

Going through the gdb commands quickly

Walking through a simulation using gdb

Detecting and resolving a simulation crash

Using callbacks and traces for inspection of ns-3 nodes and protocols

Accessing CSMA protocol-processed packets in your simulation

Understanding TCP protocol implementation in ns-3

Performance evaluation and validation of simulations using Flow Monitor

How to use Flow Monitor in ns-3 simulations

Understanding Flow Monitor results

Using gnuplot to project simulation results

The gnuplot basics

How to parse simulation results for plotting

How to plot line charts and bar charts

Summary

3

ns-3 Key Building Blocks for Simulations

Setting up a variety of network nodes using ns-3 nodes and containers

ns-3 wired networking hosts

Interconnecting networks

Wireless networking devices setup

Connecting nodes using a variety of channels

ns-3 wired channels

ns-3 wireless channels

Quickly installing and configuring InternetStack and applications

ns-3 UDP client and server applications

ns-3 UDP echo client and server applications

ns-3 TCP bulk send and packet sink applications

ns-3 On-Off TCP/UDP applications

ns-3 HTTP client and server applications

The step-by-step procedure for building a simple LAN

The step-by-step procedure for building a simple wireless LAN

Summary

Part 2: Learn, Set Up, and Evaluate Wired and Wi-Fi (802.11a/b/g/n/ac/ax) Networks

4

Setting Up and Evaluating CSMA/P2P LANs, Wi-Fi LANs, and the Internet

Step-by-step procedure for setting up CSMA/CD LANs

CSMA/CD LANs simulation in ns-3

CSMA/CD LANs evaluation in ns-3

Step-by-step procedure for setting up Wi-Fi LANs

Wi-Fi LANs simulation in ns-3

Wi-Fi LANs evaluation in ns-3

Step-by-step procedure for setting up heterogeneous LANs (CSMA and Wi-Fi LANs)

Heterogeneous LAN simulation in ns-3

Heterogeneous LAN evaluation in ns-3

Step-by-step procedure for setting up and evaluating an internet simulation topology

Internet simulation in ns-3

Internet evaluation in ns-3

Summary

5

Exploring Basic Wi-Fi Technologies and Setting Up and Evaluating Wireless Ad Hoc Networks

Getting started with Wi-Fi nodes and channels in ns-3

ns-3 Wi-Fi PHY configuration

ns-3 supporting propagation loss, delay, and error rate models

Exploring Wi-Fi – operating modes, rate control algorithms, and QoS support using ns-3

Wi-Fi operating modes (infrastructural or ad hoc)

ns-3 support for rate control algorithms

ns-3 QoS support

Understanding placement models and mobility models

ListPositionAllocator

GridPositionAllocator

RandomDiscPositionAllocator

RandomRectanglePositionAllocator

GridBuildingAllocator and RandomRoomPositionAllocator

ns-3 mobility models

Setting up wireless ad hoc networks

Setting up a wireless or mobile ad hoc network in ns-3

Evaluation of the ns-3 wireless ad hoc network

Configuring and installing a variety of ad hoc network routing algorithms in ns-3

Configuring and installing various ns-3 ad hoc routing protocols in your simulations

Evaluating the ns-3 Wi-Fi ad hoc routing algorithms

Summary

6

Researching Advanced Wi-Fi Technologies – 802.11n, ac, and ax in ns-3

Understanding the 802.11n, ac, and ax Wi-Fi PHY and MAC enhancements supported in ns-3

ns-3 supporting 802.11n, ac, and ax Wi-Fi PHY layer features

ns-3 supporting 802.11n, ac, and ax Wi-Fi MAC layer features

Simulating advanced Wi-Fi features – channel bonding and FA

Setting up an 802.11n Wi-Fi LAN in ns-3 for simulating channel bonding and FA

Testing the channel-bonding and FA features of 802.11n in an ns-3 simulation

Simulating advanced Wi-Fi features – MIMO and OFDM

Setting up and evaluating an 802.11ac Wi-Fi LAN in ns-3 for testing the MIMO and OFDM features

Testing the MIMO and OFDM features of 802.11ac in an ns-3 simulation

Exploring spectrum/resource management in Wi-Fi 6 using ns-3

Setting up and simulating resource scheduling in 802.11ax/Wi-Fi 6 networks

Evaluating the resource scheduling feature of 802.11ax

Exploring spectrum reuse in Wi-Fi 6 using ns-3

Setting up and simulating resource scheduling in 802.11ax/Wi-Fi6 networks

Evaluation of the BSS coloring feature

Summary

Part 3: Learn, Set Up, and Evaluate 4G Long-Term Evolution (LTE) Networks

7

Getting Started with LTE Network Simulations Using ns-3

Understanding the LTE network nodes, protocols, and features supported in ns-3

ns-3 LTE implementation supporting E-UTRAN features

Learning how to set up and configure various LTE nodes in ns-3

ns-3 LTE RAN nodes setup and their configuration

Configuring ns-3 resource scheduling, handover, and interference control algorithms

ns-3 LTE EPC node setup and configuration

Simulating LTE RAN and EPC networks using ns-3 key building blocks

Setting up and configuring the LTE EPS network hands-on activity using ns-3

Evaluation of LTE EPS simulation setup

Summary

8

Researching LTE Network Radio Resource Management and Mobility Management Using ns-3

Exploring LTE radio resource-scheduling algorithms supported in ns-3

ns-3 LTE operating spectrum

Common design considerations of ns-3 LTE radio resource schedulers

ns-3 LTE schedulers’ performance evaluation hands-on activity

ns-3 LTE schedulers’ performance evaluation

Simulating and testing LTE EPC QoS bearers’ supporting features in ns-3

Evaluation of LTE EPS QoS bearers

Setting up an LTE network mobility scenario using ns-3-supported handover algorithms

Generation and handling of handover measurement reports

LTE standard handover events’ simulation

ns-3.36 LTE module supporting handover algorithms

ns-3 LTE mobility scenario simulation

ns-3 LTE mobility scenario evaluation

Summary

9

Researching LTE Advanced Networks: LTE HetNets and Interference Management Using ns-3

Using ns-3 REM plots for site surveying and LTE deployments

LTE deployment site surveying using ns-3 – hands-on activity

REM plot generation and inspection

Setting up LTE HetNets using ns-3

LTE HetNets setup in ns-3

LTE HetNet evaluation

Exploring and configuring the LTE interference management algorithms supported in ns-3

ns-3 supporting LTE interference management approaches

Testing how the ns-3-supporting LTE Strict FR, Soft FFR, and Enhanced FFR algorithms work

Summary

Index

Other Books You May Enjoy

Preface

Network Simulator-3 (ns-3) was created in 2006. Since then, it has been widely used by the networking community for academic and research activities. It is free, open source software and can be used under a GNU GPLv2 license. ns-3 supports a wide range of networking system simulations, such as the internet, Wi-Fi, WiMAX, ad hoc networks, and LTE. ns-3 is continuously supported by the worldwide networking community for integrating evolving networking technology simulation support and addressing all kinds of simulation issues. In this book, we used the ns-3.36 version for all simulation activities, as when we started writing this book, this was the latest version. The ns-3 official website (www.nsnam.org) is well maintained and offers complete documentation for all supported modules. In this book, we focus on how to use ns-3 easily and quickly for academicians, engineers, and researchers for learning basic and advanced networking technologies. There are few resources available for learning basic ns-3 simulations on the internet. In this book, we help you to learn about the following concepts easily with step-by-step procedures:

Quickly learn about ns-3 important features: simulation logging, debugging, and tracingLearn how to use a wide range of ns-3 supporting nodes and network applications (TCP/UDP/HTTP), and tools for performance evaluationsSystematic step-by-step procedures for setting up and evaluating the performance of a variety of networking topologies

The ns-3 official documentation offers example simulations and tutorials for setting up Wi-Fi, ad hoc, and LTE simulations; in this book, we will concisely introduce necessary 802.11n/ac/ax and LTE basic concepts to quickly understand the following:

Learn how to set up and evaluate wireless ad hoc networks using a variety of placement, mobility models, and routing algorithmsQuickly set up and learn important features of 802.11n/ac/ax networks, such as channel bonding, MIMO, and frame aggregationLearn how to simulate advanced 802.11ax features: resource scheduling and BSS coloringLearn how to set up LTE basic and advanced features: LTE networks setup, HetNets, site survey, capacity planning, radio resources management, and interference handling

There are a lot of open opportunities for network engineers and researchers in the field of Wi-Fi technology and 4G/LTE networks. This book helps you to quickly grasp important concepts and learn about advanced networking technologies confidently using interesting ns-3 hands-on activities.

Who this book is for

Aspiring students of networking technologies, academicians, engineers, and researchers can use this book for learning about the internet, Wi-Fi, and LTE networking technologies:

Students can use this book to thoroughly understand networking technology concepts through experimentsAcademicians can use and refer to this book for floating interesting laboratory activities, demonstrating complex networking concepts, and introducing advanced networking technologies easilyResearchers can use this book to quickly prove their novel ideas using proof of concept results through ns-3 simulations at a low costNetwork engineers can use this book to save their CAPEX using ns-3 simulations for debugging networking issues, site surveys, capacity planning, and learning about new networking technologies quickly

What this book covers

Chapter 1, Getting Started with Network Simulator-3 (ns-3), looks at how, before starting to use ns-3 for simulations, it is very important to learn how to use ns-3 as a simulation tool for development, testing, and evaluation activities. This chapter mainly discusses ns-3 and its supporting tools’ installation for implementation and executing simulations. To make the aforementioned activities simple, ns-3 users must learn about the installation of ns-3, supporting animation tools to quickly visualize simulations, and how to write ns-3 simulation programs easily using an editor. Although the ns-3 documentation provides these details, it is difficult to follow for beginners and takes many hours to complete these activities. We explain these activities in simple steps to complete them quickly.

Chapter 2, Monitoring, Debugging, Tracing, and Evaluating Network Topologies in ns-3, discusses how to use ns-3 logging features to display simulation details such as nodes and their configuration details, protocol behavior, and events at various levels for informative simulations. Besides this, to understand simulation errors, exceptions, and abrupt events, ns-3 debugging and tracing features are discussed in detail. Finally, it is very important to evaluate test scenario performance in terms of throughput, delay, jitter, and packet loss metrics. In this regard, to help you, this chapter discusses how to use ns-3 FlowMonitor or evaluate test scenarios.

Chapter 3, ns-3 Key Building Blocks for Simulations, discusses how to set up and evaluate network topologies using ns-3 key building blocks. It discusses all the important ns-3 key building blocks, such as Nodes, NodeContainers, NeDevices, InternetStack, and a variety of channels for connecting Nodes. It also discusses how to install TCP or UDP network applications and evaluate their performance. Finally, it discusses the step-by-step procedure for setting up and evaluating simple wired or wireless LANs.

Chapter 4, Setting Up and Evaluating CSMA/P2P LANs, Wi-Fi LANs, and the Internet, discusses two basic LAN technologies: CSMA and P2P supported in ns-3. It mainly discusses how to set up a variety of LANs using CSMA or P2P using important network nodes, such as bridges and routers. It also discusses how to install and configure routers to connect two LANs on the internet. Finally, it introduces step-by-step procedures for how to set up Wi-Fi LANs and heterogeneous LANs.

Chapter 5, Exploring Basic Wi-Fi Technologies, and Setting Up and Evaluating Wireless Ad Hoc Networks, introduces the basics of Wi-Fi Nodes and protocols to set up Wi-Fi LANs and ad hoc networks using ns-3. It describes how to deploy and conduct wireless network test scenarios using placement and mobility models. In order to understand important features of Wi-Fi, it discusses Wi-Fi Nodes’ operating modes, rate control algorithms, and QoS support in ns-3. Finally, it introduces wireless ad hoc networks and discusses how to set up ad hoc networks and configure a variety of routing algorithms in ns-3.

Chapter 6, Researching Advanced Wi-Fi Technologies-802.11n, ac,and ax in ns-3, introduces various Wi-Fi technologies (802.11a/b/g/n/ac/ax) supported in ns-3. It mainly discusses how to configure and use advanced Wi-Fi features in simulations using ns-3. It discusses how to configure frame aggregation, channel bonding, OFDM, and MIMO advanced features in Wi-Fi test scenarios using ns-3. It also discusses how to set up Wi-Fi 6 networks and evaluate resource management and spectrum reuse techniques using ns-3 simulations.

Chapter 7, Getting Started with LTE Network Simulations Using ns-3, introduces 4G network (LTE) simulations using ns-3. It discusses how to set up and configure LTE base stations and user equipment. Mainly, it discusses a variety of LTE network nodes, their data plane and control plane protocols, and algorithms supported in ns-3. Finally, it discusses how to set up and configure an LTE radio access network and its core network for setting up test scenarios.

Chapter 8, Researching LTE Network Radio Resource Management and Mobility Management Using ns-3, introduces important research aspects, such as radio resource management and mobility management in LTE networks using ns-3. It mainly focuses on how to set up an LTE network and evaluate radio resource scheduling algorithms supported in ns-3. It also discusses how to set up and conduct LTE network mobility scenarios, and evaluates LTE-supported handover algorithms in ns-3.

Chapter 9, Researching LTE Advanced Networks: LTE HetNets and Interference Management Using ns-3, discusses how to set up LTE advanced networks, such as heterogeneous networks, using a variety of base stations supported in ns-3. It mainly discusses how to deploy LTE HetNets by doing site surveys using the heatmaps feature of ns-3. Finally, it discusses how to configure and evaluate various LTE interference management algorithms supported in ns-3.

To get the most out of this book

ns-3 users should have good C++ programming skills and be familiar with the Linux operating system. You should know the basics of networking technologies related to the respective simulation topics. Especially before starting Wi-Fi and LTE simulations, we recommend that you learn the basics of Wi-Fi and LTE technologies.

Software/hardware covered in the book

Operating system requirements

ns-3.36

Ubuntu 20.04

Gnuplot, gdb, and CodeBlocks

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/3xwd3.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Open firstanim_flowmetrics.xml generated by your simulation program.”

A block of code is set as follows:

NodeContainer nodes;   nodes.Create (2); PointToPointHelper pointToPoint;   pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Gbps"));   pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ms"));

Any command-line input or output is written as follows:

$ ./ns3 run scratch/pkt_first_anim

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Next, click the Save button.”

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com

Share your thoughts

Once you’ve read Advanced Network Simulations Simplified, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a free PDF copy of this book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily

Follow these simple steps to get the benefits:

Scan the QR code or visit the link below

https://packt.link/free-ebook/978-1-80461-445-7

Submit your proof of purchaseThat’s it! We’ll send your free PDF and other benefits to your email directly

Part 1: Exploring Network Simulator-3 (ns-3) Thoroughly and Quickly

On completion of Part 1, you will have learned about the installation and usage of ns-3 and its supporting tools. You will also have learned about ns-3 simulation key building blocks and important features, such as logging, debugging, tracing, and evaluating test scenarios.

This part has the following chapters:

Chapter 1, Getting Started with Network Simulator-3Chapter 2, Monitoring, Debugging, Tracing, and Evaluating Network Topologies in ns-3Chapter 3, ns-3 Key Building Blocks for Simulations