Chapter 1: Networking Fundamentals
1.2 IP address — what and why
In short: An IP (Internet Protocol) address is a logical number that uniquely identifies a device (host) on a network — like the postal address of a house.
Friends, every device on a network needs an identity – that is its IP address. Just as a postman needs an address to find a house, a packet needs an IP.
मित्रांनो, नेटवर्कमध्ये प्रत्येक डिव्हाइसला एक ओळख लागते – तीच IP ॲड्रेस. घर शोधायला पोस्टमनला पत्ता लागतो, तसाच पॅकेटला IP लागतो.
दोस्तों, नेटवर्क में हर डिवाइस को एक पहचान चाहिए – वही IP ऐड्रेस है. घर ढूँढने के लिए पोस्टमैन को पता चाहिए, वैसे ही पैकेट को IP चाहिए.
An IP (Internet Protocol) address is a logical number that uniquely identifies a device (host) on a network — like the postal address of a house. Routers use it to deliver packets to the correct destination.
- IPv4 example:
192.168.1.10(32 bits) - IPv6 example:
2406:da1a:8e8:e801::10(128 bits)
Analogy
Think of an apartment complex. The IP address is the building address (e.g. Shivaji Nagar, Pune). The port is the flat number inside the building. The postman (router) delivers to the building; the watchman (operating system) sends the letter to the right flat (application). And just like the pin code (e.g. 411005) tells India Post which area a letter belongs to, the network part of an IP address tells routers which network the packet belongs to, while the host part identifies the exact machine.
Lakshat theva — this is only an analogy. The literal mechanism is: every packet carries 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. When the packet reaches the destination host, the OS reads the destination port in the TCP/UDP header and hands the data to the process listening on that port.
Ravindra Bagale's Tip
Many students get confused between an IP address and a MAC address. Remember: the IP is a logical address that can change when the network changes, while the MAC is the hardware address of the network card. A router forwards the packet by looking at the IP – the MAC works only within that local network (Chapter 2).
Ravindra Bagale's Tip – मराठी
बरेच students IP address आणि MAC address मध्ये गोंधळतात. लक्षात ठेवा: IP हा logical पत्ता आहे, जो network बदललं की बदलू शकतो, आणि MAC हा network card चा hardware address आहे. Router IP बघून packet पुढे पाठवतो – MAC फक्त त्या local network मध्येच काम करतो (Chapter 2).
Ravindra Bagale's Tip – हिंदी
बहुत से students IP address और MAC address में कन्फ़्यूज़ होते हैं. याद रखो: IP एक logical पता है, जो network बदलने पर बदल सकता है, और MAC network card का hardware address है. Router IP देखकर packet आगे भेजता है – MAC सिर्फ़ उसी local network में काम करता है (Chapter 2).
Practice task
Tumchya laptop var kiwa EC2 var ip -4 addr show aani hostname -I chalva aani tumcha IP liha. Mag analogy box pramane tya IP cha network part aani host part kontya aahe te andaj karun liha – pudhchya lesson 1.4 madhe subnet mask ne he nakki karu.