What Is an IP Address? Subnets and CIDR (/24) Made Simple
An IP address is like a street address on the internet, and it is essential knowledge for anyone learning about networks. This guide explains, in beginner-friendly terms with tables, what an IP address is, how IPv4 is structured, the difference between private and global addresses, how to read CIDR notation such as /24 and subnet masks, and the idea behind network and broadcast addresses.
Whenever you connect a PC or smartphone to a network, it is assigned an IP address. Many people have seen notations like "192.168.1.10" or "/24" in their settings. These underpin all network communication, yet their exact meaning is often hazy. This guide walks through everything from "what an IP address is" to the slightly trickier ideas of subnets and CIDR, step by step.
What Is an IP Address?
An IP address (Internet Protocol address) is a number that identifies a device connected to a network. It is often compared to a street address on the internet. Just as a letter needs a destination address, data (packets) need source and destination IP addresses to reach the right party.
The widely used format today is IPv4, written as four numbers separated by periods, such as "192.168.1.1." Each number ranges from 0 to 255. Global addresses are managed so they never overlap, allowing devices worldwide to be uniquely identified. To address IPv4 exhaustion, the far larger IPv6 is also spreading, but this guide focuses on IPv4 as the foundation.
The Structure of an IPv4 Address (32 Bits)
Internally an IPv4 address is a 32-bit number (thirty-two 0s and 1s). To make it readable, it is split into four groups of 8 bits, each converted to decimal. A group of 8 bits is called an octet.
| Notation | 1st | 2nd | 3rd | 4th |
|---|---|---|---|---|
| Decimal | 192 | 168 | 1 | 10 |
| Binary | 11000000 | 10101000 | 00000001 | 00001010 |
Since 8 bits cover the range 0 to 255, each octet maxes out at 255. The key point is that every IP address is divided into a network part and a host part. The network part says "which network it belongs to," and the host part says "which device within that network." By analogy with an address, the network part is the "town name" and the host part is the "house number." What decides where the network part ends is the subnet mask and CIDR described below.
Private vs. Global IP Addresses
IP addresses fall broadly into two kinds: global and private.
- Global IP address: an outward-facing address that is unique across the entire internet. It is assigned by your provider and used for web servers, the outside of a home router, and so on.
- Private IP address: an address used only inside a closed network such as a home or office. It does not communicate directly with the outside; it reaches the internet by being translated into a global IP through the router's NAT mechanism.
The ranges available for private IPs are predefined.
| Range | Example | Typical use |
|---|---|---|
| 10.0.0.0 - 10.255.255.255 | 10.0.0.5 | Large networks |
| 172.16.0.0 - 172.31.255.255 | 172.16.0.1 | Medium networks |
| 192.168.0.0 - 192.168.255.255 | 192.168.1.1 | Home and small |
The "192.168.x" you often see on home Wi-Fi is exactly this kind of private IP. To see which outward-facing global IP is currently assigned to you, the IP Address Checker lets you look it up easily.
What CIDR Notation Means (/24 and More)
To express a network range, you often see notation like "192.168.1.0/24." That trailing /24 is CIDR (Classless Inter-Domain Routing) notation. The number after the slash shows how many of the 32 bits, counting from the front, make up the network part.
For example, /24 means the first 24 bits are the network part and the remaining 8 bits are the host part. With 8 host bits, the network contains 2 to the 8th power, or 256 addresses. The common values are summarized below.
| CIDR | Host bits | Total addresses | Usable hosts |
|---|---|---|---|
| /24 | 8 bits | 256 | 254 |
| /25 | 7 bits | 128 | 126 |
| /26 | 6 bits | 64 | 62 |
| /30 | 2 bits | 4 | 2 |
The "usable hosts" count is two fewer than the total because the network address and broadcast address (described below) are reserved. A handy rule: the larger the number, the smaller (finer) the network. Since working out ranges by hand is tedious, the CIDR / Subnet Calculator instantly shows the address range and host count from a CIDR you enter.
The Role of the Subnet Mask
A subnet mask expresses the same information as CIDR's "/24" in a different form. It is a 32-bit value, like an IP address, that marks the network part with 1s and the host part with 0s.
| CIDR | Subnet mask |
|---|---|
| /24 | 255.255.255.0 |
| /16 | 255.255.0.0 |
| /8 | 255.0.0.0 |
In binary, "255.255.255.0" is "11111111.11111111.11111111.00000000," with twenty-four 1s from the front, which is exactly /24. In other words, CIDR and subnet masks express the same thing in different ways. A device compares an IP address against the subnet mask to decide whether the other party is "on the same network (deliver directly)" or "on an outside network (hand it to the router)."
Network and Broadcast Addresses
Within a single network (subnet), two addresses carry a special meaning.
- Network address: the address whose host part is all 0s. It represents the network itself and is not assigned to a device. For /24, that is 192.168.1.0.
- Broadcast address: the address whose host part is all 1s. It is used to send to every device on the network at once. For /24, that is 192.168.1.255.
Because these two are reserved, only the addresses in between are actually assigned to devices. That is why a /24 (256 addresses) yields 254 usable hosts. For 192.168.1.0/24, addresses 192.168.1.1 through 192.168.1.254 are for devices, 192.168.1.0 is the network address, and 192.168.1.255 is the broadcast address.
Practical Points to Remember
Finally, here are practical points to keep you from stumbling over network settings.
- Mind whether you are on the same network: many "cannot connect" problems come from the network parts of the two sides not matching. Always check the IP and subnet mask together.
- Pick the CIDR by working back from host count: choose the right size for the number of devices you need, allowing for the network and broadcast addresses.
- Let a tool do the math: deriving the address range from a CIDR is error-prone even for the experienced. Confirm it with the CIDR / Subnet Calculator, and check your own global IP with the IP Address Checker.
Once you understand that an IP address is "network part plus host part," and that CIDR and the subnet mask decide "where to draw the boundary," subnets suddenly become much clearer. As a start, take a familiar example like 192.168.1.0/24 and write out the network address, broadcast address, and usable host range yourself; the knowledge will stick far better.
FAQ
What is an IP address?
It is a number that identifies a device on a network, often compared to a street address on the internet. Source and destination IP addresses are used to deliver data to the right party. The mainstream IPv4 format is written as four numbers separated by periods (each 0 to 255), such as 192.168.1.1.
What is the difference between private and global IP addresses?
A global IP is an outward-facing address that is unique across the internet and assigned by your provider. A private IP is used only within a closed network such as a home or office, with 192.168.x being a common example. Private IPs are translated into a global IP by the router's NAT to communicate externally.
What does the "/24" in CIDR mean?
It indicates how many of the 32 bits, from the front, make up the network part. With /24, the first 24 bits are the network part and the remaining 8 bits are the host part, giving 256 addresses (254 usable hosts). The larger the number, the smaller the network.
How are subnet masks and CIDR related?
They express the same information in different forms. A subnet mask is a 32-bit value that marks the network part with 1s and the host part with 0s, and 255.255.255.0 corresponds to /24. In binary it shows twenty-four 1s from the front, so it means the same as /24.
What are network and broadcast addresses?
The network address has an all-0 host part and represents the network itself, while the broadcast address has an all-1 host part and is used to send to every device at once. Because both are reserved, they are not assigned to devices, which is why a /24 has 254 usable hosts.