Chapter 1: Networking Fundamentals
Practice Questions and Lab Exercises
Come on, practice time! Solve the subnetting questions on pen and paper and do the labs on the terminal – you cannot learn networking just by reading.
चला, आता प्रॅक्टिस! सबनेटिंगचे प्रश्न पेन-कागदावर सोडवा आणि लॅब्स टर्मिनलवर करा – फक्त वाचून नेटवर्किंग येत नाही.
चलो, अब प्रैक्टिस! सबनेटिंग के सवाल पेन-कागज़ पर हल करो और लैब्स टर्मिनल पर करो – सिर्फ़ पढ़कर नेटवर्किंग नहीं आती.
- Differentiate between an IP address and a port with a real-life analogy.
- List the default ports for SSH, HTTP, HTTPS, MySQL, MongoDB and a Flask development server.
- Identify the class and default mask of:
10.4.5.6,172.20.1.1,200.1.2.3,230.0.0.5. - A network
172.16.0.0/22must be split into 8 equal subnets. Find the new prefix, block size and the range of the 3rd subnet. - Shorten
2406:da1a:0000:0000:0e00:0000:0000:0010correctly. Why can::be used only once? - Which of these are private:
10.10.10.10,172.32.1.1,192.168.100.1,100.64.1.1,8.8.8.8? - Lab: On any Linux machine run
ip addr,hostname -Iandcurl -s https://checkip.amazonaws.com. Explain why the two IPs differ (hint: NAT). - Explain the difference between an auto-assigned public IP and an Elastic IP on AWS. What happens to each when you stop the instance?
Quick Revision
- IP = which host; port = which service. Socket = IP:port.
- Must-know ports: 22 SSH, 80 HTTP, 443 HTTPS, 3306 MySQL, 27017 MongoDB, 3000 Node, 5000 Flask, 8080 alt-HTTP.
- IPv4 = 32 bits, 4 octets; classes A/B/C/D/E; CIDR
/n→ 2^(32−n) addresses; AWS reserves 5 per subnet. - IPv6 = 128 bits, 8 hex groups; drop leading zeros;
::only once. - Private (RFC 1918):
10/8,172.16/12,192.168/16. Default VPC =172.31.0.0/16. - NAT lets private hosts share a public IP. AWS: IGW (1:1), NAT Gateway (many:1).
- Auto public IP changes on stop/start; Elastic IP is static.
Got it? IP, port, CIDR, public/private and NAT – once these five words are solid, there is no reason to fear AWS networking. Now let's move on to the OSI model.
समजलं का? IP, पोर्ट, CIDR, पब्लिक/प्रायव्हेट आणि NAT – हे पाच शब्द पक्के झाले की AWS नेटवर्किंगला घाबरायचं कारण नाही. आता पुढे जाऊया OSI मॉडेलकडे.
समझ आया? IP, पोर्ट, CIDR, पब्लिक/प्राइवेट और NAT – ये पाँच शब्द पक्के हो गए तो AWS नेटवर्किंग से डरने की कोई वजह नहीं. अब आगे चलते हैं OSI मॉडल की तरफ़.
Extended teaching notes
Why this lesson matters
Cloud security is mostly IAM, network exposure, logging and secure defaults. The shared responsibility model means the provider patches the metal; you patch what you configure.
- No public databases or public admin panels.
- Roles / OIDC instead of long-lived access keys.
- CloudTrail / Activity Logs / Audit Logs on and retained.
- S3/Blob/GCS: Block Public Access; encrypt; least privilege.
Mini case study
Suppose we are on a purple-team exercise for an Indian mid-size company (sample data). Red notes a technique from this lesson against a lab clone. Blue must show the control that stops it, the log that would have fired, and the ticket that hardens production. That is the standard this course trains you for.
Defender's worksheet (do this today)
- Write the lesson title, date and the exact lab target you are allowed to use.
- List three owned systems (VMs, apps, or cloud accounts) where this lesson applies.
- Run one safe check from the lesson on a lab system only. Paste the command and output.
- Write a two-sentence fix you would give a teammate.
- Name one related public advisory (CERT-In, CISA, NVD, or a vendor bulletin) with its date.
Indian workplace (sample data)
Suppose we are a junior analyst at Infosys, TCS, Wipro or a fintech SOC in Bengaluru/Pune. Turn this lesson into one checklist item with an owner, a due date and a place to store evidence (ticket + screenshot).
Global practice
Compare your notes with OWASP, CIS Benchmarks, NIST CSF/IR guidance or a cloud Well-Architected security question. Write five lines on what overlaps.
Everyday analogy
Explain the risk and the fix to a family member without jargon. If they can repeat the warning, you understand it well enough to teach juniors.
Key terms
- Control: a safeguard (patch, config, process, detection).
- Finding: a weakness backed by evidence.
- Remediation: the fix plus how you verified it.
- Scope: systems you have written permission to touch.
- Least privilege: only the access the task needs.
- Defence in depth: several layers so one failure does not end the story.
Common mistakes
- Skipping written permission "just for a quick scan".
- Practising on hostel, office or public targets without authorisation.
- Collecting tool output without writing the fix.
- Copying attack steps onto production to "verify". Defenders verify with versions, configs and patches.
- Publishing screenshots that contain secrets, cookies or internal hostnames.
Recap
- Evidence, fix, owner, date.
- Own lab only.
- Fix > spectacle.