• Tidak ada hasil yang ditemukan

Mini Assignment 1 PDF

N/A
N/A
gino

Academic year: 2023

Membagikan "Mini Assignment 1 PDF"

Copied!
5
0
0

Teks penuh

(1)

Mini Assignment 1

Setting Up, Wireshark, and Protocols

Due: Monday, September 12, 2023 at 23:55 on myCourses TA Office hours: Sept 6 to 12 (see schedule)

INTRODUCTION

The purpose of this mini assignment is to help you become familiar with some of the tools and background you will need in this course.

You are expected to do all your work on your own. Plagiarism and cheating are a serious offence. You may ask classmates, TAs and the professor clarification questions only.

Exercise 1 must be conducted using the SOCS server mimi.

Exercise 2 must be conducted using the SOCS server mimi.

Exercise 3 and 4 must be conducted using your personal computer.

You are expected to submit this mini assignment in the myCourses assignment tool: “mini 1” box.

EXCERSISES

Exercise 1 – Getting a SOCS account

The work you will do for this course will be carried out either directly on your personal computer or from the School of Computer Science’s web server. This exercise will get you connected to the school’s web server if you have not done so already. Students who have taken COMP 206 have most probably already completed this exercise in that course.

Optionally, consult this web resource before starting: https://www.cs.mcgill.ca/docs/ select:

“CS Accounts”, “Account Creation”. Follow those instructions.

Do the following:

- Step 1: Create a SOCS user account if you have not done so already. To create the account, visit https://myaccount.cs.mcgill.ca after connecting to the McGill WiFi or VPN. You will be prompted for your McGill student number, your first and your last name (as they appear in McGill's database!). Once your record is found and that you agreed to the terms, you will be given your CS username and a temporary password. Alternately you can email [email protected] for assistance.

- Step 2: Confirm that you created the SOCS account by logging into mimi.

o For Mac or Windows:

(2)

▪ WINDOWS: go to your “cmd” and then at the command prompt ssh into the server. Do it this way: ssh [email protected]. It will then ask for your CS password. It may ask you a YES/NO question, answer YES.

▪ OPTIONAL: If ssh does not work on your computer, then download putty to get a compatible program to ssh. https://www.putty.org Once the program is downloaded, run it and enter in the server name mimi.cs.mcgill.ca. You will be prompted for your username and password. If putty does not work on your computer, you can download any ssh client from the internet.

Submit the following:

- Type whoami at the mimi command line prompt to display your username and the mimi shell prompt as proof that you logged into mimi.

- Take a screenshot of the whoami output. Call that file: m1q1.jpg. Make sure your username is visible.

- Submit that screenshot as your solution to question 1. The myCourses assignment box accepts multiple submissions (and uploads).

Exercise 2 – Communication Signals

Make sure you are logged into mimi. Create a text file named m1q2.txt using vim.

Answer the following question in that text file:

Q 2.1: Convert the string “Alice” into ASCII. Note: it has 6 characters: A, l, i, c, e, null character.

Q 2.2: Convert the ASCII from Q 2.1 into 8-bit binary numbers for each character.

Q 2.3: Convert the binary from Q 2.2 into sound waves: H for high sound when the bit is 1 and L for low sound when the bit is 0. For example: binary 1001 becomes HLLH.

Q 2.4: Modulate the sound from Q 2.3 using A for HH, B for HL, C for LH, and D for LL; Where the letters A, B, C, D represent different modulated sounds.

Q 2.5 When transmitting modulated sounds as compared to unmodulated sounds, how many sound-bits are we saving after modulating?

Save the answers to these question in the file m1q2.txt. Download m1q2.txt to your computer. You could have written this on your computer, but doing this using vim on mimi and then downloading it to your computer will be very good practice for things you will need to do in future lessons when creating your own website.

Submit the following:

(3)

- Submit the downloaded file m1q2.txt (to prove that you can download) and m1q2.jpg as your solution to question 2.

Exercise 3 – Wireshark recording

Wireshark is a useful tool to diagnose internet connection issues and to learn more about packets and IP addresses and protocols. Wireshark is a tool that records the activity passing through your network card.

This activity can come from wireless or wired network packets. It includes Internet and local area network packets. It captures everything storing the “traffic” in a file that you can then view through the software. We use this tool to analyze the packets by sorting the columns and rows as you search for information and patterns.

Do the following:

- Download Wireshark at https://www.wireshark.org/download.html - Install it

- Run it to make sure it works. If you have a firewall you may need to deactivate it and reinstall.

Assume that this is not the case and just try it the first time with your firewall still running. If it did not work, then deactivate your firewall and try again.

- Turn off your browser - Launch Wireshark and then:

o Press the “record” button

o Then open your browser and type www.cs.mcgill.ca and wait for the page to load o Once you see the page, then go back to Wireshark and stop recording

o Open/Look at the recording you made and try to find two things:

▪ The packet that stores your request for www.cs.mcgill.ca

▪ The packet that contains the webpage that was returned to your browser - Take some time to look around for these two packets.

- Try to identify the parts of the packets and try to deduce the meaning of the parts. Some parts may be encrypted.

Submit the following:

- Expand the packet that contains the request to get the page and take a screenshot. Call that m1q3a.jpg. Make sure the screenshot shows it is the request packet.

- Expand the packet that contains the returned webpage containing the page contents (the HTML). Take a screenshot and call it m1q3b.jpg.

- Submit these two JPG files as your solution to question 3.

- Comment about any problems you had in completing this question. If everything worked perfectly, then you can leave this comment blank.

(4)

Exercise 4 – End-to-end and Hop-to-hop Protocols

Assume we have a small network with the following components: (1) an endpoint server called E1, (2) a second endpoint server called E2, (3) a single hop-point server between E1 and E2, called H1. The network looks like this: E1 <-> H1 <-> E2. E1 is connected to H1. H1 is connected to E2. Communication passes from E1 to E2 through H1. Communication passes from E2 to E1 through H1. Assume further that there is an application program called A1 running on server E1, and an application program called A2 running on server E2. A1 wants to send a message to A2. The message is large and needs two packets:

P1 and P2. Packet P1 is the first part of the message and packet P2 is the last part of the message. Any additional packets will be numbered Pn where n are lowercase letters a to z. You can use E2E to mean end-to-end, and H2H to mean hop-to-hop.

Do the following:

- Review the lecture notes on how packets move about a network using end-to-end and hop-to- hop protocols.

- Describe how A1 sends the message to A2 by using a table that agrees with the example table given here: (the table has been started for you)

Time A1 E1 in E1 new H1 in H1 new E2 in E2 new A2 Notes

0 Msg

1 P1 P2 Pa Pa E2E info for E2

Time – assume it is a different unit each moment something changes on the network A1 – is information that comes from our goes into the application on E1

E1 in – is packets that come from A1 or H1 (packets that arrive at E1)

E1 new – are new packets that E1 created. Define the packet in the Notes column H1 in – is packets that come from E1 or E2 (packets that arrive at H1)

H1 new – are new packets that H1 created. Define the packet in the Notes column E2 in – is packets that come from H1 or A2 (packets that arrive at E2)

E2 new – are new packets that E2 created. Define the packet in the Notes column Submit the following:

- A PDF of the above table containing your answer for the problem of passing a message from A1 to A2. The problem ends once the message arrives at A2.

- Call the PDF m1q4.pdf and upload that to the myCourses submission box.

(5)

WHAT TO HAND IN

The following files must be submitted to the “mini 1” box in the Assignment Tool at myCourses:

- m1q1.jpg

- m1q2.txt and m1q2.jpg - m1q3a.jpg and m1q3b.jpg - m1q4.pdf

HOW IT WILL BE GRADED

This mini assignment is worth 20 points and part marks can be awarded.

Deduction points:

• -3 for not following instructions

• -10% per day late, max two late days Awarding points:

• +2.5 points for Q1: demonstrates the ls command on mimi for the user’s account.

• +2.5 points for Q2: 0.5 points for each subproblem (there are 5 subproblems)

• +5 points for Q3A: showing the request packet

• +5 points for Q3B: showing the response packet

• +5 points for Q4: table of E2E and H2H protocols TA GRADING INSTRUCTIONS

- The screenshots from mimi must provide some proof that it comes from the student’s account.

For example, their command-line prompt shows their username, or the image show them logging in.

- Award scores to the student proportionally, meaning: if the student answered the question half correct then they should get half the points.

- When removing scores from a student, make sure to write the amount your removed and why in the comment area on the myCourses assignment box.

- To receive full points for question 4, the student must properly write out the entire table per timed row in the correct sequence. If a student created multiple rows for an event that should have all happened in a single row, then this will be handled as a special case for discussion with the prof.

Referensi

Dokumen terkait