Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamwhat is a /24 subnet
A /24 subnet is an IPv4 subnet where the first 24 bits of the IP address identify the network, and the remaining 8 bits identify individual hosts/devices.
A /24 subnet uses this subnet mask:
255.255.255.0
It contains:
| Item | Value |
|---|---|
| CIDR notation | /24 |
| Subnet mask | 255.255.255.0 |
| Total IP addresses | 256 |
| Usable host addresses | 254 |
| Network bits | 24 |
| Host bits | 8 |
Example:
192.168.1.0/24
This subnet includes:
192.168.1.0 to 192.168.1.255
But normally usable device addresses are:
192.168.1.1 to 192.168.1.254
because:
192.168.1.0 is the network address192.168.1.255 is the broadcast addressIPv4 addresses are 32 bits long. A /24 means:
24 bits = network portion
8 bits = host portion
In binary, the subnet mask looks like this:
11111111.11111111.11111111.00000000
Converted to decimal:
255.255.255.0
So for:
192.168.1.0/24
the first three octets usually identify the network:
192.168.1.x
The last octet changes for each device:
192.168.1.1
192.168.1.2
192.168.1.3
...
192.168.1.254
The number of host addresses comes from the 8 remaining host bits:
\[ 2^8 = 256 \]
However, two addresses are normally reserved:
\[ 256 - 2 = 254 \]
So a /24 subnet gives 254 usable host IP addresses.
For the subnet:
192.168.10.0/24
you get:
| Purpose | Address |
|---|---|
| Network address | 192.168.10.0 |
| First usable host | 192.168.10.1 |
| Last usable host | 192.168.10.254 |
| Broadcast address | 192.168.10.255 |
| Subnet mask | 255.255.255.0 |
A router might use:
192.168.10.1
and devices could use:
192.168.10.20
192.168.10.21
192.168.10.22
All of those are in the same subnet if they use the mask 255.255.255.0.
A /24 subnet is very common in:
For example, many home routers use something like:
192.168.0.0/24
or:
192.168.1.0/24
This is usually enough for up to 254 devices, which is adequate for most small networks.
If you need more hosts, you might use a larger subnet:
| Subnet | Usable hosts |
|---|---|
/24 |
254 |
/23 |
510 |
/22 |
1022 |
If you want smaller isolated networks, you might use:
| Subnet | Usable hosts |
|---|---|
/25 |
126 |
/26 |
62 |
/27 |
30 |
/28 |
14 |
A /24 subnet means:
Subnet mask: 255.255.255.0
Total addresses: 256
Usable device addresses: 254
Example:
192.168.1.0/24
means the network covers:
192.168.1.0 through 192.168.1.255
with usable host addresses usually from:
192.168.1.1 through 192.168.1.254