IP Addressing·Lesson 2 of 10
IPv4
What IPv4 Is
(Internet Protocol version 4) is the original and still most widely used way of writing IP addresses. An IPv4 address is a 32-bit number — meaning it's built from 32 binary digits (0s and 1s). Because a raw string of 32 ones and zeros is painful for humans to read, we write it in a friendlier form called : four numbers separated by dots, like 192.168.1.10.
32 bits, four octets
Those 32 bits are split into four groups of 8 bits. Each 8-bit group is called an octet, and each octet becomes one of the four numbers you see between the dots.
Four boxes, each holding 0 to 255
Picture an IPv4 address as four small boxes with dots between them. Each box can hold any whole number from 0 to 255. Why 255? Because each box is 8 binary digits, and 8 digits can count 256 different values (0 through 255). So 192.168.1.10 is just four boxes filled with 192, 168, 1, and 10.
From Bits to the Numbers You See
Each octet is 8 (binary digits). Eight bits can represent 2 to the power of 8 = 256 combinations, which is the range 0 to 255. So every number in an IPv4 address must fall between 0 and 255 — something like 300 is simply not a valid octet. Under the hood, the octet 192 is really the binary 11000000; we just show it in decimal to keep things readable.
Here's how one example address lines up, octet by octet, in both the decimal you read and the binary the computer stores:
| Octet | Decimal | Binary (8 bits) |
|---|---|---|
| 1st | 192 | 11000000 |
| 2nd | 168 | 10101000 |
| 3rd | 1 | 00000001 |
| 4th | 10 | 00001010 |
How Many Addresses Is That?
With 32 bits, the total number of possible IPv4 addresses is 2 to the power of 32, which is about 4.3 billion (4,294,967,296 to be exact). That felt like plenty in the early days of the internet — but with billions of phones, computers, and smart devices online, we have effectively run out. That shortage is the reason technologies like , , and the newer IPv6 exist.
Network Part and Host Part
An IPv4 address isn't one indivisible number — it splits into a network part (which network the device is on) and a host part (which device on that network). A companion number, the , decides exactly where that split falls. For example, with the common mask that reserves the first three octets for the network, in 192.168.1.10 the 192.168.1 part identifies the network and the .10 identifies the specific device on it.
A Few Special Addresses
Not every IPv4 address is handed out to a normal device — a handful are reserved for special jobs. Knowing these three saves a lot of confusion later:
Reserved addresses worth knowing
- 127.0.0.1 — the loopback address, which always means 'this same device' (used to test networking locally)
- The network address (host part all zeros, e.g. 192.168.1.0) — names the network itself, not a device
- The broadcast address (host part all ones, e.g. 192.168.1.255) — sends to every device on that network at once
“"Each of the four numbers in an IPv4 address can go up to 999."”
Q:How many bits is an IPv4 address, and how many addresses does that allow?
A: An IPv4 address is 32 bits, split into four 8-bit octets shown as decimal numbers 0-255. That gives 2 to the power of 32, or about 4.3 billion, total addresses — which is why IPv4 addresses have effectively run out.
Quick Revision Cheat Sheet
IPv4 size: 32 bits = four 8-bit octets
Notation: Dotted decimal, e.g. 192.168.1.10
Octet range: 0 to 255 (8 bits = 256 values)
Total addresses: 2^32 ≈ 4.3 billion
Loopback: 127.0.0.1 means 'this device'
Structure: Network part + host part (set by the subnet mask)