1. Introduction (ELI5)
👉 Real DevOps me ye command daily use hoti hai: Kyunki deployment ke waqt sabse zyada issue “Connection Refused” ya “Timeout” ka hi aata hai.
2. Core Networking Concepts
A. IP Address & Localhost
Har server ki apni ek identity hoti hai. 127.0.0.1 (Localhost) matlab “Main khud”.
B. Ports (The Doors)
- Port 22: SSH (Server access karne ke liye)
- Port 80/443: HTTP/HTTPS (Website ke liye)
- Port 3306: MySQL Database ke liye
C. DNS (The Phonebook)
Insan “google.com” yaad rakhta hai, par machine “142.250.190.46”. In dono ko map karne wala system DNS hai.
3. The Essential Commands Toolbox 🛠️
Check IP & Interface:
# Pehle ‘ifconfig’ use hota tha, ab modern servers me ‘ip a’ standard hai.
Test Connectivity:
# Check karo server internet se baat kar pa raha hai ya nahi.
Check Open Ports:
# Kaunsa service kaunse port par “Listen” kar raha hai, ye pata lagao.
4. 15 Real-World DevOps Scenarios 🔥
1. API Test with Curl
curl -I https://google.com
HTTP Status code check karne ke liye (200 OK or 404).
2. Debug DNS Issues
nslookup my-api.com
Pata karo Domain sahi IP par point kar raha hai ya nahi.
3. Trace Request Route
traceroute 8.8.8.8
Check karo packet beech mein kahan atak raha hai.
4. Download Tool/Package
wget https://example.com/tool.zip
Direct terminal se file download karne ke liye.
5. Check Port 80 Open?
nc -zv localhost 80
Netcat se connection verify karna.
6. Internal vs External IP
curl ifconfig.me
Server ka Public IP pata karne ki shortcut trick.
7. Debug SSL Issues
openssl s_client -connect google.com:443
Certificate expiry aur chain check karne ke liye.
8. Scan Network Latency
mtr google.com
Ping aur traceroute ka combo, live monitoring.
9. Listen to Network Traffic
tcpdump -i eth0
Real packets ko wire par “súngna” (sniffing).
10. Check Routing Table
ip route show
Packets server se bahar kaise ja rahe hain.
[In the same way, total 15 production-level examples are covered]
🚀 5 Professional DevOps Projects
Scenario: Client kehta hai website nahi khul rahi.
1. ping google.com (Network check).
2. dig google.com (DNS check).
3. ss -tulpn | grep 443 (Port check).
4. Agar port band hai, toh Nginx restart karein.
Scenario: Security audit ke liye open ports list karni hain.
Command: sudo ss -tulpn. Identification: Konse non-standard ports khule hain unhe firewall se block karein.
Scenario: Backend developer ne naya endpoint diya hai.
Command: curl -X POST -H "Content-Type: application/json" -d '{"key":"val"}' https://api.com/v1.
Scenario: Binary download karke path me set karna.
1. wget URL. 2. chmod +x binary. 3. sudo mv binary /usr/local/bin/.
# simple health check
ping -c 1 8.8.8.8 > /dev/null && echo “Internet: OK” || echo “Internet: DOWN”
nc -zv localhost 80 2>&1 | grep “succeeded” && echo “Web: OK”
Summary: Key Takeaways 🎯
👉 IP a se shuru karo, ss par ports check karo, aur curl se response verify karo.
Agar ye nahi aata to debugging mushkil ho jayegi. Real DevOps engineers networking ko dimaag me map karte hain.
Next Step: Chapter 7 Quiz pass karein aur Certificate earn karein!