CS 101: Introduction to Computer Science
James Madison University, Fall 2018 Semester

Lab05: Wireshark, mtr, web tools

Background

Today we're going to look at how the Internet works from several different angles: the command line, a packet analyzer, and developer tools. You'll also have the opportunity to create your own website. If you have not worked through the Networking Tutorials, please do so before you begin the lab.

Objectives

Click here to download Lab05-Worksheet.txt
Do NOT change the name of the worksheet file.

Part 1: Ping and Traceroute

As a warm-up exercise, let's do some networking from the command line. Open up a terminal and follow along.
  1. The ping utility lets you check whether a machine is present on the Internet. It's the first thing to try whenever it appears that your network is down. Enter the command ping www.jmu.edu and see what happens. Wait several seconds and then press Ctrl-C (i.e., hold the Ctrl key and press C) to terminate the process. Now try the command ping fau.eu. As before, press Ctrl-C when you've seen enough. Answer question #1 in the worksheet.

  2. Another handy utility is mtr ("my traceroute") which shows the path that packets must travel in order to get from your computer to another. Enter the command mtr www.jmu.edu and see what happens. Then exit the program and do the same for fau.eu. Answer question #2 in the worksheet.

Part 2: Wireshark Packet Analyzer

Let's take a quick look at what packets actually look like. Go ahead and close your terminal, and then open Wireshark directly from the Linux menu.
  1. Download the file http.cap and open it in Wireshark. This file represents packets that were sent to (and received from) a web server while loading a single page. Figure out how to use Wireshark to answer questions #3, #4, and #5 in the worksheet.

  2. Now download the file https.cap, open it in Wireshark, and answer question #6 in the worksheet. (Note: Both of these files came from the sample captures on the Wireshark Wiki. This example is from snakeoil2_070531.tgz.)

Part 3: Chrome Developer Tools

There sure are a lot of packets that go into a single web request! Let's take a look at how things work at a different level of abstraction.
  1. Open the Chrome Developer Tools and click on the Network tab. Then navigate to http://www.google.com/. Use the information collected to answer question #7 in the worksheet.

  2. Switch to the Elements tab. Navigate the HTML to highlight the menu bar across the top of the page. Answer questions #8 and #9 in the worksheet.

Part 4: Make Your Own Web Page

All students with a CS account (i.e., those who can log into our lab machines) have space on http://w3stu.cs.jmu.edu/ to host their own websites.
  1. For this part of the lab, you'll need to connect to the CS student server. Open a terminal and enter the command ssh stu.cs.jmu.edu (ssh means "secure shell"). When asked, enter your JMU password—nothing will be displayed on the screen, just type your password anyway. You'll be connected when you see the prompt username@student:~$.

  2. Navigate to the www directory in your home directory (i.e., cd www). This directory is a shortcut to /cs/www/stu/username which is accessible over the Internet via http://w3stu.cs.jmu.edu/username. Notice how the path in the URL does not include /cs/www/stu.

  3. Type nano index.html to create a new file in that directory. Nano is a simple text editor that runs inside the terminal. Type the words "Hello, World!" and save the file (press Ctrl-O). In a web browser, navigate to your directory on w3stu and make sure you can view the file. Congratulations, you now have a CS home page.

  4. Add some HTML tags to index.html to make it valid. You might want to start with the template named "HTML document" on W3Schools HTML Examples. Continue figuring out how to use nano; learning this skill will pay off later on.

  5. In addition to this week's lab worksheet, we will grade your CS home page. Your index.html file should include an appropriate <title> and two or more hypertext links (i.e., that you can actually click on). Remember that this page is publicly available over the Internet.

  6. [OPTIONAL] It's up to you what else you'd like to put on your home page. Some students put their real name, a picture, and/or a few favorite links. Others use this space to post their resume when looking for an internship or full-time job. Be creative and have fun, but don't spend too much time on it. :-)

Submission Instructions