Day 33: TCP/IP Reference Model & IP Fundamentals


Today, I dove deep into the TCP/IP Reference Model, its working, datagram structure, and how addressing works at the network layer. This knowledge is essential for configuring and troubleshooting real-world DevOps infrastructure!
๐ What is TCP/IP?
TCP/IP stands for Transmission Control Protocol / Internet Protocol. It is a suite of communication protocols used to connect devices across the internet or within private networks (intranet/extranet). It forms the backbone of all modern networking.
๐ฆ TCP/IP vs OSI Model
Layer in OSI | Equivalent in TCP/IP | Protocols |
Application | Application | HTTP, DNS, FTP, SMTP |
Presentation | โฌ๏ธ Merged into Application | TLS, JPEG, MIME |
Session | โฌ๏ธ Merged into Application | RPC, NetBIOS |
Transport | Transport | TCP, UDP |
Network | Internet | IP, ICMP, IGMP |
Data Link | Network Interface | Ethernet, ARP, MAC |
Physical | Network Interface | Cables, Wi-Fi, NICs |
๐งฑ The IP Protocol (Internet Layer)
The Internet Protocol (IP) is responsible for delivering packets from source to destination across multiple networks. These packets are called Datagrams.
๐ฌ IP Datagram Structure
Each IP packet has two parts: Header and Data.
โ Header Fields (Highlights):
Field | Description |
Version | IP version (e.g., 4 for IPv4) |
Header Length | Size of the header (in 4-byte units) |
Service Type | Priority, delay, throughput |
Total Length | Complete datagram length |
Identification | Used in fragmentation |
Flags | Fragmentation control |
Fragment Offset | Position of fragment |
Time to Live (TTL) | Limits packet lifetime (hops) |
Protocol | Upper-layer protocol (e.g., TCP/UDP) |
Header Checksum | Error-checking for header |
Source & Destination IP | 32-bit IPs |
Options | Additional routing/timing controls |
๐๏ธ IP Addressing
Internet uses a logical address (IP address) besides the physical (MAC) address. IPv4 addresses are 32-bit and are categorized into 5 classes:
Class | Start Bits | NetID Bits | HostID Bits | Use Case |
A | 0xxxxxxx | 8 | 24 | Large networks |
B | 10xxxxxx | 16 | 16 | Medium networks |
C | 110xxxxx | 24 | 8 | Small networks |
D | 1110xxxx | - | - | Multicast |
E | 1111xxxx | - | - | Reserved for future |
๐ Key Takeaways
IP is connectionless and best-effort (no guaranteed delivery).
Every device in a network must have a unique IP address.
Datagram headers control routing, fragmentation, TTL, and protocol delivery.
Address classes (A-E) help design networks of different sizes.
๐ฏ Why This Matters in DevOps?
In real-world DevOps, understanding IP and its behavior is crucial for:
Configuring infrastructure as code (IaC)
Setting up network-aware deployments
Working with cloud networking, firewalls, and subnets
Troubleshooting connectivity and routing issues
๐ Coming Up (Day 34):
Essential TCP/IP Protocols Every DevOps Engineer Must Know
Subscribe to my newsletter
Read articles from Shaharyar Shakir directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
