CS549 Lab Assign3 2020
CS549 Lab Assign3 2020
Lab Assignment 3
Assigned: 17th April, 2020 Due: 11:55 pm, 21st April, 2020
In this assignment, you will learn how to create virtual network containers on a Linux OS.
This is the same technology used by Docker. The assignment uses available mechanisms in
a standalone Linux kernel, you should not need to download or install anything. You can
create arbitrary mesh networks connecting the containers and can set link parameters includ-
ing capacity, delay and packet loss. To simplify your work, write shell/Perl/Python scripts to
setup the network namespaces, to run experiments and to analyse the data.
Ref: Anoushka Banerjee & Shaifu Gupta, “CS549: Quick Guide to Virtual Networking”,
Moodle, IIT Mandi, April 2020.
1. Create two network namespaces, say NetNsA and NetNsB. In each of these, create
one network interface. Experiment with the following:
a. Run ping between NetNsA and NetNsB.
b. Add a queue discipline with fixed delay of say 50ms, and run ping
c. Add a variable delay of 50ms and run ping. Compare (a), (b) and (c).
d. Use Wireshark to monitor traffic between the namespaces. Run ping from
one container to the other. Start sshd in one namespace and setup passwordless
ssh between the two network containers. Connect between the containers via
ssh. Execute a few shell commands. Observe the traffic shown in Wire-
shark.
2. Measure the response time for a simple request-response transaction such as ssh
date. Compare this with the ping RTT and with the times reported by Wire-
shark. Explain the differences, if any.
3. You are asked to investigate bulk data transfer (throughput) between network con-
tainers. Consider the factors introduced by tc: delay, loss and link capacity. For
different sizes of data transfer and link capacities, which is better: high delay and low
loss, or low delay and high loss?
Prepare a table showing the factors and levels for each. Design the set of experi-
ments to answer the above questions. Do the experiments, analyse the results and
give your conclusions.
4. [Optional] Connect your laptop to the Internet. Without any applications running,
observe the rate of data transmitted and received over a few minutes. Use network
tools to figure out what is causing the traffic (Hint: try ps, netstat, tcpdump/
Wireshark). Now, start some network-intensive applications such as Firefox,
Thunderbird, etc one by one. After starting each, observe the change in network
traffic. What are your conclusions?