Chapter 1: Networking Fundamentals
Interview Questions
These networking questions definitely come up in AWS interviews. Don't learn the replies by heart – remember the Amul-style dairy example and say it in your own words.
नेटवर्किंगचे हे प्रश्न AWS इंटरव्ह्यूमध्ये नक्की येतात. उत्तरं पाठांतर करू नका – the Amul-style dairy चं उदाहरण आठवून स्वतःच्या शब्दांत सांगा.
नेटवर्किंग के ये सवाल AWS इंटरव्यू में ज़रूर आते हैं. जवाब रटो मत – the Amul-style dairy का उदाहरण याद करके अपने शब्दों में बताओ.
- Q1. What is the difference between a public and a private IP address?
- A public IP is globally unique and routable on the internet. A private IP (RFC 1918: 10/8, 172.16/12, 192.168/16) is used inside local networks/VPCs and is not routable on the internet; it reaches the internet through NAT.
- Q2. How many usable hosts are there in a /26 subnet? And in an AWS /26 subnet?
- 2^(32−26) = 64 addresses; 62 usable traditionally (minus network and broadcast). AWS reserves 5, so 59 usable.
- Q3. What is CIDR and why was it introduced?
- Classless Inter-Domain Routing writes a prefix length (/n) instead of fixed classes, allowing networks of any size and reducing address wastage and routing-table size.
- Q4. Why do we need IPv6?
- IPv4 has only ~4.3 billion addresses and is exhausted. IPv6 has 2^128 addresses, removes the need for NAT, and supports auto-configuration. On AWS, public IPv4 is also charged, while IPv6 is not.
- Q5. What is the difference between an Elastic IP and an auto-assigned public IP on EC2?
- The auto-assigned public IP is released when the instance stops and a new one is given on start. An Elastic IP is a static public IPv4 owned by your account until you release it and can be re-mapped between instances.
- Q6. What is NAT? Where is it used in AWS?
- NAT translates private source addresses to a public address (and back for replies). AWS uses 1:1 NAT at the Internet Gateway for public/Elastic IPs and many-to-one NAT in a NAT Gateway for private subnets.
- Q7. Which ports are used by SSH, HTTP, HTTPS, MySQL and MongoDB?
- 22, 80, 443, 3306 and 27017 respectively.
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.