Homework 2

CS43

5%, due Feb. 29

Use a word processor for the non-programming exercises.

  1. Write a program which translates an Internet domain name to its registered IP address. The program should take the domain name as a command line argument. The program should produce output like this:
    abacus:~
    % ./lookup www
    Official name: keystone.westminster.edu
    There are aliases:
    www.westminster.edu
    IP address(es):
    204.171.15.203
    
    abacus:~
    % ./lookup westminster-gw.prepnet.com
    Official name: westminster-gw.prepnet.com
    IP address(es):
    129.250.90.2
    192.204.20.1
    
    abacus:~
    % ./lookup ftp.netscape.com
    Official name: ftp20.netscape.com
    There are aliases:
    ftp.netscape.com
    IP address(es):
    205.218.156.36
    
    Use gethostbyname(3) to perform the lookup. The layout of struct hostent was discussed when the homework was handed-out. I will not be repeating that information.
  2. Calculate the maximum number of class A, B, and C network IDs. Fetch the file
    nsfnet/statistics/history.netcount using anonymous FTP from the host
    nic.merit.edu. This file contains the number of domestic and foreign networks announced to the NSFNET infrastructure. Plot these values with the year on the x-axis and a logarithmic y-axis with the total number of networks. The maximum value for the y-axis should the maximum number of network IDs calculated previously. If the data shows a visual trend, extrapolate the values to estimate when the current addressing scheme will run out of network IDs.
  3. Obtain a copy of the Host Requirements RFC (RFC 1122) and look up the robustness principle that applies to every layer of the TCP/IP protocol suite. What is the reference for this principle? You will find RFCs in keystone:/mnt/rfc.


Thomas P. Kelliher
Wed Feb 21 08:47:47 EST 1996
Tom Kelliher