Introduction to Networking

This course is about how networks, and in particular the internet, work. There are two common approaches people take to teaching networks: bottom-up and top-down. At the bottom, networking consists of things like sending signals over a wire, while at the top sit networked applications like web browsers and email. In the middle there are a bunch of protocols, such as TCP and IP. We will take the top-down approach, starting with things like HTTP and email that we are familiar with, and working our way down as far as we can get.

Networking is often broken down into seven layers in what is called the OSI model. Here they are, starting with the top layer.

  1. Application layer
  2. Presentation layer
  3. Session layer
  4. Transport layer
  5. Network layer
  6. Data link layer
  7. Physical layer

In this class, we will focus on layers 2, 3, 4, and 7. There's not much going on at Layers 5 and 6, at least compared to the other layers. They are not all that interesting, and will likely never be an answer to any question in this class. Layer 1 is interesting, but it involves a fair bit of physics, so we won't be able to spend too much time on it.

There is a competing model called the TCP/IP model. It arguably is a better representation of what the internet actually looks like. In it, there are four layers: Application, Transport, Network, and Link. The Application layer corresponds to Layers 5, 6, and 7 of the OSI model, and the Link layer comprises Layers 1 and 2 of the OSI model. Layers 3 and 4 are the same in both models.

Both models are in common use, so it's good to be familiar with both, and it's good to know both the names and the numbers. Often people will refer to something like a “Layer 2 switch” or a “Layer 7 DDoS attack”.

Here is a brief description of each layer's purpose:

  1. Application layer — This layer contains actual networked applications that people use. Protocols at this level include HTTP, DNS, and email protocols, among other things.
  2. Presentation layer — Concerned with taking the data from lower layers and formatting it to fit the needs of Layer 7. We won't cover it much in this course.
  3. Session layer — This layer is about creating sessions. It acts as a bit of a go-between from Layer 7 to the lower layers. We won't cover it much in this course.
  4. Transport layer — Adds reliability to the lower layers. Packets can be lost at the lower layers due to network problems, and the Transport layer's purpose is to deal with this.
  5. Network layer — Concerned with routing packets across the internet.
  6. Data link layer — Concerned with direct communication between two devices.
  7. Physical layer — This is about how messages are converted into bits and signals that are sent over a wire or through the air.

Protocols
A key concept in this class is that of protocols. Imagine that you are writing a networked game and you need to send game state information to players across the network. The machine receiving the game data needs to be able to interpret what you sent. It does that using a computer program. Programs aren't smart like humans, so they need the data to be arranged in a very specific way so that the program knows where to find it. That's what a protocol is all about. It's a particular means of organizing data and processes so that senders and receivers can communicate clearly and unambiguously.

A brief history of the internet
The term internet means a network of networks. The internet is a very specific network of networks that was developed in the late 1960s by the US Department of Defense. Throughout the 1970s and 1980s, various technology companies and universities joined the network, and protocols such as TCP, IP, and DNS were developed, as were applications like email, telnet, and FTP (file transfer protocol). The internet didn't really start to get big until the 1990s, when HTTP and the world-wide web (WWW) were developed. People often get the world-wide web confused with the internet, thinking it is the internet. But it's actually just one particular application on the internet. By the mid to late 1990s, the internet entered popular culture and since then has started taking over more and more of modern life.