Máy tính subnet IP
The detailed guide below is currently available in English.
What a subnet mask does
An IPv4 address is 32 bits, and the subnet mask decides where the network part ends and the host part begins. In the mask, every 1-bit belongs to the network and every 0-bit to the host. CIDR notation compresses this to a count: /24 means 24 one-bits, the same as the dotted mask 255.255.255.0. AND-ing an address with its mask produces the network address; OR-ing the network with the inverted mask (the wildcard) produces the broadcast address.
Reading the results
The host range is everything between the network and broadcast addresses, and the usable-host count is 2 raised to the number of host bits, minus those two reserved addresses. A /24 therefore holds 254 devices. The class letter is a legacy grouping still useful for a quick size guess, and the scope tells you whether the address is routable on the public internet or reserved for private networks, loopback testing, or link-local self-assignment.
Câu hỏi thường gặp
What is the difference between /24 and 255.255.255.0?
Nothing — they describe the same mask. /24 counts the 24 leading one-bits, while 255.255.255.0 writes each byte in decimal. This calculator accepts either form in the mask field.
Why does a /31 or /32 break the usual rule?
A normal subnet reserves two addresses, which would leave nothing usable in a /31. RFC 3021 therefore allows both addresses on /31 links for point-to-point connections, and a /32 names exactly one host. The usable-host row reflects those special cases.
Is 192.168.x.x a public address?
No. The ranges 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are reserved for private networks by RFC 1918 and are not routed on the public internet. The scope row flags these, along with 127/8 loopback and 169.254/16 link-local addresses.