Subnet Calculator (IPv4 CIDR)
IPv4 subnet mebigharịrị: netwọ́ọkụ, mbipụta, mask, wiilịkaréètì, ọ̀fụ̀ụ
Nhọrọ ndị ahụ ga-akpụzi mgbe ị na-etipụta.
N'ihe banyere calculator a
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.
Ajụjụ ndị a na-ajụkarị
Olee ọnụọgụgụ nke ndịna na-ebi n'okpuru netwọk?
A /n subnet nwere 2^(32−n) adreesị, nke na-abawanye abụọ echekwara maka netwọ́ọkụ nakwa ngwe. A /24 nwere adreesị 256 nakwa 254 nke nwere ike ijikwa.
Gịnị bụ wiilịkarị?
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.
Gịnị bụ ọdịiche dị n'etiti netwọk na adreesị redio?
Ebe nrụọrụ netwọ́ọ̀tụ̀ (bit ndị ọ̀bịa niile 0) na-akpọ sábnet; ebe nrụọrụ brọ́ọ̀tụ̀ (bit ndị ọ̀bịa niile 1) na-abịarute ọ̀bịa niile na ya. Enweghị nke ọbụla a ga-eziga na ngwaọrụ.
Gịnị bụ ihe CIDR prefix (/24, /16) pụtara?
Ọ bụ ọnụọgụgụ nke mbitịn ndị na-aga n'ihu nke na-eme ntọala nke adreesị ahụ. Otú ọ dị, nnukwu prefix pụtara na ọ nwere ọtụtụ mbitịn ntọala na bit ndị ọbụla dị obere, ya mere, obere subnet: /24 na-enye 254 ndị ọbụla, /25 na-enye 126, nakwa bit ọbụla ọzọ na-eme n'elu blokị ahụ.
Olee otú m ga-esi wepụ netwọ́ọkụ n'ime subnets ndị nta?
Nweta bit ndịna site n'ịbawanye prefix. Ihe a na-eme na /24 na /25s abụọ na-enye blóòdù abụọ nke 126 ndịna; ịga na /26 na-enye blòọdù anọ nke 62. bit nke ọbụla nke agbakwunyere na prefix na-ebido ọnụọgụgụ nke subnets nakwa n'elu ha.
Gịnị bụ IP adreesị klas?
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.
Gịnị bụ /31 na /32 subnets ejiri maka?
A /31 nwere adreesị abụọ nakwa enweghị mbido, ejiri ya maka njikọ n'etiti ntọala na ntọala n'etiti nwuo. A /32 bụ adreesị ọbụla nke ọbụla, nke a na-ejikarị maka loopbacks na ụzọ ntọala. Calculator na-ejikwa ihenhọrọ dị iche iche abụọ.
API — jiri kaadị a site na kóòdù
Kpọọ kalkulata a dịka ebe ngwụcha JSON n'efu - enweghị kii achọrọ. Ziga valiu ebe ahụ n'okpuru dịka paramita ajụjụ mọọbụ JSON. Ihe ọbụla ị na-ewepụ na-eji dìfọ́ọ̀ltụ̀ nke a na-edebe ihuakwụkwọ a na ya; parameter a na-amaghị bụ 400, ọ dịghị sẽọ̀rọ̀. Gụọ ngwe ndị ahụ niile →
Ebemkpofuozi
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);
Ihe a na-ahụta bụ n'ihi nlekọta n'ozuzu ya, ọ bụghị nlekọta ego, ọgwụ ma ọ bụ nlekọta ego.