“Understanding OSI & TCP/IP Models – DevOps Networking Basics”

Welcome to Day 1 of my #90DaysOfDevOps journey!
Today's focus is on networking, a key aspect every DevOps engineer handles.
In this blog, we’ll break down the OSI and TCP/IP models with real-world examples for DevOps.
________________________________________________________________________________________________________________
What is the OSI Model?
The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven layers
The OSI Model – Layer by Layer (DevOps Edition)
Layer 7: Application Layer
What it does: This is where users and applications interact with the network. It handles high-level protocols like HTTP, SSH, FTP, DNS.
DevOps Example:
Accessing a web app using HTTP/HTTPS.
Pulling code from GitHub via SSH.
Deploying a microservice that talks to another using REST APIs.
Protocols: HTTP, HTTPS, FTP, SSH, DNS, SMTP
Layer 6: Presentation Layer
What it does: This layer prepares data for the Application Layer. It encrypts, compresses, or translates it (like from JSON to binary).
DevOps Example:
TLS encryption for secure HTTPS communication.
Encoding formats like JSON or XML in API requests/responses.
Concepts: SSL/TLS, data serialization (JSON/XML), encryption
Layer 5: Session Layer
What it does: It creates, manages, and terminates sessions between devices. It ensures continuous conversations between two systems.
DevOps Example:
Using API session tokens to maintain authenticated sessions.
Managing SSH sessions during automated deployment.
Concepts: Session tokens, cookies, NetBIOS, RPC
Layer 4: Transport Layer
What it does: This layer transports data reliably using protocols like TCP (guaranteed) or UDP (faster, no guarantee). It handles retransmission and flow control.
DevOps Example:
TCP ensures your software package fully arrives during deployment.
UDP used in fast log streaming or real-time monitoring tools.
Protocols: TCP, UDP
Layer 3: Network Layer
What it does: Routes data between different networks using IP addresses. It breaks data into packets and figures out the best path.
DevOps Example:
Public/private IPs for cloud servers (like EC2).
Routing tables in Kubernetes or Docker networking.
VPC subnets in AWS.
Protocols: IP (IPv4/IPv6), ICMP (used in ping), routing protocols
Layer 2: Data Link Layer
What it does: Transfers data between devices on the same network using MAC addresses. Responsible for detecting/correcting errors from the physical layer.
DevOps Example:
MAC address filtering in virtual machines or Docker bridge networking.
Used internally in AWS VPC communication between instances.
Technologies: Ethernet, Wi-Fi, ARP, MAC addresses
Layer 1: Physical Layer
What it does: This is the actual hardware connection — cables, switches, radio signals. It moves bits (0s and 1s) across the network.
DevOps Example:
Not usually handled directly, but relevant when:
Setting up a self-hosted Kubernetes cluster
Data center servers or on-prem hardware management
Examples: Cables, switches, routers, Wi-Fi, fiber optics
Layer | Name | Real-World Example |
7 | Application | HTTP/HTTPS – Used when accessing websites or APIs during deployments |
6 | Presentation | SSL/TLS – Encrypts data in transit (e.g., HTTPS in a CI/CD pipeline) |
5 | Session | API Session Tokens – Maintains session between client & server in a web app |
4 | Transport | TCP – Ensures complete delivery of configuration files over SSH or Git |
3 | Network | IP Addressing – Routing packets to/from EC2 instances or Docker containers |
2 | Data Link | MAC Address / Ethernet – Used in virtual machine networks (e.g., VirtualBox, AWS VPC) |
1 | Physical | Cables, Wi-Fi – Underlying physical connectivity for server access or local dev |
What is the TCP/IP Model?
The TCP/IP Model (also called the Internet Protocol Suite) is a 4-layer networking model that describes how data is transmitted over the internet. It’s the foundation of modern networking — everything from deploying a server to calling an API uses TCP/IP under the hood.
While OSI is a conceptual model, TCP/IP is the working model used in real DevOps, cloud, and internet communications.
TCP/IP Model – 4 Layers
Layer | Protocols | Function | DevOps Example |
4 | Application | Interfaces with user apps (HTTP, SSH, DNS) | curl, Git, SSH, APIs, Jenkins Webhook |
3 | Transport | Reliable/unreliable delivery (TCP, UDP) | TCP for secure deployments |
2 | Internet | Routing packets using IP | AWS EC2 Public IP, VPC, Docker subnet |
1 | Network Access / Link / Physical | Hardware, MAC address, Ethernet, Wi-Fi | Docker bridge networking, MAC filtering |
Layer-by-Layer Explanation with DevOps Context
Layer 1: Network Access Layer (Also called: Link Layer or Physical Layer)
What it does:
Handles data delivery between devices on the same network. Works with MAC addresses and hardware protocols (Ethernet, Wi-Fi).
DevOps Example:
MAC address allocation in Docker containers or VM interfaces.
AWS internal traffic between instances in the same subnet.
Layer 2: Internet Layer
What it does:
Routes data between networks. Assigns and uses IP addresses to move data.
Protocols: IP, ICMP
DevOps Example:
Configuring EC2 Public and Private IPs
.Docker bridge network assigning internal IPs to containers.
VPC route tables in AWS to direct traffic.
Layer 3: Transport Layer
What it does:
Provides reliable (TCP) or faster (UDP) delivery of data. Ensures that data arrives correctly, in order, or quickly.
Protocols: TCP, UDP
- DevOps Example:
TCP: Used by SSH (to log into servers), Git, HTTPS.
UDP: Used by logging/monitoring tools that stream real-time data (faster, less reliable).
Layer 4: Application Layer
What it does:
Interfaces directly with user apps and DevOps tools. Defines what protocols are used by applications to talk over the internet.
Protocols: HTTP, HTTPS, SSH, DNS, FTP, SMTP
DevOps Example:
curl uses HTTP to request APIs.
SSH to access remote servers.
Jenkins or GitHub webhooks send and receive HTTP POST requests.
Comparison: OSI vs TCP/IP
OSI Layer | TCP/IP Equivalent |
Application (7) | Application (4) |
Presentation (6) | Application (4) |
Session (5) | Application (4) |
Transport (4) | Transport (3) |
Network (3) | Internet (2) |
Data Link (2) | Network Access (1) |
Physical (1) | Network Access (1) |
Understanding the OSI and TCP/IP models is more than just theory — it’s the blueprint behind how every command you run, every server you deploy, and every API you call actually works.
As a DevOps engineer in training, I now see networking not as a black box, but as a layered system of responsibility — from user interaction at the top (Layer 7) down to the physical cables (Layer 1).
The deeper you understand the layers, the better you become at designing, deploying, and debugging real-world systems.
This marks the end of Day 1 of my #90DaysOfDevOps journey — and the beginning of a much clearer understanding of what powers the tools we use daily.
Tomorrow, we dive into protocols and ports — stay tuned!
Subscribe to my newsletter
Read articles from Asim Khot directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
