IP Address
An IP (Internet Protocol) address is a device's unique address on a network. What your home address does for mail, an IP address does for packets: it describes the destination.
01What is IPv4?
The most common format in use: 192.168.1.1
- 32-bit address (4 octets × 8 bits)
- Each octet ranges 0–255
- Roughly 4.3 billion unique addresses in total
- In service since 1981
The two faces of an address
code
192.168.1.42
└─ network part ─┘└ host ┘
Network part → which network? (the neighborhood)
Host part → which device on it? (the door number)
Where exactly the boundary sits is decided by the subnet mask — we'll dig into that split in Level 5.
02What is IPv6?
The next-generation IP protocol: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
- 128-bit address (8 groups × 16 bits)
- Each group is 4 hexadecimal characters (0-9, a-f)
- 340 undecillion addresses in total (340 × 10³⁶)
- Defined in 1998, steadily gaining ground
IPv6 shortening rules
code
Full: 2001:0db8:0000:0000:0000:0000:0000:0001
Short: 2001:db8::1
- Leading zeros are dropped (0db8 → db8)
- Consecutive zero groups collapse to :: (only once)
03Why move from IPv4 to IPv6?
IPv4's problem: address exhaustion
| Year | Status |
|---|---|
| 1981 | IPv4 designed; 4.3 billion addresses seemed plenty |
| 2011 | IANA handed out its last IPv4 block |
| 2019 | Europe (RIPE) ran out of IPv4 addresses |
| Today | Kept afloat by NAT and the IPv6 transition |
IPv6's advantages
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address count | 4.3 billion | 340 undecillion |
| Address length | 32 bits | 128 bits |
| NAT required | Yes (unavoidable) | No |
| Auto-configuration | Needs DHCP | Built-in via SLAAC |
| Security | Optional IPsec | Native IPsec |
| Header size | Variable | Fixed (faster to process) |
04Private vs public IP
| Type | IPv4 examples | Use |
|---|---|---|
| Private | 10.x.x.x, 172.16-31.x.x, 192.168.x.x | Home/office internal, never routed on the internet |
| Public | 8.8.8.8, 1.1.1.1 | Unique across the internet |
| Loopback | 127.0.0.1 (localhost) | The device talking to itself |
05How do you find your IP?
| Operating system | Command |
|---|---|
| Windows | ipconfig |
| Mac/Linux | ip addr or ifconfig |
| Public IP | curl ifconfig.me |
06Summary
- IPv4: everywhere, but exhausted (32-bit)
- IPv6: the future; practically unlimited address space (128-bit)
- Both run side by side today (Dual Stack); the transition continues
- Address = network part + host part; the subnet mask draws the line