Skip to main content

Command Palette

Search for a command to run...

Week 9.4 โ€“ Networking Fundamentals & OSI Model Explained

Learn IP Addressing, Subnets, CIDR, Ports, DNS Resolution, TCP Handshake, OSI Model, TCP/IP Architecture, and Networking Concepts Every DevOps Engineer Must Know. ๐Ÿš€

Updated
โ€ข17 min read
Week 9.4 โ€“ Networking Fundamentals & OSI Model Explained
H
๐Ÿ‘‹ Hi, Iโ€™m Hritik Ranjan โ€” a B.Tech CSE student and a passionate tech enthusiast focused on Quality Engineering, AI/ML, Cybersecurity, and DevOps. ๐Ÿ’ก I enjoy building and testing scalable, secure, and intelligent systems that solve real-world problems. My expertise and interests include: ๐Ÿ”น Quality Assurance & Testing Hands-on experience in manual and automation testing using Selenium & Java, ensuring high-quality and reliable applications. ๐Ÿ”น Artificial Intelligence & Machine Learning Exploring advanced algorithms and developing intelligent systems for practical use cases. ๐Ÿ”น Cybersecurity Focused on vulnerability assessment, security testing, and system hardening. ๐Ÿ”น Web Development Building responsive and user-friendly applications using modern technologies. ๐Ÿ”น Data Science Analyzing complex data to extract actionable insights. ๐Ÿ’ผ Key Projects: ๐Ÿš€ Blindness Detection System Applied computer vision techniques to detect blindness-related conditions. ๐Ÿš€ AI-Powered Rail Madad Enhancement Developed an intelligent complaint management system to improve railway customer service. ๐Ÿš€ Interactive Applications Built multiple projects like quiz apps, calculators, and productivity tools. ๐ŸŒฑ Iโ€™m continuously learning and improving my skills in DevOps, Cloud, and Automation to become a well-rounded engineer. ๐Ÿค Open to collaborations, internships, and opportunities in QA, DevOps, AI/ML, and Cybersecurity. ๐Ÿ“ซ Letโ€™s connect: hritikranjan1408@gmail.com

๐ŸŒ Networking Concepts Made Easy | Complete Beginner Guide to IP Address, Subnets, CIDR & Ports ๐Ÿš€

Networking is one of the most important skills for DevOps Engineers, Cloud Engineers, System Administrators, and Software Developers.

Whenever you open a website, connect to a server, use Docker, deploy Kubernetes applications, or access cloud services, networking is working behind the scenes.

Understanding networking fundamentals helps you troubleshoot issues faster and build reliable systems.


๐Ÿ“˜ What is Networking?

Networking is the process of connecting multiple devices so they can communicate and share information.

Examples:

  • Accessing Google from your laptop.

  • Connecting your phone to Wi-Fi.

  • Communicating between Kubernetes Pods.

  • Connecting an application to a database server.

Without networking, devices cannot exchange information.


๐Ÿค” Why Should DevOps Engineers Learn Networking?

In real-world production environments, many issues are network-related.

Examples:

  • Application cannot reach the database.

  • Website is inaccessible.

  • Kubernetes Pods cannot communicate.

  • Load Balancer is not routing traffic.

  • DNS resolution fails.

Networking knowledge helps engineers quickly identify and solve these problems.


๐Ÿ”น What is an IP Address? ๐Ÿ“

An IP Address (Internet Protocol Address) is a unique identifier assigned to every device connected to a network.

Just like every house has a unique address, every device on a network requires a unique IP address.

Examples:

192.168.1.10
172.16.0.5
10.0.0.20

Without an IP address, devices cannot find or communicate with each other.


๐Ÿ  Real-Life Example of an IP Address

Imagine sending a courier package.

The courier company needs:

  • Sender Address

  • Receiver Address

Similarly, when data travels across a network:

  • Source IP = Sender Address

  • Destination IP = Receiver Address

This allows information to reach the correct destination.


๐Ÿ”น Understanding IPv4

The most commonly used IP version today is IPv4.

Example:

192.168.1.100

IPv4 contains:

192 . 168 . 1 . 100

Four sections called octets.

Each octet ranges from:

0 - 255

๐Ÿค” Why Can an Octet Only Be Between 0 and 255?

Each octet contains 8 bits.

Example:

11111111

Binary value:

255

Therefore:

Minimum = 0
Maximum = 255

This is why IPv4 addresses always use numbers between 0 and 255.


๐Ÿ”น Public IP vs Private IP

๐ŸŒ Public IP Address

A public IP is accessible from the internet.

Example:

49.37.102.10

Used by:

  • Websites

  • Cloud servers

  • Load Balancers


๐Ÿ”’ Private IP Address

Private IPs are used within internal networks.

Examples:

192.168.x.x
10.x.x.x
172.16.x.x - 172.31.x.x

Used by:

  • Home Wi-Fi networks

  • Corporate networks

  • Kubernetes clusters

  • Cloud VPCs

Private IPs cannot be accessed directly from the internet.


๐Ÿ”น What is a Subnet? ๐Ÿ˜๏ธ

A Subnet (Sub Network) is a smaller network created inside a larger network.

Instead of placing all devices in one large network, organizations divide them into smaller segments.

Benefits:

โœ… Better Security

โœ… Better Isolation

โœ… Better Management

โœ… Improved Performance


๐Ÿข Real-World Example of Subnets

Imagine a company with multiple departments:

  • HR

  • Finance

  • Development

  • Security

Instead of allowing everyone access to everything, each department gets its own subnet.

Example:

HR Network        โ†’ 10.0.1.0/24
Finance Network   โ†’ 10.0.2.0/24
Development       โ†’ 10.0.3.0/24

This improves security and organization.


๐Ÿ”น Public vs Private Subnets

๐ŸŒ Public Subnet

Resources inside a public subnet can directly access the internet.

Examples:

  • Load Balancers

  • Web Servers

  • Bastion Hosts


๐Ÿ”’ Private Subnet

Resources inside a private subnet are hidden from the internet.

Examples:

  • Databases

  • Internal Applications

  • Kubernetes Worker Nodes

This improves security.


๐Ÿ”น What is CIDR? ๐Ÿ“

CIDR stands for:

Classless Inter-Domain Routing

CIDR defines the size of an IP address range.

Example:

192.168.1.0/24

The number after "/" determines how many IP addresses are available.


๐Ÿ”น Common CIDR Ranges

CIDR Total IPs
/24 256
/25 128
/26 64
/27 32
/28 16
/29 8

๐Ÿงฎ CIDR Example

Example:

192.168.1.0/24

Contains:

192.168.1.0
to
192.168.1.255

Total:

256 IP Addresses

๐Ÿ”น Why CIDR is Important?

CIDR helps cloud engineers allocate network ranges efficiently.

Examples:

AWS VPC

10.0.0.0/16

Public Subnet

10.0.1.0/24

Private Subnet

10.0.2.0/24

This allows proper network planning.


๐Ÿ”น What is a Port? ๐Ÿšช

An IP address identifies a machine.

A Port identifies a specific application running on that machine.

Think of it this way:

  • IP Address = Apartment Building

  • Port = Apartment Number

Without ports, the operating system wouldn't know which application should receive incoming traffic.


๐Ÿ–ฅ๏ธ Real-Life Example

Suppose a server has IP:

192.168.1.10

Running:

  • Website

  • Database

  • SSH Service

Each application uses a different port.

Service Port
HTTP 80
HTTPS 443
SSH 22
MySQL 3306
PostgreSQL 5432
Jenkins 8080
Kubernetes API 6443

๐Ÿ”น Why Ports Are Important?

Ports allow multiple applications to run on the same server.

Example:

192.168.1.10:80

Website

192.168.1.10:22

SSH Access

192.168.1.10:3306

MySQL Database

Same IP, different applications.


๐ŸŒ Networking in Kubernetes

Networking concepts become even more important in Kubernetes.

Examples:

  • Pod IP Addresses

  • ClusterIP Services

  • NodePort Services

  • Ingress Controllers

  • Load Balancers

Without networking fundamentals, Kubernetes becomes difficult to understand.


โ˜๏ธ Networking in Cloud Platforms

Cloud providers heavily use networking concepts.

Examples:

AWS

  • VPC

  • Subnets

  • Security Groups

  • Route Tables

  • NAT Gateway

Azure

  • Virtual Networks

  • Network Security Groups

Google Cloud

  • VPC Networks

  • Firewall Rules

Networking is the backbone of cloud infrastructure.


๐ŸŽฏ Interview Questions & Answers

Q1. What is an IP Address?

An IP Address is a unique identifier assigned to a device on a network.


Q2. What is the difference between Public and Private IP?

Public IPs are accessible from the internet, while Private IPs are used only within internal networks.


Q3. What is a Subnet?

A subnet is a smaller network created from a larger network to improve security and management.


Q4. What is CIDR?

CIDR (Classless Inter-Domain Routing) defines the size of an IP address range.


Q5. What does /24 mean?

A /24 network contains 256 IP addresses.


Q6. What is a Port?

A port is a logical endpoint used by applications to send and receive network traffic.


Q7. What port does SSH use?

22

Q8. What port does HTTPS use?

443

Q9. Why are subnets important?

Subnets provide security, isolation, and better network organization.


Q10. Why should DevOps Engineers learn networking?

Because most cloud, Kubernetes, Docker, and production system issues involve networking concepts.


๐ŸŒ OSI Model Simplified โ€“ Complete Beginner Guide for DevOps Engineers

The OSI (Open Systems Interconnection) Model is a framework that explains how data travels from one device to another over a network. It helps us understand networking concepts in a structured way and makes troubleshooting much easier.

Whenever you open a website, send an email, watch a YouTube video, or use any internet service, data passes through multiple layers before reaching its destination. The OSI model divides this entire process into seven layers.

For DevOps Engineers, Cloud Engineers, System Administrators, and Network Engineers, understanding the OSI model is extremely important because most real-world troubleshooting involves identifying which layer is causing an issue.


๐Ÿค” Why Do We Need the OSI Model?

Imagine sending a package from one city to another.

  • The package is packed.

  • Address information is added.

  • It is transported through multiple routes.

  • It finally reaches the recipient.

Network communication works similarly.

The OSI model breaks this communication process into smaller layers so that each layer has a specific responsibility.

Benefits of the OSI Model

โœ… Easier troubleshooting

โœ… Better understanding of network communication

โœ… Standardized communication process

โœ… Helps different vendors build compatible systems

โœ… Useful for DevOps, Cloud, and Security Engineers


๐ŸŒ What Happens When You Open a Website?

Let's assume you type:

https://www.google.com

inside your browser.

Before the website loads, several processes happen behind the scenes.


๐Ÿ”น Step 1: DNS Resolution

Computers do not understand domain names.

They communicate using IP addresses.

When you enter:

google.com

the browser first asks a DNS server:

"What is the IP address of google.com?"

DNS then returns something like:

142.250.183.14

Now the browser knows where to send the request.


๐Ÿ”น Step 2: TCP Three-Way Handshake

Before sending actual data, the client and server establish a connection.

This process is called the TCP Three-Way Handshake.

Step 1: SYN

Client sends:

SYN

Meaning:

"Can we start communication?"

Step 2: SYN-ACK

Server replies:

SYN + ACK

Meaning:

"Yes, I'm ready."

Step 3: ACK

Client responds:

ACK

Meaning:

"Connection established."

Now communication can begin.


๐Ÿ—๏ธ The 7 Layers of the OSI Model

The OSI model consists of seven layers.

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

A simple way to remember them:

Application
Presentation
Session
Transport
Network
Data Link
Physical

๐Ÿ”น Layer 7 โ€“ Application Layer

The Application Layer is the closest layer to the user.

This is where applications interact with the network.

Examples

  • Web Browsers

  • Gmail

  • WhatsApp

  • Slack

  • Microsoft Teams

  • APIs

Common Protocols

HTTP
HTTPS
FTP
SMTP
DNS

Real-Life Example

When you open Google Chrome and visit a website, the request starts at the Application Layer.


๐Ÿ”น Layer 6 โ€“ Presentation Layer

This layer handles data formatting and encryption.

Its job is to ensure data is presented in a format both systems can understand.

Responsibilities

  • Data formatting

  • Data conversion

  • Compression

  • Encryption

  • Decryption

Example

When HTTPS encrypts your data before sending it over the internet, the Presentation Layer is involved.


๐Ÿ”น Layer 5 โ€“ Session Layer

The Session Layer creates, manages, and terminates communication sessions.

Think of it as a manager that keeps track of conversations between devices.

Responsibilities

  • Session creation

  • Session maintenance

  • Session termination

Example

When you log in to a website and remain logged in while browsing multiple pages, the Session Layer helps maintain that session.


๐Ÿ”น Layer 4 โ€“ Transport Layer

The Transport Layer ensures reliable communication between devices.

This layer divides large data into smaller segments.

Main Protocols

TCP
UDP

TCP (Transmission Control Protocol)

TCP guarantees delivery.

Features

โœ… Reliable

โœ… Error checking

โœ… Ordered delivery

Examples

  • HTTPS

  • Banking Applications

  • Online Shopping


UDP (User Datagram Protocol)

UDP focuses on speed rather than reliability.

Features

โœ… Fast

โœ… Lightweight

โŒ No delivery guarantee

Examples

  • Video Streaming

  • Gaming

  • Voice Calls


๐Ÿ”น Layer 3 โ€“ Network Layer

The Network Layer handles routing.

It determines how packets travel from source to destination.

Responsibilities

  • Routing

  • Logical addressing

  • Path selection

Uses IP Addresses

Example:

192.168.1.10

Devices

  • Routers

Real-Life Example

Google receives millions of requests daily.

Routers determine the best path for your packet to reach Google's servers.


๐Ÿ”น Layer 2 โ€“ Data Link Layer

The Data Link Layer handles communication within the same local network.

Instead of IP addresses, it uses MAC addresses.

Responsibilities

  • Framing

  • Error detection

  • MAC addressing

Devices

  • Switches

Example MAC Address

00:1A:2B:3C:4D:5E

๐Ÿ”น Layer 1 โ€“ Physical Layer

This is the lowest layer.

It handles the actual transmission of data.

Examples

  • Network cables

  • Fiber optic cables

  • Wireless signals

  • Electrical signals

Responsibilities

  • Sending bits

  • Receiving bits

  • Physical connectivity

Without this layer, no data can move.


๐Ÿ“ฆ Data Encapsulation Explained

As data moves down the OSI model, each layer adds its own information.

Application Data
โ†“
Segments
โ†“
Packets
โ†“
Frames
โ†“
Bits

When data reaches the destination, the reverse process occurs.

This is called:

Decapsulation

๐Ÿ”„ Real-Life Example of the OSI Model

Suppose you watch a YouTube video.

Application Layer

You click Play.

Presentation Layer

Video data is compressed and encrypted.

Session Layer

Session is established between your device and YouTube.

Transport Layer

Video data is divided into segments.

Network Layer

Packets are routed through the internet.

Frames are transferred between devices.

Physical Layer

Signals travel through cables and wireless networks.

Finally, the video appears on your screen.


๐Ÿ†š OSI Model vs TCP/IP Model

In real-world networking, the TCP/IP model is more commonly used.

OSI Model

7 Layers

TCP/IP Model

Application
Transport
Internet
Network Access

TCP/IP combines:

Application
Presentation
Session

into a single Application Layer.


๐Ÿ’ก Why DevOps Engineers Should Learn the OSI Model?

In DevOps, networking issues happen frequently.

Understanding the OSI model helps identify where problems occur.

Common Troubleshooting Examples

Problem OSI Layer
Website not opening Layer 7
SSL Certificate Error Layer 6
Session Timeout Layer 5
TCP Connection Failure Layer 4
Routing Issue Layer 3
Switch Failure Layer 2
Cable Disconnected Layer 1

๐ŸŽฏ Key Takeaways

  • OSI stands for Open Systems Interconnection.

  • It divides networking into seven layers.

  • DNS resolution and TCP handshake happen before communication begins.

  • Each layer has a specific responsibility.

  • Layer 7 is closest to users, while Layer 1 handles physical transmission.

  • TCP/IP is the practical networking model used today.

  • Understanding the OSI model helps DevOps engineers troubleshoot network issues quickly and efficiently.

๐Ÿš€ Once you understand the OSI model, networking becomes much easier because you can identify exactly where a problem is occurring instead of guessing.


๐Ÿš€ Continue Your Learning Journey

Thank you for taking the time to read this article.

Technology is evolving rapidly, and continuous learning is one of the most valuable investments you can make in your career. Whether you're exploring DevOps, Cloud Computing, Artificial Intelligence, Cybersecurity, Software Development, Data Science, or Career Growth, the resources below can help you deepen your knowledge and stay ahead in the industry.


๐ŸŽ“ Recommended Learning Platforms

๐Ÿš€ Coursera

Learn from world-renowned universities and industry leaders including Google, IBM, Stanford, Microsoft, Meta, and many more.

โœ” Professional Certificates โœ” Career-focused Learning Paths โœ” AI & Machine Learning Programs โœ” Cloud & DevOps Certifications โœ” Business & Leadership Courses

๐Ÿ”— https://imp.i384100.net/k0KvbV


๐Ÿ’ป Udemy

One of the largest online learning platforms with practical, hands-on courses covering:

โœ” DevOps & Kubernetes โœ” Docker & Cloud Computing โœ” AWS, Azure & GCP โœ” Programming & Development โœ” Cybersecurity & Ethical Hacking

๐Ÿ”— https://trk.udemy.com/MAL2MY


๐Ÿ“Š DataCamp

A great platform for anyone interested in:

โœ” Python Programming โœ” SQL & Databases โœ” Data Analytics โœ” Machine Learning โœ” Artificial Intelligence

Interactive learning paths and hands-on projects make it ideal for beginners and professionals alike.

๐Ÿ”— https://datacamp.pxf.io/nX4kER


๐ŸŽ“ edX

Access high-quality courses and certifications from leading institutions such as:

โœ” Harvard University โœ” MIT โœ” Berkeley โœ” Microsoft

Perfect for learners seeking university-level education online.

๐Ÿ”— https://edx.sjv.io/POvVeN


๐ŸŽจ Domestika

Enhance your creative skills with courses on:

โœ” Graphic Design โœ” Video Editing โœ” Animation โœ” Digital Marketing โœ” Content Creation

๐Ÿ”— https://domestika.sjv.io/dynKAW


๐Ÿ› ๏ธ Recommended Tools & Resources

๐Ÿ”ฅ AppSumo

Discover exclusive lifetime deals on:

โœ” AI Tools โœ” Productivity Software โœ” Developer Utilities โœ” Marketing Platforms โœ” Business Applications

A must-have resource for developers, creators, freelancers, and entrepreneurs looking to save money while accessing premium tools.

๐Ÿ”— https://appsumo.8odi.net/L04a33


๐Ÿ›’ Shopify

Looking to start an online business or launch an eCommerce store?

Shopify provides everything you need to build, manage, and scale an online business.

โœ” Online Store Builder โœ” Payment Integration โœ” Inventory Management โœ” Marketing Tools

๐Ÿ”— https://shopify.pxf.io/Vxv09k


๐ŸŒ WordPress, WooCommerce & Jetpack

Create professional websites, blogs, and online stores with one of the most trusted web ecosystems in the world.

Ideal for:

โœ” Personal Blogs โœ” Portfolio Websites โœ” Business Websites โœ” eCommerce Stores

๐Ÿ”— https://automattic.pxf.io/Z6vR5W


๐ŸŒ Language Learning Resources

๐Ÿ—ฃ๏ธ Preply

Learn English and other languages through personalized one-on-one tutoring sessions with experts from around the world.

๐Ÿ”— https://preply.sjv.io/o4gBDY


๐Ÿ“š British Council English Online

Improve your professional communication skills and English fluency through structured learning programs.

๐Ÿ”— https://englishonline.sjv.io/9VOGa4


๐Ÿง  Rosetta Stone

One of the most recognized language-learning platforms for immersive language acquisition.

๐Ÿ”— https://aff.rosettastone.com/X4OyqG


๐Ÿงช Science & Educational Resources

๐Ÿ”ฌ MEL Science

Interactive science kits and educational experiences designed to make STEM learning engaging and practical.

๐Ÿ”— https://imp.i328067.net/bk2beg


๐Ÿ“– Carson Dellosa Education

Educational materials and learning resources for students, teachers, and lifelong learners.

๐Ÿ”— https://carsondellosaeducation.sjv.io/E0JbjW


โค๏ธ Support My Work

Creating detailed technical content, tutorials, guides, and learning resources takes significant time and effort.

If you find my articles helpful and would like to support my work, you can do so through the following platforms:

โญ Become a GitHub Sponsor

Support my open-source contributions, technical content, and community projects.

๐Ÿ”— https://github.com/sponsors/hritikranjan1


โ˜• Buy Me a Chai

Enjoying my content? Consider buying me a chai and supporting future tutorials, guides, and educational resources.

๐Ÿ”— https://www.chai4.me/hritikranjan


๐Ÿ‘จโ€๐Ÿ’ป Connect With Me

Hritik Ranjan

๐Ÿ’ก AI Enthusiast โ˜๏ธ DevOps Learner ๐Ÿ” Cybersecurity Advocate ๐Ÿ’ป Software Developer

Connect & Follow

๐Ÿ”— GitHub: https://github.com/hritikranjan1

๐Ÿ”— LinkedIn: https://linkedin.com/in/hritikranjan1


๐Ÿ“ข Found This Article Helpful?

If this article added value to your learning journey:

โœ… Share it with your network
|โœ… Bookmark it for future reference
โœ… Follow for more DevOps, AI, Cloud, Cybersecurity, and Software Engineering content

Thank you for reading and being part of this learning journey.

Keep Learning. Keep Building. Keep Growing. ๐Ÿš€

DevOps Learning Journey ๐Ÿš€

Part 14 of 14

Documenting my step-by-step journey of learning DevOps โ€” from basics to advanced concepts. In this series, Iโ€™ll share weekly notes, hands-on practice, tools, and real-world insights as I grow in DevOps.

Start from the beginning

DevOps Week 1: My Journey Begins ๐Ÿš€

From Basics to Hands-on Learning โ€” What I Explored in My First Week of DevOps