Networking Models - OSI and TCP
In this post I wanted to break down the different networking models and why they’re important. To help demonstrate, I’m going to use Cisco’s Packet Tracer.
To start, a Network Model, simply put, is just a representation of the different stops that information takes as it gets from where it’s from, to where it’s going. I like to think about it like you’re sending a letter in the mail. For example:
- You have your letter which you wrote in English because you know your friend speaks English and that is the way you’d like to communicate.
- On the front of the envelope, you know your friend’s name but you don’t remember their address. So you write their name on the front and you put your name and address on the top left of the envelope.
- You then give your friend a call and they tell you their address.
- You write the address on the letter.
- You then send take your letter to the post office.
- The post office then reads the information that’s on the front of the envelope which tells them things like who it’s coming from and where it’s going to.
- The post office then sorts it and puts it on a mail truck to be taken to your friend’s house.
- Your friend then receives the letter and can read the front to see that it’s from you and addressed to him.
- He then opens it up and, because the letter is in English, he can read and understand your message.
Information that travels from one computer to another completes a very similar process and this process was broken down, originally, into 7 steps (or layers) and called the OSI Model. These steps were:
7. Application Layer
6. Presentation
5. Session Layer
4. Transport
3. Network
2. Data Link
1. Physical
Much like the letter analogy, these are all of the steps that information takes when traveling across the network.
Protocols are also something that are important to note and are, generally, just the type of communication that is being used. In the same way that we chose to write our letter in English because we know our friend speaks English, English would be our protocol. If we chose to write our letter in Japanese, for example, and sent it to our friend, even if we addressed it correctly, if he doesn’t have a way to understand Japanese, the letter will be of no use to him and he will have no way to process that information.
Protocols in networking are referred to by port numbers. Port Numbers are just established numbers maintained by IANA (Internet Assigned Numbers Authority). For example, a basic web request uses HTTP (Hypertext Transfer Protocol) which, again using our letter analogy, would be like a language. HTTP is assigned a port number of 80. So, when one computer wants to “talk” and get information about a website that uses HTTP, the computer will send the request to Port 80.
So, what about this OSI Model..
The OSI and TCP Models are both models that act as a way to represent and show how information travels over the wire (the network).
At Layer 1, this is the Physical Layer which deals with information in bits and is the physical transportation of information over cables and wires. An example of a device that operates at Level 1 would be a hub.
At Layer 2, this is the Data Link Layer which deals with information in frames and communication via MAC addressing. An example of a device that operates at Level 2 would be a switch.
At Layer 3, this is the Network Layer which deals with information in packets and deals with communication and routing via IP Addresses. An example of a Layer 3 device would be a router.
At Layer 4, this is the Transport Layer which deals with information in TCP/UDP and will be where we get the assigned port numbers. Information as Layer 4 will typically be referred to as segments.
At Layer 5, this is the Session Layer which deals with the starting and stopping of communication between devices (deals with tunneling protocols).
At Layer 6, this is the Presentation Layer which will transform data into the form that the application accepts.
At Layer 7, this is the Application Layer which is ultimately the layer that we will see.
A more current Networking Model, however, is the TCP Model. The TCP Model acts in the exact same way, except they ended up just condensing layers 5,6, and 7. So the TCP Model has only 5 layers: Physical Layer, Data Link, Network, Transport, and Application. The Application Layer of the TCP Model is still referred to as Layer 7, just from old naming conventions.
All in all, hopefully this was an easy was to understand the overall Networking Models that we see today and how information travels across the wire!