While the IP protocol handles the core routing of packets, it cannot function entirely on its own. It relies heavily on several auxiliary protocols and mechanisms to resolve physical addresses, report errors, and conserve the global address space.
If Computer A wants to send an IP packet to Computer B on the same local network, knowing Computer B's IP address (192.168.1.10) is not enough. To actually send electrical signals over the Ethernet cable, Computer A needs Computer B's physical MAC Address.
ARP bridges the gap between Layer 3 (IP Addresses) and Layer 2 (MAC Addresses).
192.168.1.10.IP is a "best-effort" protocol; it provides no error reporting. If a router drops a packet because a link is down or the Time-To-Live (TTL) expired, it needs a way to tell the original sender what went wrong.
ICMP is used by routers and hosts to communicate network-level error messages and operational information. It runs directly on top of IP.
ping google.com in your terminal, your computer sends an ICMP Echo Request. Google's server replies with an ICMP Echo Reply. This measures the round-trip latency.In the late 1990s, the world realized it was going to run out of the 4.3 billion available IPv4 addresses very quickly. NAT was invented as a temporary band-aid to save IPv4, and it became so successful that it is now standard in every home router.
NAT allows an entire private network of devices (laptops, phones, smart TVs) to share a single public IP address when communicating with the global Internet.
192.168.1.x). These addresses are strictly banned from the public Internet.192.168.1.50) sends a web request to Google, the packet hits your home router.192.168.1.50, and forwards it to your laptop. Google is completely unaware that your laptop exists; it only ever sees the router.