π Internet Protocol (IP)
The Internet Protocol (IP) is a key protocol in the network layer responsible for addressing and routing data packets between devices across interconnected networks. There are two major versions of IP in use today: IPv4 and IPv6.
1. IPv4 (Internet Protocol version 4)
IPv4 uses 32-bit addresses, providing a total of approximately 4.3 billion unique addresses.
IPv4 Address Format: IPv4 addresses are written in dotted decimal notation, consisting of four 8-bit octets (e.g.,
192.168.1.1
).Example:
192.168.1.1
is the IPv4 address of a local device.Limitations: The major limitation of IPv4 is the address exhaustion due to the large number of devices being added to the internet.
2. IPv6 (Internet Protocol version 6)
IPv6 uses 128-bit addresses, providing an almost infinite number of unique IP addresses (about (3.4 \times 10^{38})).
IPv6 Address Format: IPv6 addresses are written in hexadecimal notation and are divided into eight 16-bit segments (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334
).Example:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
is a sample IPv6 address.Benefits: IPv6 solves the address scarcity problem of IPv4 and includes features like auto-configuration, simplified header format, and improved security.
π§ Key Features of IP
- Addressing: The IP address identifies a device within a network. It allows the IP protocol to route packets from the source to the destination.
- Routing: IP ensures that data packets are forwarded correctly across interconnected networks to reach the correct destination.
- Fragmentation: IP supports fragmentation of data packets, breaking large packets into smaller pieces to fit the transmission limits of the network.
- Unreliable Protocol: IP itself does not guarantee delivery, error correction, or packet sequencing. These features are provided by higher layers such as TCP (Transmission Control Protocol).
π Key IP Addressing Techniques
Classful Addressing: The traditional method of dividing IP address space into classes: A, B, C, D, and E.
- Class A:
0.0.0.0
to127.255.255.255
(Large networks) - Class B:
128.0.0.0
to191.255.255.255
(Medium-sized networks) - Class C:
192.0.0.0
to223.255.255.255
(Small networks) - Class D:
224.0.0.0
to239.255.255.255
(Multicast) - Class E:
240.0.0.0
to255.255.255.255
(Reserved for future use)
- Class A:
Classless Addressing (CIDR): CIDR (Classless Inter-Domain Routing) allows more flexible and efficient use of IP addresses by removing the restrictions of class-based addressing.
- CIDR Notation: IP addresses are specified with a slash notation (
IP Address/Prefix Length
), such as192.168.1.0/24
.
- CIDR Notation: IP addresses are specified with a slash notation (
Subnetting: Subnetting divides an IP network into smaller subnetworks, allowing more efficient use of IP addresses within an organization.
- Subnet Mask: A 32-bit mask used to define which portion of the IP address refers to the network and which part refers to the host.
Supernetting: Combines several smaller networks into a larger one. It’s essentially the reverse of subnetting and reduces routing table size.
π§ Deep Insights
- IPv6 Adoption: While IPv6 offers many advantages over IPv4, its adoption has been slow due to compatibility issues and the cost of transitioning.
- IP in Real-World Networks: In large enterprise networks, NAT (Network Address Translation) is commonly used alongside IPv4 to conserve addresses, while IPv6 is gradually being adopted.
- Addressing vs Routing: IP addressing defines how devices are identified, while routing is the mechanism by which data travels from one device to another across networks.
π§ Key Takeaways
- IPv4 and IPv6 are the two main versions of the Internet Protocol, with IPv6 addressing the limitations of IPv4.
- IP Addressing involves techniques like classful addressing, classless addressing (CIDR), subnetting, and supernetting.
- The network layer relies on IP for addressing, routing, and packet forwarding, though higher layers (like TCP) handle reliability.
π Links
- Previous: Network Address Translation (NAT)
- Next: IP Addressing Techniques