Skip to content

Projects#

Because this topic is so big, we'll explore a few key projects to help you understand what's going on and hopefully visually see networking in action.

To complete thse projects, you'll need to familiarise yourself (and possibly download) with the following tools:

  1. Wireshark
  2. Python 3
  3. curl

Once you have these in place and can use them (and exercise left to you, dear reader), then we can get on with some cool projects.

TCP Sockets#

Using Wireshark, tell us what TCP sockets you have open on your local system.

  1. How many of them are listening for inbound connections?
  2. How many are outbound and are connected to a remote server?
  3. Of the sockets you have listening locally, what are the Application Level protocols they're listening for?

Write a short report on how you found the sockets, what tool(s) you used and options, and what they're open for.

Some things can be ignored

Some sockets might have a special meaning, so if you cannot information about the protocol don't worry about it. Just move on.

Remote HTTP Traffic#

Now we're going to use a special Python 3 module that will allow us to create a local web server that we can then use to analyse the traffic.

Place the following content in a file called index.html somewhere in an empty folder of your choice:

1
<html><head><title>Upload Academy Learning</title></head><body><h1>The Answer</h1><p>It's 42.</p></body></html>

Now open a terminal up in the location of the file and run this: python3 -m http.server

Here's how I did this on Linux:

1
2
3
4
5
6
7
/tmp/server
$ cat > index.html
<html><head><title>Upload Academy Learning</title></head><body><h1>The Answer</h1><p>It's 42.</p></body></html>

/tmp/server
$ python3 -m http.server 9000
Serving HTTP on 0.0.0.0 port 9000 (http://0.0.0.0:9000/) ...

Now I have an HTTP server running locally, but what now?

We want you to analyse the traffic to that server:

  1. Using Wireshark, filter for HTTP traffic to localhost:9000 (you should know what protocol is being used: TCP or UDP?)
  2. Now use curl to send simple requests to the server, like curl http://localhost:9000/index.html - what do you get back?
  3. What happens if you request a missing or nonexistent resource?
  4. What happens if you add an image to the same directory as index.html and then request it?
  5. Use the -I flag on curl and explain what you're seeing - break down each header in the repsonse.

Whilst doing all of the above, you should be using Wireshark to analyse and breakdown the traffic you're seeing. Write a small report on the protocols being used for each requets you're making:

  1. How many packets are being sent?
  2. What protocol is being used?
  3. Show use a capture of a single packet and explain some of the details you're seeing