1. IP Addressing: IPv4, Subnets, Public and Private IPs
1.1 What Is an IP Address?
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
Khup students IP address la "computer chi permanent identity" samajtat aani mhantat "ha IP mhanje ha manus". Chuk aahe – ek IP anek devices share karu shaktat (NAT), aani ek device che IP badlu shaktat (DHCP). Log madhe IP disla tar "ya IP varun request aali" asa bola, "ha attacker aahe" asa laghech nako.
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.