dit document beschrijft hoe subnetting in mekaar zit
IPv4 addresses are 32-bit numbers divided into 4 octets:
192.168.10.5 | 8 bits | 8 bits | 8 bits | 8 bits |
| Class | First Octet Range | Default Mask | Use |
|---|---|---|---|
| A | 1–126 | /8 | Large networks |
| B | 128–191 | /16 | Medium networks |
| C | 192–223 | /24 | Small networks |
| D | 224–239 | N/A | Multicast |
| E | 240–254 | N/A | Experimental |
A subnet mask tells which part is network and which part is host.
Example:
255.255.255.0 → /24
| Subnet Mask | CIDR |
|---|---|
| 255.0.0.0 | /8 |
| 255.255.0.0 | /16 |
| 255.255.255.0 | /24 |
| 255.255.255.128 | /25 |
| 255.255.255.192 | /26 |
| 255.255.255.224 | /27 |
| 255.255.255.240 | /28 |
| 255.255.255.248 | /29 |
| 255.255.255.252 | /30 |
Example:
/26 = 255.255.255.192 = 11111111.11111111.11111111.11000000
* /26 has 2 bits for subnet (since default /24 + 2)
2^subnet_bits = 2^2 = 4 subnets
2^(host_bits) - 2 = 2^6 - 2 = 62 hosts
If you know the subnet mask, the increment is the value of the last 1 bit in the mask.
Example: /26 mask = 255.255.255.192
Binary: 11000000 Increment = 64
So subnets:
0, 64, 128, 192
* Network address: all host bits = 0 * Broadcast address: all host bits = 1 * Cannot use network or broadcast addresses for hosts
| Mask | Subnet Size | Hosts |
|---|---|---|
| /24 | 256 | 254 |
| /25 | 128 | 126 |
| /26 | 64 | 62 |
| /27 | 32 | 30 |
| /28 | 16 | 14 |
| /29 | 8 | 6 |
| /30 | 4 | 2 |
Given: 192.168.1.0 /26 Find subnets and ranges
Subnets (increment 64):
192.168.1.0 → hosts .1 to .62 → broadcast .63 192.168.1.64 → hosts .65 to .126 → broadcast .127 192.168.1.128 → hosts .129 to .190 → broadcast .191 192.168.1.192 → hosts .193 to .254 → broadcast .255
“Network, Subnet, Host” Think of it as:
* Network = fixed * Subnet = variable * Host = variable
voeg hier linken toe naar verdere uitleg