Usar CIDR notation para network ranges
CIDR (Classless Inter-Domain Routing) compactly represents IP ranges. Aprender prefix lengths, subnet masks, y cómo a verificar si un IP es en un range.
- 1
CIDR notation (IP/prefix) replaces classful addressing. /8 = 16M hosts (former class A), /16 = 65K (class B), /24 = 256 (class C), /32 = 1 host. The prefix determines the subnet mask: /24 → 255.255.255.0, /16 → 255.255.0.0. To check if an IP is in a CIDR range, AND the IP with the mask and compare to the network address.
- 2 Información de direcciones IP →
Enter a CIDR block (e.g., 10.0.0.0/8) to see the subnet mask, wildcard mask, network and broadcast addresses, and total addresses. This is useful for firewall rules and access control lists.
- 3 Calculadora de precisión →
Convertir a prefix length a a subnet mask. /20 → 255.255.240.0. The first 20 bits are 1, the rest are 0. In binary: 11111111.11111111.11110000.00000000. The wildcard mask is the inverse: 0.0.15.255
Preguntas frecuentes
- How do I check if an IP is in a CIDR range?
- Convertir the IP and network address a 32-bit integers. AND both with the subnet mask. If the results are equal, the IP is in the range. For example, 192.168.1.100 AND 255.255.255.0 = 192.168.1.0, which matches the network 192.168.1.0/24
- What is the smallest useful subnet?
- /30 gives 2 usable hosts (4 addresses minus network and broadcast) — used for point-to-point links between routers. /31 (RFC 3021) gives 2 hosts with no broadcast, used for point-to-point in modern networks. /32 is a single host (host route).