Problema: dividir 192.168.1.0/24 en 6 subredes iguales.
- Bits que hay que tomar prestados: 2^n ≥ 6 → n = 3 (8 subredes).
- Nuevo prefijo: /24 + 3 = /27 → máscara 255.255.255.224.
- Salto (tamaño de bloque): 256 − 224 = 32.
- Hosts por subred: 2^5 − 2 = 30.
| Subred | Red | Primer host | Último host | Broadcast |
|---|---|---|---|---|
| 0 | 192.168.1.0 | .1 | .30 | .31 |
| 1 | 192.168.1.32 | .33 | .62 | .63 |
| 2 | 192.168.1.64 | .65 | .94 | .95 |
| 3 | 192.168.1.96 | .97 | .126 | .127 |
| … | … | … | … | … |
| 7 | 192.168.1.224 | .225 | .254 | .255 |
Si el requisito es por hosts (p. ej. 50 por subred): 2^h − 2 ≥ 50 → h = 6 → prefijo /26 (62 hosts).
Comprobar en Linux: ipcalc 192.168.1.0/27.