Identifying Network Interfaces

  • From the Homework section on D2L, download the source for identifying network interfaces, NetInfo.java.
  • Build and execute NetInfo.java on your computer.
  • Redirect the output to a file.
  • Summarize your results in a text file. Answer the following questions:
    • How many network interfaces does your computer contain?
    • How many interfaces have been assigned an IP address?
    • What is the MAC address of each interface (if present)?
    • What is the Internet address of each interface (if present)?
  • Upload your results text file and your summary text file to the Dropbox on D2L.

HostResolve: a host name resolution program

  • Write a program that resolves the names of a host to its associated IP address(es).
  • By default, the program resolves the name of a host provided as a command line argument to a single address.
  • The program must also permit one option, '-a', which directs the program to find all addresses associated with the host name.
  • Use the InetAddress.getByName() method to find the default address.
  • Use the InetAddress.getAllByName() method to find all addresses for that host name.
Usage: o java HostResolve [-a] [host name]
  • The program must write the IP address(es) to standard output.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.