1. IP Addressing: IPv4, Subnets, Public and Private IPs
1.1 What Is an IP Address?
In short: An IP (Internet Protocol) address is a logical number that identifies a device (host) on a network.
Mitrano, IP address mhanje network var pratyek device cha "postal address". Tumcha mobile, laptop, EC2 server, router – sagalyanna ek IP asto. Router tya address kade baghun packet pudhe pathavto.
An IP (Internet Protocol) address is a logical number that identifies a device (host) on a network. Every packet carries a source IP (who sent it) and a destination IP (where it must go).
- IPv4 example:
192.168.1.10(32 bits) – still the most common, and the focus of this chapter - IPv6 example:
2001:db8::10(128 bits) – the newer version with a much larger address space
Analogy – aani khara mechanism
Pune madhe Shivaji Nagar chya ekhadya building cha address mhanje IP address, aani building madhla flat number mhanje port (pudhchya chapter madhe). Postman (router) building paryant pohochavto; watchman (operating system) patra yogya flat madhe (application) deto.
Lakshat theva – he fakt analogy aahe. Khara mechanism asa: every packet has a destination IP in its IP header; each router compares that IP with its routing table (longest matching prefix wins) and forwards the packet to the next hop.
Why this matters for security
Every log line, firewall rule and alert is written in terms of IP addresses. When a SOC analyst says "brute force from 198.51.100.7", the IP is the first clue. Attackers also hide behind other IPs (VPNs, proxies, compromised machines), so an IP identifies a network location, not a person.
Ravindra Bagale's Tip
Many students think an IP address is "a computer's permanent identity" and say "this IP means this person". That's wrong – many devices can share one IP (NAT), and a device's IP can change (DHCP). If you see an IP in a log, say "the request came from this IP", not straight away "this is the attacker".
Ravindra Bagale's Tip – मराठी
बरेच students IP address ला "computer ची कायमची ओळख" समजतात आणि म्हणतात "हा IP म्हणजे हा माणूस". हे चूक आहे – एक IP अनेक devices share करू शकतात (NAT), आणि एका device चा IP बदलू शकतो (DHCP). Log मध्ये IP दिसला तर "या IP वरून request आली" असं म्हणा, लगेच "हा attacker आहे" असं नको.
Ravindra Bagale's Tip – हिंदी
बहुत से students IP address को "computer की स्थायी पहचान" समझते हैं और कहते हैं "यह IP यानी यह इंसान". यह गलत है – एक IP कई devices share कर सकते हैं (NAT), और किसी device का IP बदल सकता है (DHCP). Log में IP दिखे तो कहो "इस IP से request आई", तुरंत "यह attacker है" मत कहो.
Practice task
On your laptop run ipconfig (Windows) or ip addr (Linux/Mac). Note your IPv4 address and write down whether it looks like a home/office (private) address.