IP stands for Internet Protocol. It’s the part of TCP/IP that handles addressing and routing. IP ensures that data packets find their way from the source device to the correct destination across different networks.
-
Addressing
- Every device on a network has a unique IP address (like a postal address) to identify it.
- IP ensures that packets are sent to the correct destination using these addresses.
-
Routing
- IP decides the best path for data to travel through multiple networks (via routers).
-
Packetization
- IP breaks data into small pieces called packets, which travel independently and may take different routes.
-
Reassembly
- At the destination, IP reassembles the packets into the original data.
How IP Works
- Packet Creation
- The transport layer hands over segments to IP.
- IP adds a header to create a packet, which includes:
- Source IP address (where it’s coming from).
- Destination IP address (where it’s going).
- Other details like time-to-live (TTL), which prevents packets from looping forever.
- Routing the Packet
- Routers examine the destination IP address and decide the best path to forward the packet.
- The packet may pass through multiple routers before reaching the destination.
- Delivery
- Once the packet arrives at the destination, the receiving device processes it and sends it up the stack for further handling.
Types of IP Addresses
- IPv4 (Internet Protocol version 4)
- Most common; uses 32 bits for addresses (e.g.,
192.168.1.1
).
- Supports around 4.3 billion unique addresses.
- IPv6 (Internet Protocol version 6)
- Newer version; uses 128 bits (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334
).
- Can support trillions of unique devices.
IPv4: