Ravindra BagaleCourses & study guides मराठी Track your progress

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.

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).

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.