محاسبه‌گر زیرشبکه (IPv4 CIDR)

تجزیه کامل زیرشبکه IPv4: شبکه، پخش، ماسک، wildcard، محدوده میزبان و شمارش.

/
Prefix length, e.g. 24 for a 255.255.255.0 mask.
نشانی شبکه —
نشانی پخش —
ماسک زیرشبکه —
پوشش جانشین —
میزبانهای قابل استفاده —
محدوده میزبان —

نتایج در حال تایپ به روز می‌شود.

اين ماشین حساب جواب درست رو بهت داد؟

در مورد این ماشین حساب

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 دارای ۲^(۳۲-n) آدرس است، منهای دو آدرس رزرو شده برای شبکه و پخش. /۲۴ دارای ۲۵۶ آدرس و ۲۵۴ میزبان قابل استفاده است.

ماسک جاوا چیست؟

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.

تفاوت بین آدرس شبکه و آدرس پخش چیست؟

نشانی شبکه (همه بیتهای میزبان ۰) زیرشبکه را نامگذاری می‌کند؛ نشانی پخش (همه بیتهای میزبان ۱) به هر میزبان در آن می‌رسد. هیچ‌کدام از این دو نمی‌توان به یک دستگاه اختصاص داد.

پیشوند CIDR (/۲۴، /۱۶) به چه معناست؟

It is the number of leading bits that form the network portion of the address. A larger prefix means more network bits and fewer host bits, so a smaller subnet: /24 gives 254 hosts, /25 gives 126, and each extra bit halves the block.

چگونه یک شبکه را به زیرشبکه‌های کوچکتر تقسیم می‌کنم؟

بیتهای میزبان را با افزایش پیشوند قرض بگیرید. تقسیم یک / ۲۴ به دو / ۲۵s دو بلوک ۱۲۶ میزبان را می‌دهد؛ رفتن به / ۲۶ چهار بلوک ۶۲ را می‌دهد. هر بیت پیشوند اضافه شده تعداد زیرشبکه را دو برابر می‌کند و اندازه آن‌ها را نصف می‌کند.

کلاس آدرس IP چیست؟

طرح قدیمی کلاس‌بندی آدرس‌ها را بر اساس اولین هشتک آن‌ها تقسیم می‌کرد: کلاس A (1–126)، کلاس B (128–191) و کلاس C (192–223) برای یک‌طرفه، به علاوه D برای چندطرفه و E رزرو شده.

زیرشبکه /۳۱ و /۳۲ برای چه استفاده می‌شود؟

A/31 فقط دو آدرس دارد و هیچ پخش ندارد، برای پیوندهای نقطه به نقطه بین مسیریاب‌ها استفاده می‌شود. A/32 یک آدرس میزبان واحد است، که برای حلقه‌های بازگشتی و مسیرهای میزبان معمول است.

❤️ عشق Calculator.Free? به اشتراک بذار

𝕏  X Facebook Reddit
API — از این ماشین حساب از کد استفاده کنید

این محاسبه‌گر را به عنوان نقطه پایانی JSON آزاد فراخوانید — کلید مورد نیاز نیست. مقادیر میدان زیر را به عنوان پارامترهای پرسش یا JSON ارسال کنید. هر چیزی که حذف کنید از همان پیش‌فرض استفاده می‌کند که این صفحه با آن پر شده‌است؛ یک پارامتر ناشناخته یک ۴۰۰ است، هیچ‌گاه یک صفر خاموش. مستندات کامل 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);

نتایج تخمین‌ها فقط برای راهنمایی عمومی است، نه مشاوره مالی، پزشکی یا مالیاتی.