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. ๐

๐ 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.
Data Link Layer
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. ๐





