Due: Tuesday, February 25, 2014, 8:10 am (start of the class)

Problems:

  1. (10 points) Chapter 1, Homework Problems and Questions - R16, R18, and R25.
  2. (10 points) Chapter 1, Problem P18. Note that on some Unix-based systems the traceroute command is not stored on your regular path, try looking in /sbin and /usr/sbin directories. Equivalent command line utility under Windows is called tracert. You are required to use the command line tool. Results from the web or GUI-based applications will not be accepted. Submit your conclusions, not the outputs of running the commands.
  3. (10 points)
    1. What is the range of IP addresses covered by prefix 192.168.32.0/21?
    2. Give the prefix that covers IP addresses in range 10.20.0.0 - 10.20.31.255.
    3. What is the netmask that corresponds to /27 prefix length?
    4. What prefix length corresponds to netmask 255.255.255.192?
  4. (10 points) Assume a router with four interfaces (A, B, C, and D) and routing table that contains four entries (prefix, interface): (132.177.0.0/24, A), (132.177.2.0/23, B), (132.177.0.0/16, C), and (0.0.0.0/0, D). For each of the following destination addresses indicate all matching routing table entries and the interface to which it is going to be routed.
  5. 132.176.0.11
    132.177.1.22
    132.177.2.33
    132.177.3.44
    132.177.8.5
    132.177.17.16
    
  6. (10 points) Using command line tools, find out:
    1. IP address, hostname, subnet id, prefix and subnet mask,
    2. content of the routing table and the default gateway, and
    3. content of the ARP table

    of the host that you are connected to. Repeat this on several hosts/devices, preferably connected to different networks. List the commands that you used.

  7. (10 points) In this part of the assignment, you will analyze a short network traffic trace. You can download the trace (cs725-s13-a1.pcap) in the PCAP format that can be opened by any of the standard network traffic sniffers, such as Wireshark or the standard command-line utility tcpdump. Alternatively, you can view the trace using CloudShark service (http://www.cloudshark.org/captures/a23a79af90ae) provided by QA Cafe, a local company with many UNH-CS and IOL connections.
  8. Study the trace and answer the following questions:

    1. What is the activity captured by the trace? Describe what each packet does (not what it is). You can skip the end of the trace where the communication gets repetitive.
    2. What command-line command triggered the traffic captured the trace?
    3. What are the hostnames of the nodes involved in communication?
    4. Who are the manufacturers of the network interfaces?
    5. Extra credit: Is it necessary for the responding node to send an ARP request? What is the motivation for sending it?

Programming assignment:

  1. (40 points) The purpose of this part of the assignment is to learn and practice the basic calculation used to calculate IPv4 subnets. The secondary objective is to practice writing a clear and concise description of your solution.
  2. Task

    Write a simple program that takes an IPv4 address and a prefix length and calculates:

    1. The subnet address
    2. The address of the first host on the network
    3. The address of the last host on the network
    4. The subnet broadcast address
    5. The subnet mask

    The program should perform basic error checking on the user input (e.g., values out of range). The IP address can be entered as a whole or as 4 values for each of its bytes. A run of your program may look like this (bold font indicates user input):

    	Enter IP address: 192.168.1.32
    	Enter prefix length: 24
    
    	Subnet address:    192.168.1.0
    	First host:        192.168.1.1
    	Last host:         192.168.1.254
    	Broadcast address: 192.168.1.255
    	Subnet mask:       255.255.255.0

    Your are allowed to use any programming language, platform, and development environment. There will be an extra credit component to the assignment grade that will award points based on how few of the students chosen to use the same language and platform. However, keep in mind that the next assignment will ask you to implement the same calculation as a web service.

    Deliverables

    Write a report (two pages maximum) that outlines the approach that you took. There are two parts to the report. In the first one you will describe the part of the program that actually performs the calculation. Ignore everything else: interaction with the user, standard code that one would find in every program. You are to include snippets of your code, provided they are well described. For example, a line of code b4 = a % 256 can be described as modulo 256 operation isolates the least significant byte. Just stating in English what the code does, for example b4 gets the value of a modulo 256 is not sufficient.

    The second part of the report shows a representative run of your program together with appropriate explanations. Important: by showing an execution of your program, you are making a statement that your program, as submitted, works as shown. An attempt to "fake" a run, for example by writing a program that ignores input and just prints answers regardless of input, will be considered as cheating. Finally, remember, you may be asked to give a demo of your program. If your program does not implement all required functionalities, you have to make it clear in the report.

    The report must be in PDF format. Other formats, including but not limited to MS Word, plain text, HTML, RTF, or OpenOffice, will be not accepted. Every recent text processing application that I know of is capable of producing PDF files. If you are not sure how to do it, ask.

Submission instructions:

Follow the standard assignment submission instructions. Note that the report submission must be in PDF format.