[SOLVED] ECSE316-Assignment 1 Network Programming and DNS

24.99 $

Category:

Description

5/5 - (1 vote)

In this lab you will implement a domain name system (DNS) client using sockets in Java. If you prefer, the system can also be implemented in Python.

 

At the end of this lab you should know how to:

  1. Understand an existing network protocol specification;
  2. Design a network application that adheres to the given protocol; and
  3. Implement and test the network application using sockets.

 

As always, read the instructions carefully!

1                   Background

1.1               The Domain Name System (DNS)

The internet’s domain name system provides the essential service of mapping between domain names (e.g., mcgill.ca or facebook.com) and IP addresses (e.g., 132.216.177.160 or 31.13.65.1). This makes the internet more human-friendly, since we only have to remember domain names and not IP addresses.

 

When you direct an internet-enabled application to a new site (e.g., you open a new website in your browser, or you send an email to someone at a different domain name), the application needs to resolve the domain name to an IPaddress before it can contact the server. This is accomplished using the DNS request/response mechanism. For more about the DNS system and the protocol it uses, see Section 2.4 of Kurose and Ross (7th edition) or Section 2.5 in Kurose and Ross (6th edition) and the primer document posted along with these instructions onmyCourses. You may also look at RFC 1035 (Sections 3 and 4) which give the official description of the DNS resource record format and message format.

1.2               Socket programming

Sockets are the programming mechanism used to implement network applications. If you have previously written an application that reads or writes from a file on disk, then you know you first open a file handle, then read/write using the file handle, and finally close the file handle when you are done. Sockets work in a similar way, but instead of reading/writing to a file on disk, they allow you to read/write to another process (usually running on a different machine).

 

For more on socket programming read Section 2.7 in Kurose and Ross (6th Edition – Java or 7th edition – Python) and the Java Networking Tutorial from Oracle. If you choose the Python approach, you can read the material available at https://docs.python.orG/2/howto/sockets.html

1.3               Summary of background and pre-requisites

Before proceeding with the rest of this lab document make sure you have accomplished these first steps:

  1. You are familiar with basic Java or Python programming, including how to compile and execute a program from the command line. We also recommend that you are familiar with an integrated development environment (IDE), such as Eclipse, for debugging.
  2. You have read the background on the DNS and on java/Python socket programming mentioned above.