Assignment 1 ns-3 working environment


5/5 - (2 votes)

EECE5155: Wireless Sensor Networks and the Internet of Things
Computer Laboratory Assignment 1
The objective of this first assignment is to become familiar with the ns-3 working environment and
the simulation workflow. To complete this assignment, you need a working environment with ns-3
and Wireshark properly set up. Please follow the instructions in the Introduction to ns-3 and
Wireshark in the first computer laboratory module (and its recording) on Canvas. If you still have
problems setting up the environment, please contact the TA or the instructor for this course.
For students who have never taking a networking course, some of the protocols mentioned below
might not be known (e.g., UDP, IP, CSMA). While it is not necessary for this assignment to know all
the specifications of these protocols, if you need some specific pointers and additional information,
please directly to the instructor.
Task 1:
Modify the example seen in class,, to simulate the following network:
• 2 nodes
o 1 network interface at each node
• Point-to-point link:
o Data Rate: 10 Mbps
o Delay: 2 ms
• IP address assignment:
• Application:
o UDP Echo Server on port 63
o Packet size: 256 bytes
• Use the same values as in the example for the rest of the parameters
Compile and run the simulation. Visualize the packet trace file with Wireshark. Confirm that everything
works as you would expect.
Task 2:
Starting from in the Tutorials folder within your ns-3 installation, create and simulate a network
with the following architecture:
Figure 1: Network architecture
Detailed information:
• The network contains:
o 3 nodes in the first shared bus operating under CSMA
o 3 nodes in the second shared bus operating under CSMA
o 2 nodes in the point-to-point link
Note that Nodes 2 and 3 in Figure 1 have two network interfaces, one for each
link to which they are connected
• The applications running in the network are:
o UDP Echo Server at Node 1:
Listening on port 21
o UDP Echo Client at Node 5:
Sends 2 UDP Echo packets to the server at times 4s and 7s
• Enable packet tracing only in Nodes 2 and 4.
Verify that the network behavior is as expected, by capturing the packet traces and utilizing Wireshark to
analyze them.
Submission materials:
Generate a brief report explaining:
1) the experimental setup: indicate which part of the code have you modified
2) the results: comment and include a screenshot of the packet traces in Wireshark
3) the conclusions: what did you learn
for each of the two tasks.
In your submission, include also your modified .cc files.
Remember: the laboratory assignments can be conducted either individually or in couples. If you want to
work in couples, please enroll in a Computer Lab Team in Canvas. Then, only one of the team members
will need to submit the assignment.
Node 1:
UDP Echo Server
Port 21
Node 2 Node 3 Node 5:
UDP Echo Client
Point-to-point link
IP Block:
Data Rate:10 Mbps
Propagation Delay:2ms CSMA link
IP Block:
Data Rate:100 Mbps
Propagation Delay:10us
CSMA link
IP Block:
Data Rate:100 Mbps
Propagation Delay:10us
Node 4


There are no reviews yet.

Be the first to review “Assignment 1 ns-3 working environment”

Your email address will not be published. Required fields are marked *

Scroll to Top