In this post, we are going to see how to define and design a p2p network between two wired nodes with a decent bandwidth and delay. Here is the problem statement.
NS3 will be used to simulate the network
Tools required:
- NS3
- Tracemetrics (for measuring throughput)
- NetAnim (for Animation)
- Gnuplot (for plotting the characteristics)
Complete Instructions are available in the video
Problem Statement:
Design two wired nodes that can connect to each other through a point-to-point network that handles a data rate of 50mbps and a delay of 5ms. The first node acts as a server and the second node acts as a client and they exchange at least 10 packets in a total simulation time of 20 seconds. The maximum packet size is 1024 bytes and 512 bytes. Plot the throughput of each node for the above packet sizes. (Use any charting solution you are comfortable with).
NS3 already had this file in the name as first.cc which is located at
~ns-3.38/examples/tutorial/
Copy the above file to ~ns-3.38/scratch/
To run this file, let's open a terminal
$ cd ns-allinone-3.38/ns-3.38
$ ./ns3 run scratch/first.cc
Change the 1024 to 512 as the packet size changes the 512. tr in the trace file and compile it again
$ ./ns3 run scratch/first.cc
The modified code can be downloaded from this location: https://github.com/tspradeepkumar/ns3Examples
Open another terminal and go to
$ cd ns-allinone-3.38/netanim-3.109/
$ ./NetAnim
Open the XML file and check the output in the animator window.
]Now find the throughput with the help of a software called tracemetrics which is already installed. Check the video in my channel for installing tracemetrics
Open another terminal or use the existing terminal
$ cd
$ cd tracemetrics-1.4.0
$ java -jar tracemetrics.jar
sir can u explain socket with broadcasting and how insert my data in packet
ReplyDeleteSIr from where we can download tracemetrics?
ReplyDelete