Ravindra BagaleCourses & study guides

1. IP Addressing: IPv4, Subnets, Public and Private IPs

1.3 IPv4 Classes (A to E) and Loopback

Classes aata "historical" aahet, pan interview madhe hamkhas vichartat – Deloitte sarkhya companies madhe candidates ni "class C cha subnet mask kay?" ha prashna report kela aahe. Mhanun he table paathh kara.

Class First octet range Leading bits Default mask Networks / Hosts per network Use
A 1 – 126 0 255.0.0.0 (/8) 126 / ~16.7 million Very large networks
B 128 – 191 10 255.255.0.0 (/16) 16,384 / 65,534 Medium networks
C 192 – 223 110 255.255.255.0 (/24) ~2 million / 254 Small networks
D 224 – 239 1110 — — Multicast
E 240 – 255 1111 — — Experimental / reserved

What about 127?

127.0.0.0/8 is reserved for loopback. 127.0.0.1 (also called localhost) always means "this same machine". When an app listens on 127.0.0.1:3000, it is reachable only from the server itself — that is exactly what we want behind a reverse proxy.

Why this matters for security

Recognising special ranges quickly is a daily SOC skill. Traffic from 127.0.0.1 in a web log means the request came from the server itself (for example a reverse proxy) – but it can also be a sign of SSRF, where an attacker tricks the server into calling itself. Services listening only on 127.0.0.1 are not reachable from outside, which is exactly how we will protect MySQL later.

Ravindra Bagale's Tip

Khup students Class A chi range 0–127 mhanun lihitat. Lakshat theva: 0 aani 127 special aahet, usable Class A range 1–126 aahe. Aani 127 mhanje loopback – "hach machine". Interview madhe ha chhota point tumhala vegla dakhavto.

Practice task

Identify the class and default mask of: 10.4.5.6, 172.20.1.1, 200.1.2.3, 230.0.0.5, 127.0.0.1.