π DevOps Networking Basics

Networking can feel intimidating at first π° β IPs, ports, protocols... itβs a lot! But if you're diving into DevOps, understanding networking fundamentals is super important for working with cloud, containers, CI/CD, and microservices.
1. What Is a Network?
When two or more computers or devices connect via communication channels (cables or wireless) and share data, it's called a network. The Internet is the largest network, often called "the network of networks."
Why Networking in DevOps?
As a DevOps engineer, youβll deal with:
π³ Containers (Docker)
βοΈ Cloud Platforms (AWS, GCP, Azure)
π Security Groups, Firewalls
π Load Balancers
βοΈ CI/CD Pipelines connecting across networks
To make all this work smoothly, you need to understand how systems talk to each other π£οΈ β thatβs networking!
Key Networking Concepts
IP (Internet Protocol): Assigns unique addresses to devices for communication across networks.
MAC Address (Media Access Control): Hardware-based unique identifier for devices on a local network.
Router: Connects different networks and directs data packets between them.
Switch: Connects multiple devices in a local network and directs traffic using MAC addresses.
Firewall: Monitors and controls network traffic based on security rules.
IP Addressing (IPv4 & IPv6)
An IPv4 address looks like 192.0.2.146, while an IPv6 might resemble 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
Ports and Protocols
A port is like a door on a computer that allows communication with other devices. Each port is assigned a number (from 0 to 65535), and different services use different port numbers.
Protocols: Rules that define the data format and transmission for communication.
Example: HTTP operates on port 80, HTTPS on port 443.
Think of your computer like an apartment building:
The IP address is the building's address.
The port number is the specific apartment number.
Port 80 β Website using HTTP
Port 22 β Remote login using SSH
π¦ Common Ports in DevOps
| Port | Protocol | Use Case |
| 22 | SSH | Secure shell for remote access |
| 80 | HTTP | Serving websites (insecure) |
| 443 | HTTPS | Secure websites |
| 3306 | MySQL | Database communication |
| 5432 | PostgreSQL | PostgreSQL DB |
| 6379 | Redis | In-memory key-value store |
| 8080 | HTTP-Alt | Alternate HTTP (e.g., dev apps) |
| 5000 | Custom | Often used for local APIs |
| 3000 | Custom | Often used for front-end apps |
| 27017 | MongoDB | MongoDB database |
2. Deep Dive β OSI vs. TCP/IP Layer Responsibilities
Understanding how data flows through a network is critical for any DevOps or system engineer. So, we break down the responsibilities of each layer in both models:
π§± OSI Model β 7 Layers
| Layer No. | Layer Name | Responsibility |
| 1οΈβ£ | Physical Layer | Transmits raw bits over physical medium (cables, signals) |
| 2οΈβ£ | Data Link Layer | Ensures reliable transmission using MAC addresses & switches |
| 3οΈβ£ | Network Layer | Routes packets across networks (IP addresses, routers) |
| 4οΈβ£ | Transport Layer | Handles end-to-end communication (TCP/UDP, port numbers) |
| 5οΈβ£ | Session Layer | Manages sessions between applications (open, maintain, close) |
| 6οΈβ£ | Presentation Layer | Translates, encrypts, compresses data (e.g. SSL, TLS, encoding) |
| 7οΈβ£ | Application Layer | Closest to user β HTTP, FTP, DNS, SMTP, etc. |
π TCP/IP Model β 4 Layers
| Layer No. | Layer Name | Responsibility |
| 1οΈβ£ | Network Interface Layer | Combines Physical + Data Link layers (NICs, MAC, switches) |
| 2οΈβ£ | Internet Layer | Handles routing & addressing (IP, ICMP, ARP) |
| 3οΈβ£ | Transport Layer | Ensures reliable delivery (TCP/UDP, flow control) |
| 4οΈβ£ | Application Layer | Merges Application, Session, and Presentation layers |
| Includes protocols like HTTP, FTP, SSH, DNS |
π§ Why It Matters in DevOps?
β
Helps troubleshoot networking issues
β
Understand traffic flow across containers, VMs, and services
β
Better design of secure, scalable systems
β
Critical for configuring firewalls, load balancers, and service meshes
3.What is Subnetting?
Subnetting = Dividing a big network (IP range) into smaller parts (subnets).
π§ Why do we need subnetting?
To organize networks (e.g., frontend, backend, DB all get different subnets)
To save IP addresses (donβt waste unused IPs)
To add security (block access between subnets if needed)
To reduce traffic in each network
π¦ Real Life Analogy:
Imagine an apartment building with 256 rooms (IPs).
Subnetting means: β Grouping rooms by floor (subnet)
β You can then control who can visit which floor.
π Example:
You have this network: 192.168.1.0/24
(That means: 256 IPs β from 192.168.1.0 to 192.168.1.255)
Now you want 4 subnets:
You break it into 4 parts β each gets 64 IPs
Subnets become:
192.168.1.0/26192.168.1.64/26192.168.1.128/26192.168.1.192/26
π§ Quick Notes:
/24= 256 IPs/26= 64 IPs/28= 16 IPs/30= 4 IPs (used for point-to-point links)
π In DevOps:
subnetting is used in AWS VPCs, Kubernetes clusters, Cloud networking, etc.
4.NAT, VPN & Load Balancer β DevOps Networking Essentials
Understanding these core networking concepts is essential for any DevOps engineer working with cloud infrastructure, containers, and secure deployments.
π NAT (Network Address Translation)
NAT (Network Address Translation): Transforms public IP addresses into private (and vice versa) allowing multiple devices to share a single public IP.
β
Allows multiple devices on a private network to share a single public IP
β
Hides internal IPs, improving security
β
Common in:
Cloud VPCs
Home routers
Docker/Container networks
π VPN (Virtual Private Network)
β
Encrypts data between your device and the server
β
Creates a secure βtunnelβ over public networks
β
Essential for:
Remote access to cloud resources
Managing hybrid or multi-cloud environments
Secure internal communication
β Load Balancer
β
Distributes incoming traffic across multiple backend servers
β
Improves:
Reliability
Scalability
Performance
β Types:
Layer 4 (TCP/UDP) β Operates at the Transport Layer
Layer 7 (HTTP/HTTPS) β Operates at the Application Layer (e.g., path-based routing)
β Widely used in:
Kubernetes (Service type: LoadBalancer, Ingress)
AWS ELB/ALB
Azure Load Balancer
NGINX, HAProxy
Thank you for reading this Blog. Hope you learned something new today! If you found this blog helpful, please like, share, and follow me for more blog posts like this in the future.
If you have some suggestions I am happy to learn with you.
#HappyLearning #devops #Networking #IPaddressing #IPv4 #IPv6 #Subnetting #CIDR #PortsProtocols #OSIModel #TCPIP #NetworkTopology #Router #Switch #VLAN #NAT #VPN #LoadBalancer #Firewall #SecurityGroup #DNS #ServiceDiscovery #CloudNetworking #VPC #Subnet #CDN #NetworkAutomation #IaC #InfrastructureAsCode #Ansible #Jenkins #ContainerNetworking #Docker #Kubernetes #Monitoring #Logging #Tracing #NetworkSecurity #Encryption #IDS #IPS #ZeroTrust #Bandwidth #Latency #TrafficShaping #QoS #SDN #SoftwareDefinedNetworking #TechBlog #ITInfrastructure #NetworkOptimization