Due (Problem Set): Tuesday, October 25, 2016, 11:59 pm

Due (Programming Assignment): Tuesday, November 1, 2016, 11:59 pm

Tasks

Problems:

  1. Use the dig and whois commands to find out the following infomation of Colby. Explain how do you use those commands to get the information.
    1. Domian name
    2. Name servers
    3. Address range
    4. Prefix
  2. Find the IPv4 and IPv6 addresses of a dwarf in the robotics lab. Ping the addresses from another dwarf. Compare the round-trip time (RTT) of the two types of traffic.
  3. Send yourself a brief email that includes an attachment. Find a way to make your mail client to show the raw message source. Describe each line in the message header and outline how the attachment was included in the message.
  4. Analyze this trace that contains a capture mail delivery from a laptop.
    1. What is the port number that the mail client connects to on the server?
    2. Can you see the content of the message in the trace? If yes, where? If not, why not?
    3. The actual message sent is few hundred bytes long, including headers. What is the total number of bytes transmitted by the client? What are the causes of the discrepancy between the message length and the total number of bytes sent?
    4. What mailserver software is running in the server? What version? Is it current?
    5. Can you tell the timezone in which the server is running?
  5. Using nc:
    1. Connect to a web server and capture its response to a well-formed GET request that you send to it. Briefly describe each line in the HTTP response. No need to analyze the documents itself.
    2. Pretend to be a server and capture an HTTP request made by a browser. Briefly describe each line in the request.

    You are expected to look up the meaning of the lines that were not discussed in the class.

Programming assignment:

Study SMTP (the textbook has a good description, you can also look at RFC 5321 or Wikpedia article, which has a good example of a typical SMTP exchange). The goal of this part of the project is try to directly communicate with an MTA pretending to be another MTA sending a message.

  1. SSH to dori.cs.colby.edu, connect to the mail server running at it on port 25 using nc (or a telnet client) and pretend to be an MTA delivering a message addressed from cs331 AT dori.cs.colby.edu your Colby email address. Use subject "SMTP test" and make sure that you are identified in the body of the message. Capture the session and turn it in as a part of the assignment write-up. Technically, you can use any mail server for the assignment, however, I would like to ask you to use the one specified above. While there is nothing technically wrong with connecting to any mail server, typos-filled hand-typed sessions tend to trigger various security alarms.
  2. Using dori.cs.colby.edu as the mail server, send an email with a fake "From" address to yourself and analyze its full header. Point out all the information that may indicate that the message did not originate from a legitimate source.
  3. Write as-short-as-possible program that delivers an email message by (partially) implementing SMTP conversation. You are not expected to use any library for sending email (e.g., javax.mail or python smtplib). Take a look at the quick intro to Python network programming in the textbook - that might be the quickest way to get this part done.

Extensions

  1. Write as-short-as-possible script that delivers an email message by (partially) implementing SMTP conversation. You are not expected to use any command or utility for direct sending of email (e.g., the mail command in Unix/Linux). Basic shell, nc and expect are probably good starting points in your search for the right tools.
  2. Implement the SMTP conversation via a different language without using any library.
  3. Use the mail library of a language to implement the SMTP conversation.
  4. Do some interesting experiments with the network tools. Explain the purposes of your experiments, the experiment setup, and your findings.

Submission

Please follow the submission instructions to turn in your work.

© 2016 Ying Li. Page last modified: .