Network simulator is a tool used for simulating the real world network on one computer by writing scripts in C++ or Python. Normally if we want to perform experiments, to see how our network works using various parameters. We don’t have required number of computers and routers for making different topologies. Even if we have these resources it is very expensive to build such a network for experiment purposes.
So to overcome these drawbacks we used NS3, which is a discrete event network simulator for Internet. NS3 helps to create various virtual nodes (i.e., computers in real life) and with the help of various Helper classes it allows us to install devices, internet stacks, application, etc to our nodes.
Using NS3 we can create PointToPoint, Wireless, CSMA, etc connections between nodes. PointToPoint connection is same as a LAN connected between two computers. Wireless connection is same as WiFi connection between various computers and routers. CSMA connection is same as bus topology between computers. After building connections we try to install NIC to every node to enable network connectivity.
When network cards are enabled in the devices, we add different parameters in the channels (i.e., real world path used to send data) which are data-rate, packet size, etc. Now we use Application to generate traffic and send the packets using these applications.
Ns3 gives us special features which can be used for real life integrations. Some of these features are:
- Tracing of the nodes:
NS3 allows us to trace the routes of the nodes which helps us to know how much data is send or received. Trace files are generated to monitor these activities.
It stands for Network Animator.It is an animated version of how network will look in real and how data will be transferred from one node to other.
- Pcap file:
NS3 helps to generate pcap file which can be used to get all information of the packets (e.g., Sequence number, Source IP, destination IP, etc). These pcaps can be seen using a software tool known as wireshark.
GnuPlot is used to plot graphs from the data which we get from trace file of NS3. Gnuplot gives more accurate graph compare to other graph making tools and also it is less complex than other tools.
This is a brief introduction to NS3. Basically NS3 can perform most of the activities which are performed in the network in reality.
- Computer Networks | Set 1
- Computer Networks | Set 2
- Computer Networks | Set 5
- Computer Networks | Set 3
- Computer Networks | Set 4
- Computer Networks | Set 12
- Computer Networks | Set 6
- Computer Networks | Set 7
- Computer Networks | Set 8
- Computer Networks | Set 9
- Computer Networks | Set 10
- Computer Networks | Set 11
- Last Minute Notes - Computer Networks
- Internet Control Message Protocol (ICMP) | Computer Networks
- Commonly asked Computer Networks Interview Questions | Set 1
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.