Subnet Calculator (IPv4 CIDR)
Full IPv4 subnet kugawa: netiweki, kufalitsa, mask, wildcard, woyang'anira m'mimba mwake ndi mnda.
Zithunzizi zimasintha monga momwe mumalemba.
Zachidule
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.
Mafunso ofunsidwa nthawi zambiri
Kodi mabungwe ambiri ndi m’malo subnet?
A / n subnet ali 2 ^ (32 - n) adiresi, minus awiri anatenga kwa netiweki ndi broadcast. A / 24 ali 256 adiresi ndi 254 ntchito mahosts.
Kodi ndi chiyani wildcard mask?
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.
Kodi pali kusiyana kotani pakati pa netiweki ndi adiresi yofalitsa?
Adiresi ya netiweki (zomwe zonse ndi ma bit 0) imapatsa dzina la subnet; adiresi yofalitsa (zomwe zonse ndi ma bit 1) imafika pazomwe zonse zili pa izo. Palibe chomwe chingathe kuperekedwa kwa chipangizo.
Kodi CIDR prefix (/24, /16) kumatanthauza chiyani?
Ndi idadi ya ma bit oyamba omwe amapanga gawo la netiweki la adiresi. A prefix wamkulu amatanthauza ma bit ambiri a netiweki ndi ma bit ochepa a ma host, kotero subnet wamkulu: /24 amapatsa 254 ma host, /25 amapatsa 126, ndipo kamodzi ka bit kambiri kumadula block.
Kodi ndingatani kuti ndichepetse netiweki m'ma subnets ang'onoang'ono?
Kutenga ndalama za ma hosts ndi kuwonjezera ma prefix. Kugawa /24 m'ma /25s awiri kumapatsa ma blocks awiri a 126 ma hosts; kupita ku /26 kumapatsa ma blocks awiri a 62. Kawirikawiri bit ya prefix imawonjezera kuchuluka kwa subnets ndi kuchepetsa kukula kwawo.
Kodi ndi IP adiresi gulu?
M'zaka za zana la 19, makompyuta ayamba kulandira ma adilesi a IP kuchokera ku makompyuta ena, ndipo tsopano ma adilesi a IP amagawidwa m'magulu atatu: A (1-126), B (128-191) ndi C (192-223) kwa ma unicast, D kwa ma multicast ndi E otetezeka.
Kodi ndi / 31 ndi / 32 subnets ntchito?
A / 31 ali ndi ma adilesi awiri okha ndi palibe kufalitsa, kugwiritsira ntchito kwa point-to-point kugwirizana pakati pa ma routers. A / 32 ndi imodzi ma adilesi woyang'anira, wofala kwa loopbacks ndi ma host njira.
API — kugwiritsa ntchito izi calculator kuchokera code
Kuti mudziwe zambiri, pitani ku www.json.org/json.html. Kuti mudziwe zambiri, pitani ku www.json.org/json.html. Chomweko chilichonse chimene mumasiya chimagwiritsa ntchito mfundo yoyamba yomweyi yomwe tsambali limagwiritsa ntchito; mfundo yosadziwika ndi 400, siyiyenera kukhala zero yosadziwika. Onani zonse API docs →
Chithunzi
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);
Zimenezi ndi zowerengera zokhudzana ndi malangizo amtundu uliwonse, si zokhudzana ndi ndalama, zamoyo kapena zokhudzana ndi ndalama.