🌐 Introduction to Network Models
How many layers are there in networking? Do we have a four-layer TCP/IP model or perhaps a five-layer TCP/IP model or do we have a seven-layer OSI model?
- Five Layer TCP/IP model which is a combination of the original RFC 1122 TCP/IP model and the OSI models. So basically, it's a hybrid of multiple models.
Figure: Network Communication Models
🏗️ Why Do We Need Models?
- We have a model which means we're taking a complex problem and we're breaking it up into smaller components or smaller pieces.
- Models are used in many places as an example if you're building a house, you typically have a blueprint or a model of what the House is going to look like.
- It makes a lot more sense to create a blueprint of a house and then have specific people work on specific parts of the building and do what they are good at.
- So as an example, a plumber will work on the plumbing, an electrician will concentrate on the electricity, a bricklayer will concentrate on laying the bricks.
- But they all work together to create the end result which is the house that you want built.
- It's going to be much easier to have a blueprint or a model that everyone works towards to build something rather than them just arriving on site and then saying let's build this house, but they don't actually know what the house looks like.
- You have an electrician working on the plumbing or a plumber working on bricklaying.
- That's not going to scale very well.
- So, similarly we have different layers in the OSI model and different people concentrate on different layers.
- Now the layers that we as networking people concentrate on are the lower four layers which in the OSI model are called transport, network, data link and physical.
🔄 TCP/IP vs OSI Model
- In the new version of the CCNA they are using this hybrid model where they've taken parts of the OSI model and added it to the TCP/IP model.
- You need to know both the OSI model and TCP/IP model but concentrate on the TCP/IP model.
- The OSI model which consists of the seven layers physical layer, data link layer, network layer, transport layer, session layer, presentation layer, and application layer isn't as important as the TCP/IP hybrid model if you like.
- So, a five-layer TCP/IP model which is more real world which has a physical layer, data link layer, network layer, transport layer and a combined application layer.
- But notice we talk about Layer 7 applications because of the history of the OSI model being used.
- So, notice we have layer 1, layer 2, layer 3, layer 4, those are the layers that we concentrate on as a networking person. And then we have a combined layer 5 to Layer 7 called the application layer but we still referred to it as application layer.
📚 The Seven Layers of OSI Model
The Open Systems Interconnection (OSI) model is a conceptual model created by the International Organization for Standardization in 1984 which enables diverse communication systems to communicate using standard protocols. In plain English, the OSI provides a standard for different computer systems to be able to communicate with each other.
The OSI Model can be seen as a universal language for computer networking. It's based on the concept of splitting up a communication system into seven abstract layers, each one stacked upon the last.
The OSI model is divided into two layers: upper layers and lower layers.
Figure: OSI Model Layer Division
- The upper layer of the OSI model mainly deals with the application related issues, and they are implemented only in the software. The application layer is closest to the end user. Both the end user and the application layer interact with the software applications. An upper layer refers to the layer just above another layer.
- The lower layer of the OSI model deals with the data transport issues. The data link layer and the physical layer are implemented in hardware and software. The physical layer is the lowest layer of the OSI model and is closest to the physical medium. The physical layer is mainly responsible for placing the information on the physical medium.
🎯 Layer 7 - Application Layer
Human-computer interaction layer, where applications can access the network services. Here are your applications. E-mail, browsing the web (HTTP), FTP, and many more.
Figure: Application Layer
🔄 Layer 6 - Presentation Layer
Ensures that data is in a usable format and is where data encryption occurs. This one will make sure that information is readable for the application layer by formatting and structuring the data. Most computers use the ASCII table for characters. If another computer would use another character like EBCDIC, then the presentation layer needs to "reformat" the data, so both computers agree on the same characters.
Figure: Presentation Layer
🔗 Layer 5 - Session Layer
Maintains connections and is responsible for controlling ports and sessions. The session layer takes care of establishing, managing, and terminating sessions between two hosts. When you are browsing a website on the internet, you are probably not the only user of the web server hosting that website. This web server needs to keep track of all the different "sessions."
Figure: Session Layer
🚚 Layer 4 - Transport Layer
Transmits data using transmission protocols including TCP and UDP. When you downloaded this lesson from the Internet, the webpage was sent in segments and transported to your computer.
Figure: Transport Layer
🗺️ Layer 3 - Network Layer
Decides which physical path the data will take. This layer takes care of connectivity and path selection (routing). This is where IPv4 and IPv6 live. Every network device needs a unique address on the network.
Figure: Network Layer
🔗 Layer 2 - Data Link Layer
Defines the format of data on the network. This layer makes sure data is formatted the correct way, takes care of error detection, and makes sure data is delivered reliably. This might sound a bit vague, but for now, remember that this is where "Ethernet" lives. MAC Addresses and Ethernet frames are on the Data Link layer.
Figure: Data Link Layer
⚡ Layer 1 - Physical Layer
Transmits raw bit stream over the physical medium. This layer describes stuff like voltage levels, timing, physical data rates, physical connectors, and so on. Everything you can "touch" since it's physical.
Figure: Physical Layer
📝 Real-Life Example of Data Transmission
Let's take a look at a real-life example of data transmission:
- Application Layer: You are sitting behind your computer and want to download some files from a local webserver. You start up your web browser and type in the URL of your favorite website. Your computer will send a message to the web server requesting a certain web page. You now use the HTTP protocol, which lives on the application layer.
- Presentation Layer: The presentation layer will structure the information of the application in a certain format.
- Session Layer: The session layer will make sure to separate all the different sessions.
- Transport Layer: Depending on the application, you want a reliable (TCP) or unreliable (UDP) protocol to transfer data to the web server. In this case, it'll choose TCP since you want to ensure the webpage makes it to your computer. We'll discuss TCP and UDP later.
- Network Layer: Your computer has a unique IP address (for example, 192.168.1.1), and it will build an IP packet. This IP packet will contain all the data of the application, presentation, and session layer. It also specifies which transport protocol it's using (TCP in this case) and the source IP address (your computer 192.168.1.1), and the destination (the web server's IP address).
- Data Link Layer: The IP packet will be put into an Ethernet Frame. The Ethernet frame has a source MAC address (your computer) and the destination MAC address (webserver). More about Ethernet and MAC addresses later.
- Physical Layer: Finally, everything is converted into bits and sent down the cable using electric signals.
🔽 Encapsulation: Going from the application layer all the way down to the physical layer is what we call encapsulation.
🔼 De-encapsulation: Going from the physical layer and working your way up to the application layer is called de-encapsulation.
📦 Protocol Data Units (PDUs)
Now you know about the OSI model, the different layers, and the function of each layer. During peer-to-peer communication, each layer has "packets of information." We call these protocol data units (PDU). Now every unit has a different name on the different layers:
- 🚚 Transport layer: Segments; For example, we talk about TCP segments.
- 📦 Network layer: Packets; For example, we talk about IP packets here.
- 🔗 Data link layer: Frames; For example, we talk about Ethernet frames here.
- ⚡ Physical layer: Bits; For example, we talk about the electric current going on/off (1/0)
⚠️ Important: This is just terminology, so don't mix up talking about IP frames and Ethernet packets…
🆚 OSI vs TCP/IP Model Comparison
- OSI Model: Just a reference model, a blueprint.
- TCP/IP Model: An implementation of current internet architecture.
- OSI Development: Developed by ISO (International Standard Organization)
- TCP/IP Development: Developed by ARPANET (Advanced Research Project Agency Network)
📝 Key Takeaways:
- OSI model provides a universal language for computer networking
- Seven layers each have specific functions and responsibilities
- TCP/IP model is more practical for real-world implementation
- Lower 4 layers are focus areas for networking professionals
- Each layer has specific Protocol Data Units (PDUs)
- Encapsulation and de-encapsulation are key processes
- Understanding both models is essential for networking
This comprehensive guide provides a deep understanding of the OSI and TCP/IP models, essential knowledge for anyone working in networking. Whether you're studying for certifications or building network infrastructure, these concepts form the foundation of modern networking.
No comments:
Post a Comment