๐ Short Intro (Why Iโm Writing This)
Iโm currently learning Networking for DevOps and decided to learn in public by documenting my journey.
This blog is part of my Networking 101 series, where Iโm learning Networking for DevOps step by step from scratch.
This series is not written by an expert โ itโs a beginner learning out loud, sharing:
- what I understand,
- what confuses me,
- and what I learn along the way.
The goal is to build consistency, clarity, and invite discussion.
๐ What This Blog Covers
In this post, Iโll cover:
- Why DevOps engineers should care about networking
- The core networking mental model
- DNS, IP addresses, and ports
- TCP vs UDP
- ICMP vs TCP vs HTTP
- A practical debugging flow
- Hands-on commands to make networking real
๐ GitHub Repository
All my notes, diagrams, and learning resources for this series live here:
๐ GitHub Repo:
https://github.com/dmz-v-x/networking-for-devops-101
This repo is updated as I continue learning.
๐ Learning Notes
1. Why should DevOps engineers even care about networking?
Letโs start from basics.
Most DevOps failures are not code bugs.
They look like this:
- โ โThe app works locally but not in productionโ
- โ โThe service is running but not reachableโ
- โ โ502 Bad Gatewayโ
- โ โConnection refusedโ
- โ โRequest timed outโ
All of these comes down to one problem that is networking problems.
If you donโt understand networking:
- You wonโt know where the problem is
- Youโll randomly try fixes
- Youโll depend on someone else to debug
This blog series exists to change that โ from zero.
2. Goal of this series
By the end of this series, you should be able to:
- Understand how traffic flows from browser โ cloud โ server
- Debug basic production networking issues
- Understand Docker & Kubernetes networking at a high level
- Read cloud architecture diagrams without fear
- And hopefully, you and I both can confidently answer networking interview questions
3. The ONE mental model we must remember
Everything in networking can be explained using three boxes:
Client (Browser / App)
โ
Network
(DNS, Internet, Load Balancer)
โ
Server (VM / Container / App)
Rule:
When something breaks, the problem is always in one of these boxes or the connection between them.
Weโll keep coming back to this model in every blog.
4. DNS โ turning names into addresses
When you type any url into our browser:
For Example:
https://google.com
Your computer does not understand google.com.
Computers only understand numbers (IP addresses).
๐ DNS exists to solve this problem.
DNS = Name โ IP address
Means resolving Name(address/url) to IP Address.
Example:
google.com โ 93.184.216.34
Think of DNS like a phone book:
- You search by name
- You get a number
If DNS breaks, nothing works โ even if your server is perfectly fine.
5. IP addresses & Ports โ where and what to connect to
5.1 IP Address
An IP address identifies a machine on a network.
Examples:
-
192.168.1.10(private IP) -
13.234.56.78(public IP)
Public IP โ reachable from the internet
Private IP โ only reachable inside a private network (like cloud VPCs - Virtual Private Cloud)
5.2 Port - Which application?
A port identifies which application on that machine we want to talk to.
Okay, so when we connect to an application, we are actually connecting to an IP address where that application is running.
However, this does not mean that only one application can run on a single IP address. In reality, mulitple application can run on the same IP address, and they are distinguished from each other using different port numbers.
Example: Let say we have a server that has an IP:
192.168.1.10
Now on this same IP, we might have:
Web app running on port 80
Backend API running on port 3000
Database running on port 5432
So:
192.168.1.10:80 โ Web application
192.168.1.10:3000 โ Backend service
192.168.1.10:5432 โ Database
Common Ports:
-
22โ SSH -
80โ HTTP -
443โ HTTPS -
5432โ PostgreSQL
IP = which computer
Port = which app on that computer
6. TCP vs UDP โ how data is sent
This is about rules of communication.
6.1 TCP (most important for DevOps)
- Reliable
- Ordered
- Connection-based
Used by:
- HTTP / HTTPS
- SSH
- Databases
Think of TCP like a phone call:
- You connect
- You talk
- You hang up
6.2 UDP (less common, but important)
- Fast
- No guarantee of delivery
- No connection
Used by:
- DNS (often)
- Streaming
- Some internal systems
Think of UDP like shouting messages โ fast, but no confirmation.
7. DNS Resolution โ Whatโs Really Happening?
Computers cannot understand domain names.
Computers only understand IP addresses like:
93.184.216.34
So when we type a domain like google.com, it must be converted into an IP address first.
๐ Finding the IP address of a domain name is called DNS resolution.
If DNS fails โ nothing else matters.
8. What Happens Before ping?
Before anything else, we always ask:
What is the IP address of
google.com?
Internally, this happens:
google.com โ DNS โ 93.184.216.34
So if DNS fails, everything fails.
9. What ping Actually Does
Once the IP is known, we use ping.
Ping sends a special network message called an ICMP Echo Request.
Itโs like asking the server:
โHey server, are you alive?โ
If the server is reachable and allows ping, it replies with an ICMP Echo Reply.
Your terminal prints something like:
64 bytes from 93.184.216.34: time=12ms
This means:
- The server is reachable
- The network path works
- The round-trip time is 12 milliseconds
By default, ping keeps sending packets every second:
ping โ reply
ping โ reply
ping โ reply
Until you stop it with:
Ctrl + C
10. What ping Verifies vs What It Does NOT
What ping verifies:
- The IP is reachable over the network
- Basic connectivity exists
What ping does NOT verify:
- Application is running
- Website is working
- Port is open
- Server is healthy
A server can reply to ping and still have a down website.
11. Why ping Sometimes Fails but Website Works
Sometimes this happens:
-
ping google.comโ โ fails -
curl https://google.comโ โ works
This does not mean the site is down.
Many servers block ICMP (ping) for security reasons.
12. Does ping Do DNS Resolution?
Yes, ping does DNS resolution โ but only when we give it a domain name.
Example:
ping google.com
Internally:
- ping sees the domain
- It asks DNS to resolve it
- DNS responds with:
google.com โ 93.184.216.34
- ping sends ICMP packets to that IP
๐ Point to remember:
Ping does DNS only as a prerequisite, not as its main job.
If you provide an IP directly, DNS is skipped completely.
13. Why We Still Need dig & nslookup
Question:
If ping does DNS resolution, why do we need dig and nslookup?
Answer:
Ping does DNS just enough to proceed.
dig and nslookup exist to inspect and debug DNS itself.
14 ping vs dig / nslookup
| Aspect | ping |
dig / nslookup |
|---|---|---|
| Primary question answered | After resolving the name, can I reach the IP? | Is DNS working correctly? |
| Main purpose | Network reachability | DNS resolution & configuration |
| Uses DNS? | Yes (minimal) | Yes (main focus) |
| Shows DNS server | โ No | โ Yes |
| Shows DNS response time | โ No | โ Yes |
| Shows record types | โ No | โ Yes |
| Shows multiple IPs | โ No | โ Yes |
| Shows TTL | โ No | โ Yes |
| Affected if ICMP is blocked | โ Yes | โ No |
15. ping Domain vs ping IP
CASE A: ping google.com
- Domain name is provided
- DNS lookup happens:
google.com โ 93.184.216.34
- Ping sends packets to the IP
- DNS involved only once
CASE B: ping 93.184.216.34
- IP address is provided
- DNS is skipped completely
- Ping sends packets directly
One-line difference:
| Command | DNS involved? | What is pinged |
|---|---|---|
ping domain |
โ Yes | Application server IP |
ping IP |
โ No | Application server IP |
16. Why Cloud Servers Block ping
Ping uses ICMP, which is a low-level network check.
Security reasons:
- Attackers can find live servers
- Infrastructure mapping becomes easy
- Can lead to DDoS scanning
Users donโt use ICMP.
Users use HTTP, HTTPS, APIs, TCP connections.
So blocking ping does not affect real users.
Common real-world situation:
ping myserver.com โ fails
curl https://myserver.com โ works
This means:
- Server is running
- Application is working
- ICMP is intentionally blocked
17. ICMP vs TCP vs HTTP
ICMP
- Internet Control Message Protocol
- Used only to check reachability
- Answers: Can I reach this server at all?
TCP
- Transmission Control Protocol
- Opens reliable connections
- Talks to applications on ports
HTTP / HTTPS
- Application-level protocols
- Built on top of TCP
- Used by real users
Comparison
| Thing | ICMP (Ping) | TCP / HTTP |
|---|---|---|
| Purpose | Reachability | Real communication |
| Uses ports? | โ No | โ Yes |
| Talks to app? | โ No | โ Yes |
| Blocked often? | โ Yes | โ Rarely |
| Used by users? | โ No | โ Yes |
18. Check DNS Resolution
dig google.com +short
- We ask the
digtool: โHey DNS, what is the IP address of google.com?โ - DNS replies with an IP like:
74.125.68.101 -
+shortmeans: show only the final IP
Alternative: nslookup
nslookup google.com
nslookup (Name Server Lookup) does the same job as dig but also shows:
- The DNS server used
- The response details
Example output:
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: google.com
Address: 93.184.216.34
19. Check Basic Connectivity
ping google.com
OR
ping 93.184.216.34
If ping fails:
- Network issue
- Firewall issue
- Host down
20. Check If a Port Is Open (nc)
nc -vz google.com 443
What is nc (Netcat)?
- Networking testing tool
- Opens TCP connections
- Tests if a port is reachable
Flags:
-
-vโ verbose -
-zโ zero-I/O (no data sent)
Internal steps:
- DNS resolution
- TCP 3-way handshake
- Result printed
If you see:
-
connection refusedโ service or firewall issue -
timeoutโ routing or security group issue
21. Test HTTP Directly (curl)
curl -I https://google.com
-
curl= Client URL -
-I= HEAD request (headers only)
Internal flow:
- DNS resolution
- TCP handshake
- HTTP request
- Response received
22. Real DevOps Debugging Order
1. DNS โ dig
2. Reachable โ ping
3. Port open โ nc
4. App works โ curl
Example:
dig google.com
ping google.com
nc -vz google.com 443
curl https://google.com
โ Key Takeaways
- DevOps problems are often network problems
- Understand DNS before anything else
- Ping checks reachability, not applications
- Use the right tool at the right step
- Debug step by step, never by guessing
๐ฌ Feedback & Discussion
๐ก Iโd love your feedback!
If you notice:
- missing tool categories,
- incorrect assumptions,
- or better learning paths,
please comment below. Iโm here to learn.
โญ Support the Learning Journey
If you found this blog useful:
โญ Consider giving the GitHub repo a star โ
it really motivates me to keep learning and sharing publicly.
๐ฆ Stay Updated (Twitter / X)
I share learning updates, notes, and progress regularly.
๐ Follow me on Twitter/X:
https://x.com/_himanshubhatt1
๐ Whatโs Next
In the next post, Iโll be covering:
๐ How the Internet Actually Works
Iโll also continue updating the GitHub repo as I progress.
Final Thoughts
Networking for DevOps isnโt about memorizing protocols or becoming a networking expert overnight.
Itโs about:
- understanding how traffic actually flows
- knowing where to look when something breaks
- debugging step by step instead of guessing
- building a strong mental model (Client โ Network โ Server)
Most production issues donโt fail because of code โ
they fail because something in the network path breaks.
๐ Learning in public
๐ Repo: https://github.com/dmz-v-x/networking-for-devops-101
๐ฆ Twitter/X: https://x.com/_himanshubhatt1
๐ฌ Feedback welcome โ please comment if anything feels off
โญ Star the repo if you find it useful
Top comments (0)