حساب الشبكة الفرعية (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 إلى اثنين /25s يعطي كتلتين من 126 مضيف؛ الذهاب إلى /26 يعطي أربعة كتل من 62. كل بتات الافتتاحية المضافة تضعف عدد الشبكات الفرعية وتقليل حجمها إلى النصف.
ما هو فئة عنوان بروتوكول الإنترنت؟
المخطط القديم للتصنيف يقسم العناوين من خلال أول ثماني أرقام: الرتبة A (1-126)، الرتبة B (128-191) والرتبة C (192-223) للبث الواحد، بالإضافة إلى D للبث المتعدد و E المحجوز.
ما هو الغرض من الشبكتين الفرعيتين /31 و /32؟
A/31 لديه عنوانين فقط ولا يوجد بث، يستخدم للوصلات من نقطة إلى نقطة بين الموجهات. A/32 هو عنوان مضيف واحد، شائع للطرق العكسية وطرق المضيف.
API - استخدام هذا الحاسب من الشفرة
استدعاء هذه الحاسبة كنقطة نهاية JSON مجانية - لا مفتاح مطلوب. إرسال قيم الحقل أدناه كبارامترات الاستفسار أو JSON. أي شيء تحذفه يستخدم نفس الافتراض الذي تم ملء هذه الصفحة مسبقاً به؛ البارامترات غير المعروفة هي 400، وليس صفراً صامتاً أبداً. اقرأ كامل وثائق 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);
النتائج هي تقديرات للتوجيه العام فقط، وليس المشورة المالية أو الطبية أو الضريبية.