Calcolatore subnet (IPv4 CIDR)
Completa ripartizione sottorete IPv4: rete, broadcast, maschera, jolly, host range e conteggio.
Aggiornamento dei risultati durante la digitazione.
A proposito di questa calcolatrice
This subnet calculator turns an IPv4 address and a CIDR prefix into the full structure of a subnet. An IPv4 address is 32 bits, usually written as four dot-separated octets like 192.168.1.10, and a CIDR prefix such as /24 splits those 32 bits into a network part (the leading bits, fixed for every host in the subnet) and a host part (the remaining bits, unique to each device). This calculator takes an address and a prefix length and derives the network address, broadcast address, subnet mask, wildcard mask and the range of usable host addresses, along with the IP class and total address count.
The size of a subnet is set by the prefix: a /n block holds 2^(32−n) addresses, of which two are reserved — the network address (all host bits 0, naming the subnet) and the broadcast address (all host bits 1, reaching every host). So a /24 has 2^8 = 256 addresses and 254 usable hosts, a /25 has 128 addresses and 126 usable hosts, and each extra prefix bit halves the block. As a worked example, 192.168.1.10/24 gives a network of 192.168.1.0, a broadcast of 192.168.1.255, a 255.255.255.0 mask, a 0.0.0.255 wildcard mask, and a usable host range of 192.168.1.1 to 192.168.1.254.
Subnetting is how networks are carved into manageable, secure segments — separating departments, sizing VLANs, planning address allocation and writing firewall and routing rules. The wildcard mask (the bitwise inverse of the subnet mask) is what Cisco access-control lists and OSPF use to match ranges of addresses. The /31 and /32 prefixes are special cases: /31 is used for point-to-point links with two usable addresses and no broadcast, and /32 describes a single host.
Domande frequenti
Quanti host ci sono in una sottorete?
Una sottorete /n ha 2^(32−n) indirizzi, meno due riservati alla rete e la trasmissione. A /24 ha 256 indirizzi e 254 host utilizzabili.
Che cos'è una maschera jolly?
A wildcard mask is the bitwise inverse of the subnet mask (255.255.255.0 → 0.0.0.255). Access-control lists and OSPF use it to match ranges of addresses.
Qual è la differenza tra rete e indirizzo di trasmissione?
L'indirizzo di rete (tutti i bit host 0) indica la sottorete; l'indirizzo di trasmissione (tutti i bit host 1) raggiunge ogni host su di essa. Né può essere assegnato a un dispositivo.
Cosa significa il prefisso CIDR (/24, /16)?
È il numero di bit principali che formano la porzione di rete dell'indirizzo. Un prefisso più grande significa più bit di rete e meno bit di host, quindi una subnet più piccola: /24 dà 254 host, /25 dà 126, e ogni bit in più metà del blocco.
Come faccio a dividere una rete in sottoreti più piccole?
Prendere in prestito bit host aumentando il prefisso. Dividere un /24 in due /25s dà due blocchi di 126 host; andare a /26 dà quattro blocchi di 62. Ogni bit prefisso aggiunto raddoppia il numero di sottoreti e la metà delle loro dimensioni.
Che cos'è una classe di indirizzi IP?
The old classful scheme split addresses by their first octet: Class A (1–126), Class B (128–191) and Class C (192–223) for unicast, plus D for multicast and E reserved. CIDR replaced classes for allocation, but the calculator still reports the class the address falls in.
Per che cosa si usano le sottoreti /31 e /32?
Un /31 ha solo due indirizzi e nessuna trasmissione, utilizzati per collegamenti punto-punto tra router. Un /32 è un unico indirizzo host, comune per loopback e percorsi host. La calcolatrice gestisce entrambi i casi speciali.
API Hoppenstedt utilizzare questa calcolatrice dal codice
Chiama questa calcolatrice come un endpoint JSON Gratis non è necessaria alcuna chiave. Invia i valori del campo sotto come parametri di query o JSON. Qualsiasi cosa ometterete usa lo stesso valore predefinito di questa pagina; un parametro sconosciuto è un 400, mai uno zero silenzioso. Leggi tutti i documenti API →
Punto finale
GET https://calculator.free/api/v1/subnet/
curl
curl "https://calculator.free/api/v1/subnet/?ip=192.168.1.10&cidr=24"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/subnet/?" + new URLSearchParams({
"ip": "192.168.1.10",
"cidr": "24"
}));
const data = await r.json();
console.log(data.results);
I risultati sono stime solo per gli orientamenti generali, non per i consigli finanziari, medici o fiscali.