While MAC addresses physically identify a specific Network Interface Card on a local LAN, the Network Layer (Layer 3) requires a logical addressing system to route packets across the globe. This is the IP (Internet Protocol) Address.
An IP address is hierarchical, meaning it contains information about both the specific network the device is on, and the specific device itself (much like a zip code and a house number).
IPv4 is the dominant protocol of the Internet. An IPv4 address is a 32-bit binary number. To make it readable for humans, it is divided into four 8-bit bytes (octets) and written in Dotted-Decimal Notation.
192.168.1.5Historically, the IPv4 space was rigidly divided into five classes based on the first few bits of the address:
Note: Classful addressing was incredibly wasteful and was replaced by CIDR (Classless Inter-Domain Routing) in the 1990s.
127.0.0.1. A packet sent to this address never leaves the machine; it loops back directly to the local OS. Used for testing servers locally.255.255.255.255. A packet sent here is delivered to every single device on the local network.10.0.0.0 to 10.255.255.255172.16.0.0 to 172.31.255.255192.168.0.0 to 192.168.255.255In the late 1980s, engineers realized that 4.3 billion IPv4 addresses would not be enough for the explosive growth of the Internet. In 2011, the global registry officially ran out of unassigned IPv4 addresses (IPv4 Exhaustion).
IPv6 was created to solve this. It uses a massive 128-bit address.
Because 128 bits is too long for dotted-decimal, IPv6 is written as eight groups of four hexadecimal digits, separated by colons.
2001:0db8:85a3:0000:0000:8a2e:0370:7334Zero Compression Rules: To make writing IPv6 addresses easier, you can abbreviate them:
0db8 becomes db8).:: (This can only be done once per address).2001:db8:85a3::8a2e:370:7334