Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Advanced Network Simulations Simplified

You're reading from   Advanced Network Simulations Simplified Practical guide for wired, Wi-Fi (802.11n/ac/ax), and LTE networks using ns-3

Arrow left icon
Product type Paperback
Published in Apr 2023
Publisher Packt
ISBN-13 9781804614457
Length 360 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Anil Kumar Rangisetti Anil Kumar Rangisetti
Author Profile Icon Anil Kumar Rangisetti
Anil Kumar Rangisetti
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Part 1: Exploring Network Simulator-3 (ns-3) Thoroughly and Quickly
2. Chapter 1: Getting Started with Network Simulator-3 (ns-3) FREE CHAPTER 3. Chapter 2: Monitoring, Debugging, Tracing, and Evaluating Network Topologies in ns-3 4. Chapter 3: ns-3 Key Building Blocks for Simulations 5. Part 2: Learn, Set Up, and Evaluate Wired and Wi-Fi (802.11a/b/g/n/ac/ax) Networks
6. Chapter 4: Setting Up and Evaluating CSMA/P2P LANs, Wi-Fi LANs, and the Internet 7. Chapter 5: Exploring Basic Wi-Fi Technologies and Setting Up and Evaluating Wireless Ad Hoc Networks 8. Chapter 6: Researching Advanced Wi-Fi Technologies – 802.11n, ac, and ax in ns-3 9. Part 3: Learn, Set Up, and Evaluate 4G Long-Term Evolution (LTE) Networks
10. Chapter 7: Getting Started with LTE Network Simulations Using ns-3 11. Chapter 8: Researching LTE Network Radio Resource Management and Mobility Management Using ns-3 12. Chapter 9: Researching LTE Advanced Networks: LTE HetNets and Interference Management Using ns-3 13. Index 14. Other Books You May Enjoy

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

In this section, we are going to learn how to set up a CSM LAN using a 24-port switch/bridge in ns-3. Let’s see how to set up the LAN with the following specifications:

  • The maximum number of hosts is 24
  • The CSMA link speed is 1 Gbps and the propagation delay is 1 nanoseconds
  • Use a 24-port switch and connect all hosts to it using CSMA links
  • Test connectivity between nodes using the ns-3 ping application
  • Check the LAN speed using ns-3 OnOffApplication

Let’s write the following ns-3 code snippets in pkt_simplelan.cc to simulate the CSMA LAN.

Start by including all necessary ns-3 modules:

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/bridge-module.h"
#include "ns3/internet-apps-module.h"
#include "ns3/csma-module.h"
#include "ns3/internet-module.h"
#include "ns3/applications-module.h"
...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime