CS 725/825 Computer Networks, IT 725 Network Technology

Assignment 1


Due: Wednesday, September 24, 2025, 2:10 pm (start of the class)

Problems:

  1. (10 points)
    1. What is the range of IP addresses covered by prefix 132.177.0.0/19?
    2. Give the prefix(es) to cover the IP addresses in range 10.0.128.0 - 10.0.191.255.
    3. What is the netmask that corresponds to /29 prefix length?
    4. What prefix length corresponds to netmask 255.255.224.0?

    For each, outline how you got the answer by showing the binary representation of the addresses or the netmask.

  2. (10 points) Find and test one or more command-line commands to:
    1. list all network interfaces of a host,
    2. for each of the active network interfaces, find its MAC address, IP addresses, subnet id, prefix, and subnet mask,
    3. list the content of the routing table and the default gateway, and
    4. list the content of the ARP table.

    For each, copy and paste the command that you used and its output (no screenshots please). Highlight the command and the portion of the output that gives the answer. For example, for part (a) highlight the interface names.

  3. (10 points) Use command traceroute (tracert on Windows, or any other equivalent tool) and explore the path packets take to reach IP address 142.251.163.99 (it is one of the IP addresses www.google.com resolves to).
    1. How many hops does it take to reach that address?
    2. Can you guess the physical location of each of the routers?
    3. As best as you can, list the names of the service providers whose networks are traversed.
    4. Does the number of hops change when you try at different times?
    5. How does the path change when you try traceroute from a different location? There are web tools that let you test traceroute from their servers. You can also compare UNH network vs home network, UNH network vs cell network, etc.
  4. (15 points) In this part of the assignment, you will analyze a brief trace of network traffic. The trace (https://www.cloudshark.org/captures/43ca1b1a5ab3) is available through CloudShark service provided by QA Cafe, a Dover, NH, company with many UNH-CS and IOL connections founded by UNH alumnus Joe McEachern. You can also download the trace from the site in a format that can be opened by any of the standard network traffic sniffers, such as Wireshark or command-line utility tcpdump.
  5. The trace consists of network traffic resulting from command ping -c 5 rb2.cs.unh.edu executed on one of the department computers:

    Analyze the trace and answer the following questions:

    1. Briefly describe the purpose/function of each of the first eight packets in the trace.
    2. What was the hostname of the computer where the ping command was executed?
    3. What was the MAC address of the computer where the ping command was executed?
    4. What was the MAC address of rb2.cs.unh.edu? How was it discovered by the computer that executed the ping command?
    5. Besides the machine where the command was executed, what other IP addresses do you see in the trace? What is the main function of the systems they belong to?
    6. Briefly describe the function of packets 7 an 8. What action of the ping command resulted in this query being made?
    7. From the trace, find the round trip time of the final ping.
  6. (15 points) Equation 1.1 from the texbook:
  7. \[d_\text{end-to-end}=N\frac{L}{R}\]

    gives the end-to-end delay of sending a packet of lenght \(L\) bytes over \(N\) links of transmission rate \(R\) bits per second assuming negligible propagation delay. Generalize this formula for a network where each link has lenghth \(d\) meters and propagation speed along the link \(c\) meters per second. This is a modified version of Problem P2 from Chapter 1 of the texbook.

Programming assignment:

  1. (40 points) The goal of the programming part of the assignment is to come with a simple tool to analyze network performance. In this assignment we focus on the total time it takes to complete an HTTP/HTTPS request.
  2. Task

    Write a simple program that takes a URL of a webpage as an input (entering it as a command line parameter is fine), reads the page content, measures the time it took to load, and prints the first few lines of the returned page together with the time it took. In this assignment, it is not necessary to handle errors (e.g., bad URL). The solution should be as simple as possible. Your program does not have to print real/user/system time as shown in the sample run below, only real time is required:

    [rbartos@agate ~]$ ./a1 https://www.unh.edu/
    <!DOCTYPE html>
    <html lang="en" dir="ltr" prefix="content: ...
      <head>
        <meta charset="utf-8" />
        <meta name="description" content="At the University of New Hampshire, ...
    
    real  0m0.028s
    user  0m0.005s
    sys   0m0.004s
    [rbartos@agate ~]$

    You can use any tools, programming language, platform, or development environment. As with most assignments in this course, I strongly recommend that you look for a tool, programing/scripting language that is best suitable for the task and learn just enough of it to get things done, rather than trying to solve the problem in a language that you are most comfortable with.

Submission instructions:

Upload your submission as a single PDF file using myCourses (mycourses.unh.edu). Any source code used in the assignment must be committed to the course Git repository. More details can be found in the standard assignment submission instructions.