서브넷 계산기 (IPv4 CIDR)
네트워크, 브로드캐스트, 마스크, 와일드카드, 호스트 범위 및 카운트를 포함한 IPv4 서브넷 분석
입력하는 동안 결과가 업데이트됩니다.
이 계산기에 대해
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.
자주 묻는 질문
서브넷에 호스트가 몇 개 있습니까?
/n 서브넷은 네트워크와 브로드캐스트를 위해 예약된 두 개를 제외한 2^(32−n) 주소를 가지고 있다. /24는 256개의 주소와 254개의 사용 가능한 호스트를 가지고 있다.
와일드카드 마스크란 무엇인가요?
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.
네트워크 주소와 브로드캐스트 주소의 차이점은 무엇입니까?
네트워크 주소(모든 호스트 비트 0)는 서브넷의 이름을 나타내며, 브로드캐스트 주소(모든 호스트 비트 1)는 서브넷의 모든 호스트에 도달한다.
CIDR 접두사 (/24, /16)는 무엇을 의미합니까?
네트워크 부분을 형성하는 앞의 비트의 수이다. 큰 접두사는 더 많은 네트워크 비트와 더 적은 호스트 비트를 의미한다. 따라서 작은 서브넷은 /24는 254개의 호스트를, /25는 126개의 호스트를 제공하며, 추가 비트는 블록을 반으로 줄인다.
네트워크를 작은 서브넷으로 분할하려면 어떻게 합니까?
접두사를 늘려서 호스트 비트를 빌려 준다. /24를 두 개의 /25로 나누면 126개의 호스트가 있는 두 개의 블록이 된다. /26로 갈 때는 62개의 블록이 네 개 된다. 각 접두사 비트를 더하면 서브넷의 수가 두 배가 되고 크기가 반으로 줄어든다.
IP 주소 클래스란 무엇입니까?
옛 클래스풀 스키마는 주소를 첫 번째 옥테트로 나누어 클래스 A(1-126), 클래스 B(128-191) 및 클래스 C(192-223)를 유니캐스트, D를 멀티캐스트, E를 예약으로 나누었다. CIDR은 할당을 위한 클래스를 대체했지만 계산기는 여전히 주소가 속한 클래스를 보고한다.
/31과 /32 서브넷은 무엇을 위해 사용되는가?
/31은 2개의 주소만 가지고 있고 브로드캐스트가 없으며 라우터 간의 포인트-투-포인트 링크에 사용됩니다. /32는 루프백과 호스트 경로에 일반적인 단일 호스트 주소입니다. 계산기는 두 가지 특수한 경우를 다 처리합니다.
API — 코드에서 이 계산기를 사용
이 계산기를 무료 JSON 엔드포인트로 호출하세요. 키가 필요하지 않습니다. 아래 필드 값을 쿼리 매개 변수 또는 JSON으로 보내십시오. 누락된 모든 값은 이 페이지에서 미리 채워진 기본값을 사용합니다. 알 수 없는 매개변수는 400이며, 절대 0이 아닙니다. 전체 API 문서 읽기 →
끝점
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);
결과는 재정, 의료 또는 세금 조언이 아닌 일반적인 지침을위한 추정치입니다.