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

Asim KhotAsim Khot
6 min read

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:

  1. Accessing a web app using HTTP/HTTPS.

  2. Pulling code from GitHub via SSH.

  3. 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:

  1. TLS encryption for secure HTTPS communication.

  2. 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:

  1. Using API session tokens to maintain authenticated sessions.

  2. 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:

  1. TCP ensures your software package fully arrives during deployment.

  2. 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:

  1. Public/private IPs for cloud servers (like EC2).

  2. Routing tables in Kubernetes or Docker networking.

  3. VPC subnets in AWS.

Protocols: IP (IPv4/IPv6), ICMP (used in ping), routing protocols

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:

  1. MAC address filtering in virtual machines or Docker bridge networking.

  2. 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:

  1. Not usually handled directly, but relevant when:

  2. Setting up a self-hosted Kubernetes cluster

  3. Data center servers or on-prem hardware management

Examples: Cables, switches, routers, Wi-Fi, fiber optics

LayerNameReal-World Example
7ApplicationHTTP/HTTPS – Used when accessing websites or APIs during deployments
6PresentationSSL/TLS – Encrypts data in transit (e.g., HTTPS in a CI/CD pipeline)
5SessionAPI Session Tokens – Maintains session between client & server in a web app
4TransportTCP – Ensures complete delivery of configuration files over SSH or Git
3NetworkIP Addressing – Routing packets to/from EC2 instances or Docker containers
2Data LinkMAC Address / Ethernet – Used in virtual machine networks (e.g., VirtualBox, AWS VPC)
1PhysicalCables, 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

LayerProtocolsFunctionDevOps Example
4ApplicationInterfaces with user apps (HTTP, SSH, DNS)curl, Git, SSH, APIs, Jenkins Webhook
3TransportReliable/unreliable delivery (TCP, UDP)TCP for secure deployments
2InternetRouting packets using IPAWS EC2 Public IP, VPC, Docker subnet
1Network Access / Link / PhysicalHardware, MAC address, Ethernet, Wi-FiDocker 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:

  1. MAC address allocation in Docker containers or VM interfaces.

  2. 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:

  1. Configuring EC2 Public and Private IPs

  2. .Docker bridge network assigning internal IPs to containers.

  3. 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:
  1. TCP: Used by SSH (to log into servers), Git, HTTPS.

  2. 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:

  1. curl uses HTTP to request APIs.

  2. SSH to access remote servers.

  3. Jenkins or GitHub webhooks send and receive HTTP POST requests.

Comparison: OSI vs TCP/IP

OSI LayerTCP/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!

2
Subscribe to my newsletter

Read articles from Asim Khot directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Asim Khot
Asim Khot