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.
- Application layer
- Presentation layer
- Session layer
- Transport layer
- Network layer
- Data link layer
- 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:
- Application layer — This layer contains actual networked applications that people use. Protocols at this level include HTTP, DNS, and email protocols, among other things.
- 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.
- 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.
- 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.
- Network layer — Concerned with routing packets across the internet.
- Data link layer — Concerned with direct communication between two devices.
- Physical layer — This is about how messages are converted into bits and signals that are sent over a wire or through the air.