Skip to main content

Command Palette

Search for a command to run...

🌐 DevOps Networking Basics

Updated
β€’6 min readβ€’View as Markdown
🌐 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

PortProtocolUse Case
22SSHSecure shell for remote access
80HTTPServing websites (insecure)
443HTTPSSecure websites
3306MySQLDatabase communication
5432PostgreSQLPostgreSQL DB
6379RedisIn-memory key-value store
8080HTTP-AltAlternate HTTP (e.g., dev apps)
5000CustomOften used for local APIs
3000CustomOften used for front-end apps
27017MongoDBMongoDB 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 NameResponsibility
1️⃣Physical LayerTransmits raw bits over physical medium (cables, signals)
2️⃣Data Link LayerEnsures reliable transmission using MAC addresses & switches
3️⃣Network LayerRoutes packets across networks (IP addresses, routers)
4️⃣Transport LayerHandles end-to-end communication (TCP/UDP, port numbers)
5️⃣Session LayerManages sessions between applications (open, maintain, close)
6️⃣Presentation LayerTranslates, encrypts, compresses data (e.g. SSL, TLS, encoding)
7️⃣Application LayerClosest to user – HTTP, FTP, DNS, SMTP, etc.

🌐 TCP/IP Model – 4 Layers

Layer No.Layer NameResponsibility
1️⃣Network Interface LayerCombines Physical + Data Link layers (NICs, MAC, switches)
2️⃣Internet LayerHandles routing & addressing (IP, ICMP, ARP)
3️⃣Transport LayerEnsures reliable delivery (TCP/UDP, flow control)
4️⃣Application LayerMerges 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/26

  • 192.168.1.64/26

  • 192.168.1.128/26

  • 192.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