Description
1 Networking Tools
This part is aimed to make you familiar with basic networking tools. Read the man pages of the tools ifconfig
(ipconfig), ping, traceroute (tracert), and nslookup.
(a) Find the IP address of your machine. Try connecting to different service providers and notice the
changes, if any, in the IP address of your machine.
(b) Find the IP address associated with www.google.com and www.facebook.com using nslookup. Change
the DNS server (look for open DNS servers on the web) to use in the command and see how IP address
of the above domains change.
(c) ping the IP address of www.iitd.ac.in. Send the ping packets with different packet sizes, TTL values,
etc. What is the maximum size of ping packets that you are able to send? Is this size same for the
domains mentioned in part (b)?
(d) Run traceroute via two or more service providers for www.iitd.ac.in. If your ISP blocks packets on the
path to www.iitd.ac.in then try with a different destination like www.google.com, or www.facebook.com,
etc. Report your observations, like if some paths default to IPv6 then how you can force traceroute to
use IPv4, any private IP addresses(10.*.*.* or 192.168.*.*), routers that do not reply to requests,
etc. What changes can you make to traceroute request for some of the missing routers to reply?
2 Packet Analysis
Install wireshark which is a very useful tool to sniff packets on the wire (or wireless medium). Sniffed
data is parsed by wireshark and is presented in an easily readable format with details of the protocols
being used at different layers. Use wireshark to grab all packets on your interface while visiting the website
https://apache.org from your browser. Flush your local DNS cache before visiting the page. And also clear
your browser cache. Report the following:
(a) Apply a “dns” filter on the packet trace. How long did it take for the DNS request-response to
complete?
(b) Apply an “http” filter on the packet trace. Report the approximate number of HTTP requests that
were generated. What does this tell about how web-pages are structured, and how browsers render
complex pages with multiple images and files?
(c) Report the total time taken to download the entire webpage. It is the time between the first DNS
request and the time when the last content object was received.
(d) Run a packet trace for https://www.cse.iitd.ac.in and filter for “http”. Do you find any HTTP traffic?
Why is it that you were able to do it easily earlier for https://apache.org?
1 of 2
COL334/672: Computer Networks Assignment-1 Semester-1 2021-22
3 Implement Traceroute using Ping
We studied about ping and traceroute in the first section. In this section, you need to write a program implementing traceroute using ping. In the program you may use the ping command available in Linux/Windows
or send packets with varying TTL values. The program should also calculate RTT(round trip time) of each
server on the way and plot the graph for RTT(y-axis) vs hop number (x-axis) i.e. if it took 10 hops to reach
the destination then show RTT for 1st hop, then 2nd hop and so on.
Input: The program would take the domain name of destination as input, for example: www.iitd.ac.in
Output: Print the IP addresses of the hops on the way to the destination IP address on the screen and save
the RTT vs hop plot as a png/jpeg file.
Include following in the report:
1. Attach a screenshot of the output showing IP addresses of all the hops.
2. Attach the plot of the RTT vs hop number.
Notes:
1. Languages allowed : Python, C, C++, Java
2. Do not hard-code any domain name in the program. The program should run on any public domain.
You may use any public domain as destination while reporting, for instance www.iitd.ac.in
3. Remember that you must not use any module/library that directly outputs the result of traceroute,
i.e. your program must proceed hop by hop.
What to Submit
1. A neat report in pdf. Please use the exact question numbering as above.
2. Code for part 3
3. Submit a zip file containing both pdf and the code and name it as <Entry-Number>.zip
This assignment has to be done individually. You will present your report over a viva with a TA, and also
run your script to replicate the traceroute functionality.
2 of 2