Logo

dev-resources.site

for different kinds of informations.

Comprehensive Guide to the OSI Model, TCP/IP Model, and Application Layer

Published at
11/26/2024
Categories
webdev
computernetworking
beginners
interviewprep
Author
vignesh_j
Author
9 person written this
vignesh_j
open
Comprehensive Guide to the OSI Model, TCP/IP Model, and Application Layer

This is the fourth part of the Computer Networking series. Make sure to check the previous parts if you haven't. In this post, we’ll discuss an overview of the OSI model, TCP/IP model, and the Application Layer.

Table of Contents

  1. Structure of Network
  2. Application Layer
  3. Common Protocols in Networking
  4. Important Networking Terminologies

Structure of Network

To understand network communication and data transfer, we rely on two fundamental models:

  1. OSI Model
  2. TCP/IP Model

OSI Model

The Open Systems Interconnection (OSI) model has seven layers:

  1. Application Layer
  2. Presentation Layer
  3. Session Layer
  4. Transport Layer
  5. Network Layer
  6. Data Link Layer
  7. Physical Layer

Each layer has its own responsibilities and interacts with the layers directly above and below it. Each layer adds specific information to ensure the data reaches its destination correctly, and these steps are reversed upon arrival.

OSI model

TCP/IP Model

The Transmission Control Protocol/Internet Protocol (TCP/IP) model has four layers:

  1. Application Layer
  2. Transport Layer
  3. Network Layer
  4. Network Access Layer

The Application Layer in the TCP/IP model combines the Application, Presentation, and Session layers of the OSI model. The Network Access Layer in the TCP/IP model combines the Data Link and Physical layers of the OSI model.

TCP/IP

Application Layer

The Application Layer is where users interact with applications like web browsers, chat applications, and more. This layer resides on our devices and provides the interface for communication.

Architectures in the Application Layer

  1. Client-Server Architecture
  2. Peer-to-Peer Architecture

Client-Server Architecture

  • The application has two parts: the client and the server, which communicate with each other as processes.
  • Clients are users consuming resources. For example, when you make a request to Google, you act as a client.
  • Servers control the websites and resources you access.
  • A collection of servers forms data centers, which host services, maintain static IP addresses, and require high internet speeds for efficient operation.

Client server

Peer-to-Peer Architecture

  • There’s no dedicated server in P2P architecture. Devices communicate directly with each other.
  • Each device acts as both a client and a server, making this architecture highly scalable.

peer-to-peer

Common Protocols in Networking

  1. HTTP (HyperText Transfer Protocol): Used for browsing websites.
  2. DHCP (Dynamic Host Configuration Protocol): Allocates IP addresses dynamically.
  3. FTP (File Transfer Protocol): Transfers files between devices.
  4. SMTP (Simple Mail Transfer Protocol): Sends emails.
  5. POP3 & IMAP: Receive emails.
  6. SSH (Secure Shell): Securely connects to remote devices.
  7. VNC (Virtual Network Computing): Enables remote desktop sharing.
  8. Telnet: Allows connecting to remote hosts/devices using a Telnet client (port 23).
  9. UDP (User Datagram Protocol): A lightweight, stateless connection protocol.

Important Networking Terminologies

Let’s explain networking terms with an example: WhatsApp.

  1. Program: The application itself (e.g., WhatsApp).
  2. Process: A running instance or a feature of the program. For instance, sending a message or recording a video.
  3. Thread: A lightweight version of a process. For example, when you record a video, a thread handles the camera function.
  4. Socket: The interface between a process and the internet.
  5. Ports:
    • IP addresses identify the device making the request.
    • Ports identify the application on the device.

What about multiple processes?

If multiple processes of the same application are running (e.g., multiple Chrome tabs), ephemeral ports help distinguish which specific process made the request. These are temporary network endpoints that facilitate communication between client and server applications.

This concludes Part 4. Stay tuned for the next part, where we’ll explore more aspects of computer networking!

Follow me on Linkedin | GitHub | Twitter

interviewprep Article's
30 articles in total
Favicon
Leetcode Blind 75
Favicon
Comprehensive Guide to the OSI Model, TCP/IP Model, and Application Layer
Favicon
Networking Devices Explained: A Beginner's Guide to Routers, Switches, Hubs, and More
Favicon
Exploring Network Types and Topologies
Favicon
Introduction to Computer Networking: A Beginner's Guide to How the Internet Works
Favicon
🚀 Journey to Senior Developer 🚀
Favicon
How to Determine if an Integer is a Palindrome on LeetCode
Favicon
Diving Deep into DSA on My Journey to L5-L6! 🚀
Favicon
How to validate a Sudoku board
Favicon
How to Find First and Last Position of Element in Sorted Array
Favicon
Using Emails and Socials to get job referrals
Favicon
How did you know?
Favicon
What happens when you type a URL into your browser?
Favicon
Intro to Software Engineering Interview Prep and System Design: Tips and Resources for Success
Favicon
System Design and Interview Platform
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 6: Computer Science Fundamentals
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 5: Behavior Round
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 4: Prepare For System Design Interview
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 3: Prepare For Coding Interview
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 2: Apply For Jobs and Manage Your Applications
Favicon
The Ultimate List of Job Hunting Resources for Software Developers Part 1: Get Your Resume Ready
Favicon
Everything you need to know about Interview Kickstart: Is it worth the cost?
Favicon
Depth-First Search of a Binary Tree
Favicon
Leetcode pair programming
Favicon
Interview Kickstart Review by Marvin Gersho (Cracked Amazon’s Solutions Architect Interview)
Favicon
Weekly Coding Questions W-1
Favicon
How Much Should You Talk During an Interview?
Favicon
The complete guide to the System Design Interview in 2022
Favicon
24 microservices interview questions and answers to land that job
Favicon
Introduction to Data Structures

Featured ones: